Initial import of the CBDDC codebase with docs and tests. Add a .NET-focused gitignore to keep generated artifacts out of source control.
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
82
docs/deployment-modes.md
Executable file
82
docs/deployment-modes.md
Executable file
@@ -0,0 +1,82 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user