← Back
Home › Systems › Databases and storage engines

db-proxy

database connection pooler and proxy

PgBouncer, ProxySQL

SystemTechniques · 11Primitives · 56 db-proxy Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Coverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›TLS 1.3security · medium: The standard encrypted, authenticated transport; one round trip, only forward-secret AEAD suites, and little left to misconfigure.›Point-in-time recoverystorage · medium: Periodic base backups plus a continuously archived change log let you rebuild the state as of any instant, then branch from there.›Adaptive concurrency limitssystems · medium: AIMD/gradient limits on in-flight requests driven by observed latency, for backpressure and overload protectionDelta debuggingcompilers · medium: Ddmin minimization of failing inputs or change setsHealth checkingsystems · low: Decide per backend whether to route to it using probes and real-traffic errors, with consecutive-count hysteresis, capped ejection and a panic fallback.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesRecursive-descent parsingcompilers · low: Hand-written top-down parser with one function per grammar rule; simple, fast, with full control over error messages and recovery.›MPMC bounded queueconcurrency · low: Vyukov's array queue for many producers and consumers: each slot carries a sequence number, so one CAS per operation claims a slot without locks.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›epoll event loopnetworking · low: One thread waits on thousands of non-blocking sockets with epoll_wait and handles only ready ones; the core of nginx, Redis and tokio.›Length-prefix framingnetworking · low: Split a byte stream (TCP, TLS, pipes) into messages by writing each message's length before it; O(1) boundary detection with no escaping.›Power of two choicesnetworking · low: Pick two random backends and send to the less loaded one; exponentially better balance than random, with no global state and no herding.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Scram authenticationsecurity · low: SCRAM-SHA-256 challenge-response login without sending the passwordRead write splittingstorage · low: Route reads to replicas and writes to the primary with lag-aware consistencyCircuit breakersystems · low: Stop calling a failing dependency for a while, probe it with trial calls, and resume on recovery: fail fast instead of piling up timeouts.›Connection poolingsystems · low: Reuse and multiplex backend connections with bounded pools, checkout queues and health evictionGraceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Hierarchical timing wheelsystems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.›Token bucketsystems · low: A bucket of up to b tokens refilled at rate r; requests spend tokens, enforcing an average rate while allowing bursts of b.›+ 4 more techniques+ 40 more primitives

Similar systems

Share the most building blocks with this one.