Use Cases
- Multi-tenant deployments: Isolate data for different customers or departments
- Development environments: Run staging and production apps side-by-side
- Migration scenarios: Transition between app versions gradually
- Data isolation: Keep different data types completely separated
Configuration
Define multiple database resources in your configuration file, each with its owndb_id
and authentication settings. Each app can have its own subscriptions,
HTTP servers, and transport configurations:
Key Considerations
Separate Persistence
By default, each app will use its own persistence directory to avoid data conflicts:app1
→/ditto_APP_ID_1
app2
→/ditto_APP_ID_2
Different Ports
If exposing HTTP APIs, you must use different ports for each app. In the future this will be consolidated into one HTTP server while respecting the defined namespaces.app1
→ port 8081app2
→ port 8082
Independent Auth
Each app can have its own authentication configuration:- Small peers only mode
- Cloud sync with different credentials