Multi-Instance Hosting
DPG supports two common multi-instance patterns:
- one backend serving many bindings
- many backends serving one network together
One Backend, Many Bindings
Section titled “One Backend, Many Bindings”Example:
SERVED_DOMAINS="yellow_dot/student,yellow_dot/tutor,blue_dot/seeker"What This Means
Section titled “What This Means”- 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_networkanditem_domain
When To Use It
Section titled “When To Use It”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
Things To Keep Clear
Section titled “Things To Keep Clear”item_networkanditem_domainmust 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
Example Production Env
Section titled “Example Production Env”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"Many Backends, One Network
Section titled “Many Backends, One Network”Example:
student-apiservesyellow_dot/studenttutor-apiservesyellow_dot/tutorcoaching-apiservesyellow_dot/coaching_center
The network config registers all of them, and GET /api/v1/network/item/fetch aggregates across them when needed.