Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_db-scaling-ladder-v3

Database scaling ladder (indexes, replicas, partitions)

8 COMPONENTS · 10 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Database scaling ladder (indexes, replicas, partitions) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_db-scaling-ladder-v3/opengraph-image)](https://archos.sageideas.dev/d/dgm_db-scaling-ladder-v3)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_db-scaling-ladder-v3)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_db-scaling-ladder-v3" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Database scaling ladder (indexes, replicas, partitions) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Mobile Client")]
  capacity_1["Capacity estimate"]
  app_2["Application server"]
  pool_3["Connection pooler"]
  l1_4[("PostgreSQL")]
  r1_5[("Read replica")]
  l2_6[("PostgreSQL")]
  r2_7[("Read replica")]
  client_0 -->|"1. Requests · HTTPS"| app_2
  app_2 -->|"2. Queries · SQL"| pool_3
  pool_3 -->|"3a. Writes · SQL"| l1_4
  pool_3 -->|"3b. Reads · SQL"| r1_5
  pool_3 -->|"3c. Writes · SQL"| l2_6
  l1_4 -->|"4a. Copies the log · TCP"| r1_5
  l2_6 -->|"4b. Copies the log · TCP"| r2_7
  r1_5 -->|"5. Replies · SQL"| pool_3
  pool_3 -->|"6. Replies · SQL"| app_2
  app_2 -->|"7. Replies · HTTPS"| client_0

COMPONENT STACK (7)

  • Mobile ClientSTATEFUL
    Reads and writes orders from a phone
  • Application serverSTATELESS
    Hashes the key to pick a shard
  • Connection poolerSTATELESS
    Reuses a few database connections
  • PostgreSQLSTATEFUL
    Leader: takes writes; B-tree index, range split
  • Read replicaSTATEFUL
    Serves reads from a copy of the leader
  • PostgreSQLSTATEFUL
    Leader: takes writes; B-tree index, range split
  • Read replicaSTATEFUL
    Serves reads from a copy of the leader

REQUEST & DATA FLOW (10)

  1. Mobile Client → Application server (Requests)[HTTPS]
  2. Application server → Connection pooler (Queries)[SQL]
  3. Connection pooler → PostgreSQL (Writes)[SQL]
  4. Connection pooler → Read replica (Reads)[SQL]
  5. Connection pooler → PostgreSQL (Writes)[SQL]
  6. PostgreSQL → Read replica (Copies the log)[TCP]
  7. PostgreSQL → Read replica (Copies the log)[TCP]
  8. Read replica → Connection pooler (Replies)[SQL]
  9. Connection pooler → Application server (Replies)[SQL]
  10. Application server → Mobile Client (Replies)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →