# CBDDC Deployment Mode ZB.MOM.WW.CBDDC.Hosting supports a single deployment mode. ## Single-Cluster Mode **Best for:** - Dedicated database servers - Simple deployments - Development/testing environments - Small-to-medium applications ### Architecture ``` ┌─────────────────────┐ │ ASP.NET Server │ │ │ │ ┌───────────────┐ │ │ │ CBDDC │ │ │ │ (1 cluster) │ │ │ └───────────────┘ │ │ │ │ │ [TCP:5001] │ └─────────────────────┘ ``` ### Configuration ```csharp builder.Services.AddCBDDCHostingSingleCluster(options => { options.NodeId = "server-01"; options.TcpPort = 5001; }); ``` ### Characteristics - One database per server instance - Simple configuration - Easy to scale horizontally (multiple servers = multiple databases) - No port collision issues - Recommended for most use cases ## Server Behavior Servers use respond-only operation: - Accept incoming TCP sync connections - Respond to sync requests - Serve data to clients - Maintain persistence - Do not initiate outbound sync - Do not perform UDP discovery - Do not connect to other servers automatically ## Persistence Layer Compatibility Single-cluster mode works with all persistence providers: | Provider | Support | Notes | |----------|---------|-------| | SQLite (Direct) | Yes | One DB file per cluster | | EF Core | Yes | Flexible DB options | | PostgreSQL | Yes | Best for production | ## Scaling Strategy ### Horizontal Scaling ``` Load Balancer │ ├─> Server 1 (Cluster A) [PostgreSQL A] ├─> Server 2 (Cluster B) [PostgreSQL B] └─> Server 3 (Cluster C) [PostgreSQL C] ``` ## Recommendation Use single-cluster mode for ASP.NET hosting. It is simpler, robust, and straightforward to scale.