Skip to content

Multi-Instance Hosting

DPG supports two common multi-instance patterns:

  1. one backend serving many bindings
  2. many backends serving one network together

Example:

Terminal window
SERVED_DOMAINS="yellow_dot/student,yellow_dot/tutor,blue_dot/seeker"
  • the same process can serve multiple business domains
  • the same CORS layer can allow origins derived from multiple network configs
  • your item storage can remain partitioned by item_network and item_domain

Use this when:

  • one deployment should serve closely related domains
  • shared auth/config/runtime behavior is desirable
  • operational overhead of separate services is not worth it
  • item_network and item_domain must always be carried in item records
  • route handlers and downstream jobs must respect the binding context
  • network config URLs should be configured for every served network in production
Terminal window
SERVED_DOMAINS="yellow_dot/student,yellow_dot/tutor"
NETWORK_CONFIG_SOURCE="remote"
NETWORK_CONFIG_URLS="yellow_dot=https://registry.example.com/yellow-dot/network.json"

Example:

  • student-api serves yellow_dot/student
  • tutor-api serves yellow_dot/tutor
  • coaching-api serves yellow_dot/coaching_center

The network config registers all of them, and GET /api/v1/network/item/fetch aggregates across them when needed.