ARCHOS 525 BLUEPRINT · /d/dgm_int-connection-pooler
Database Connection Pooler Internals (PgBouncer Transaction Multiplexing)
8 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-connection-pooler) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-connection-pooler)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-connection-pooler" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Database Connection Pooler Internals (PgBouncer Transaction Multiplexing) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Stateless API Pods"]
ev_1["libevent Epoll Loop"]
auth_2["SCRAM Auth & TLS"]
queue_3[("Client Wait Queue")]
pool_4[("Server Conn Pool")]
db_5[("PostgreSQL Primary")]
met_6["SHOW POOLS Telemetry"]
downstream_7["Downstream & OTel"]
client_0 -->|"1. 500 app · TLS/SQL"| ev_1
ev_1 -->|"2. Verify · Auth"| auth_2
auth_2 -->|"3. Enqueue · FIFO"| queue_3
pool_4 -->|"Assign · TX Mode"| queue_3
pool_4 -->|"20 active · SQL"| db_5
met_6 -->|"Export · Metrics"| queue_3
queue_3 -.->|"4. Emit / · OTLP/API"| downstream_7COMPONENT STACK (8)
- Stateless API PodsSTATELESS500 concurrent conns
- libevent Epoll LoopSTATELESSNon-blocking TCP accept
- SCRAM Auth & TLSSTATELESSTerminates client TLS
- Client Wait QueueSTATEFULBounded wait_timeout queue
- Server Conn PoolSTATEFUL20 warm Postgres backends
- PostgreSQL PrimarySTATEFULProtected from conn storm
- SHOW POOLS TelemetrySTATELESScl_waiting & maxwait_us
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (7)
- Stateless API Pods → libevent Epoll Loop (500 app)[TLS/SQL]
- libevent Epoll Loop → SCRAM Auth & TLS (Verify)[Auth]
- SCRAM Auth & TLS → Client Wait Queue (Enqueue)[FIFO]
- Server Conn Pool → Client Wait Queue (Assign)[TX Mode]
- Server Conn Pool → PostgreSQL Primary (20 active)[SQL]
- SHOW POOLS Telemetry → Client Wait Queue (Export)[Metrics]
- Client Wait Queue → Downstream & OTel (Emit /)[OTLP/API]