Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_py-http-service-concurrency-models

Python HTTP service concurrency models (ASGI, workers, thread pools)

7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-23
GITHUB README / PR PREVIEW CARD
[![Python HTTP service concurrency models (ASGI, workers, thread pools) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_py-http-service-concurrency-models/opengraph-image)](https://archos.sageideas.dev/d/dgm_py-http-service-concurrency-models)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_py-http-service-concurrency-models)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_py-http-service-concurrency-models" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Python HTTP service concurrency models (ASGI, workers, thread pools) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Client application")]
  nginx_1["Reverse proxy"]
  asgi_2["Container runtime"]
  threads_3["Fanout workers"]
  pool_4["Connection pooler"]
  db_5[("PostgreSQL")]
  sink_6[("Client application")]
  client_0 -->|"1. Bursts · HTTPS"| nginx_1
  nginx_1 -->|"2. Balances · HTTP/2"| asgi_2
  asgi_2 -->|"3a. Offloads · TCP"| threads_3
  asgi_2 -->|"3b. Async I/O · SQL"| pool_4
  pool_4 -->|"4. Runs SQL · SQL"| db_5
  db_5 -->|"5. Low p99 · HTTPS"| sink_6

COMPONENT STACK (7)

  • Client applicationSTATEFUL
    Concurrent HTTP/2
  • Reverse proxySTATELESS
    Nginx buffers slow I/O
  • Container runtimeSTATELESS
    Uvicorn async loop
  • Fanout workersSTATELESS
    Offloads blocking I/O
  • Connection poolerSTATELESS
    Async DB pool cap
  • PostgreSQLSTATEFUL
    Non-blocking queries
  • Client applicationSTATEFUL
    Zero loop stalls

REQUEST & DATA FLOW (6)

  1. Client application → Reverse proxy (Bursts)[HTTPS]
  2. Reverse proxy → Container runtime (Balances)[HTTP/2]
  3. Container runtime → Fanout workers (Offloads)[TCP]
  4. Container runtime → Connection pooler (Async I/O)[SQL]
  5. Connection pooler → PostgreSQL (Runs SQL)[SQL]
  6. PostgreSQL → Client application (Low p99)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →