NimbusDB is a multi-region, horizontally scalable cloud database platform designed to demonstrate the engineering surface area of Microsoft Azure SQL, Cosmos DB, and Azure Data Factory teams.
The platform enforces a strict separation between the Control Plane (orchestration, scheduling, and metadata tracking) and the Data Plane (storage engines, write-ahead logging, and replication), ensuring no shared in-process state.
┌─────────────────────┐
│ API Gateway │
│ (REST, auth, rate │
│ limiting) │
└──────────┬───────────┘
│
┌───────────────┴───────────────┐
│ Control Plane │
│ (Scheduler, Provisioner, │
│ Metadata Service) │
└───────────────┬───────────────┘
│
┌────────────────────────────┼────────────────────────────┐
│ │ │
┌───────▼────────┐ ┌────────▼────────┐ ┌─────────▼───────┐
│ Node Agent 1 │ │ Node Agent 2 │ │ Node Agent N │
│ (Data Plane) │ │ (Data Plane) │ │ (Data Plane) │
│ Storage Engine │ │ Storage Engine │ │ Storage Engine │
└─────────────────┘ └──────────────────┘ └───────────────────┘
- Metadata Service: The single source of truth for cluster metadata (regions, clusters, active nodes, database layouts). Written in Go, uses PostgreSQL as the backing store, and communicates internally via gRPC.
- Capacity Scheduler: A standalone placement service written in Go that evaluates node capacities and schedules databases onto the least-loaded nodes.
- Worker Node (Node Agent): Simulated client representing compute hosts. Operates a telemetry loop reporting synthetic metrics and hosts a debug HTTP interface for partition testing. (Storage engine will be implemented in Rust).
- Control Plane Dashboard: A Next.js application polling the REST boundary to present real-time cluster health statuses and resource gauges.
Phase 1 (Distributed Cluster Foundation) is fully complete. The following features are currently active and tested:
- gRPC Internal Routing: Concurrently hosted gRPC service interfaces (
RegisterNode,SendHeartbeat,GetNodes) and external REST boundaries (GET /health,GET /v1/nodes). - Health Manager Ticker: Background evaluator checking node heartbeat liveness every 2s to classify nodes (
healthy/unhealthy/dead/overloaded). - Least Loaded Scheduler: Placement engine calculating resource scores with exclusions for dead/draining nodes and deprioritization for overloaded instances.
- E2E Integration Test Suite: Complete docker-compose orchestration containing automated chaos injection and state transition assertions.
nimbusdb/
├── GEMINI.md (Project Constitution)
├── PROJECT_STATUS.md (Live Build Status Tracker)
├── docs/
│ ├── benchmarks.md (Real measured performance latencies)
│ └── decisions/ (Architectural Decision Records)
├── proto/
│ └── metadata_service.proto (Internal gRPC protocol buffer definition)
├── services/
│ ├── metadata-service/ (Metadata registry microservice - Go)
│ ├── scheduler/ (Least Loaded placement scheduler - Go)
│ ├── worker-node/ (Simulated node client agent - Go)
│ └── dashboard/ (Real-time control plane dashboard - Next.js)
├── deploy/
│ └── docker/
│ └── docker-compose.yml (Cluster compose orchestrated stack)
└── tests/
└── integration/
└── integration_test.go(Multi-node E2E chaos simulation test runner)
- Go 1.25+
- Node.js 18+ & npm
- Docker & Docker Compose
To spin up the entire cluster topology, inject simulated failures, and verify the scheduler's behavior under crash conditions, execute:
cd tests/integration
go test -v -timeout 5mThis test program will automatically:
- Spin up the Postgres database, Metadata Service, Scheduler, and 3 Worker Node daemons inside a Docker Compose bridge network.
- Verify all nodes auto-register and establish active heartbeat logs.
- Pause
worker-2heartbeats and assert that theHealthManagerdetects its failure (transitions:healthy$\rightarrow$ unhealthyat 15s$\rightarrow$ deadat 60s). - Request a placement from the Scheduler and verify that the dead node is excluded from decisions.
- Resume
worker-2heartbeats and verify it recovers successfully tohealthy. - Clean up and delete Docker containers, networks, and test database volumes on exit.
To run local performance benchmarks measuring registration and heartbeat database latencies:
cd services/metadata-service/tests
$env:DATABASE_URL="postgres://postgres:password@localhost:5432/nimbusdb?sslmode=disable"
go test -bench=MetadataServiceNote: Requires a local running PostgreSQL instance (or start the container in deploy/docker manually first).
To visualize the node metrics on a Web UI:
- Ensure the docker-compose stack is running:
docker compose -f deploy/docker/docker-compose.yml up -d
- Navigate to the dashboard service and start the Next.js server:
cd services/dashboard npm install npm run dev - Open http://localhost:3000 in your browser to view the active cluster health dashboard.
For details on tradeoffs and selections made, refer to our ADR files under docs/decisions/:
- Metadata DB: metadata-store-choice.md (PostgreSQL)
- Communication protocol: internal-rpc-choice.md (gRPC internally, REST at the dashboard boundary)
- Storage engine language: rust-vs-cpp.md (Rust)