pg-status

Sidecar that reports PostgreSQL master, replicas and replication lag

Polls PostgreSQL hosts in the background and answers from memory over HTTP: which host is the master, which replicas qualify by lag, and read-your-writes checks. Light enough to query on every request, as a sidecar or a shared service.

  • 52,500 RPS/master, one vCPU
  • 4.17 msWorst p99
  • 10 MiBRSS

Trade-offs

  • All responses are served from memory, filled by background polling. Answers are cheap enough for every request, and they are as fresh as the last poll.
  • Host endpoints return 503 until every host has completed a first check. Callers never get a guess, and with dozens of hosts readiness can take several seconds.

Q&A3

With a 0.1-vCPU quota, a mixed workload confirmed 3,000 RPS at p99 of 5 ms or less.

Reviews

Loading reviews

    More in C

    See all 15 →
    • SNKVEmbedded key-value store built directly on SQLite's B-tree
    • LordOSDebian-based Linux distribution with its own desktop stack
    • XSProgramming language with its whole toolchain in one static binary
    • haxMinimalist terminal coding agent written in C
    • qwen3-ttsPure C inference engine for Qwen3-TTS text-to-speech
    • pktstat-bpfPer-flow traffic monitor for Linux with four eBPF capture modes

    More in Postgres

    See all 25 →
    • SupermetryCookie-free web and product analytics on one Go binary and PostgreSQL
    • arbiterPostgreSQL job queue for Haskell, with no broker and no leader
    • StreambedPostgres-to-Iceberg CDC engine with a built-in Postgres wire query server
    • MigrationPilotPostgreSQL migration linter that blocks unsafe DDL before merge
    • go-ledgerMulti-tenant double-entry payment ledger API in Go, built in public
    • pistachioDeclarative PostgreSQL schema management with a plan and apply workflow

    More in Distributed systems

    See all 20 →
    • RuvioRust key-value server that speaks RESP, with locks and queues as commands
    • EgresPostgres-compatible database in Zig for heavy, multi-tenant workloads
    • clinkC++ stream processing engine that stays correct when processes die
    • LassoSelf-hosted Ethereum JSON-RPC proxy that routes each call to the best provider
    • SwarmLLMLocal LLM app whose computers team up over the internet to run bigger models
    • AdvisKVA small, complete distributed key-value store in C++17 on Raft