When building an ecosystem of over 50 interconnected services, relying on heavy external cloud orchestration layers can introduce immense cognitive overhead and vendor lock-in. Nexus-Cloud was architected from first principles to act as the unified control plane for our self-hosted infrastructure.
Core Architectural Invariants
Nexus-Cloud operates under four strict engineering principles:
- Lightweight Runtime: Powered by Bun and TypeScript for sub-millisecond cold starts and minimal RAM footprint.
- Heartbeat-Driven Liveness: Services register automatically and maintain dynamic leases through periodical heartbeats.
- Internal DNS & Topology Resolution: Dynamic discovery without needing external Consul or etcd clusters.
- Zero-Trust Audit Invariance: Every policy decision, secret access, and deployment trigger produces an immutable audit record.
graph TD
Node1["Service Node A<br/>(Nexus-Vault)"] -->|Heartbeat / Lease| Registry["Nexus-Cloud Registry"]
Node2["Service Node B<br/>(Nexus-Deploy)"] -->|Heartbeat / Lease| Registry
Registry --> DNS["Federated DNS & Routing"]
Registry --> Quota["Quota & Placement Engine"]
Quota --> Audit["Immutable Audit Stream"]
The Heartbeat & Reconciliation Loop
Every service in the ecosystem runs a standardized 30-line heartbeat loop. Upon boot, the service calls POST /api/v1/systems/register with its capabilities, version, and health endpoint.
Nexus-Cloud assigns a dynamic lease TTL (typically 15 seconds). If a service misses two consecutive heartbeat intervals:
- It is transitioned to
degradedstatus. - Traefik / Edge proxies immediately stop routing live traffic to that instance.
- Nexus-Deploy is notified to initiate health checks or spawn a replacement container.
Dogfooding in Production
By hosting our own websites, APIs, devlogs, and services on top of Nexus-Hosting and Nexus-Cloud, every edge case is uncovered and resolved under real-world traffic.
Check out the Nexus-Cloud repository on GitHub.