byrgi

Architecture

text
Dashboard (Next.js) ──▶ Go API ──▶ PostgreSQL (state, jobs, encrypted secrets, keys, usage, audit)
                          │   ▲  node endpoint :8443 (mTLS gRPC stream + join bootstrap)
                          ▼   │  nodes dial OUT, no inbound SSH
clients ──▶ LiteLLM :4000 (/v1) ──HTTPS──▶ Traefik on the node ──▶ vLLM container
                      byrgi-agent on each node ──▶ Docker: models, apps, MCP gateway, agents, Traefik

Control plane

A single Go service holds the REST API, the job queue and the node stream. State lives in PostgreSQL; jobs use FOR UPDATE SKIP LOCKED with LISTEN/NOTIFY, so there is no separate broker. An internal CA issues client certificates to nodes when they join, and nodes pin that CA by its SHA-256.

Nodes

Each server runs byrgi-agent, which opens a long-lived gRPC stream to the control plane, receives jobs, and reports status, GPUs and cached model weights with every heartbeat. Workloads run through replaceable drivers: app, model.vllm, mcp.gateway and agent.cagent.

Isolation

Every project environment gets its own Docker network on each node. Traefik joins each of them to route public domains, but projects never share a network.

Releases

Placement is manual: you choose the server. The agent assigns free GPUs. A new release runs next to the old one, and the old one is stopped only after the new one passes readiness (apps: port open and stable; models: a real /v1/completions call). On failure the new container is removed and the old one keeps serving.

Failures are typed: image_pull, download, checksum, gpu_oom, no_gpu, disk_full, readiness_timeout, container_exited.