Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_proximity-service

Proximity service (cell index, cache-aside, hash-partitioned store)

8 COMPONENTS · 9 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Proximity service (cell index, cache-aside, hash-partitioned store) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_proximity-service/opengraph-image)](https://archos.sageideas.dev/d/dgm_proximity-service)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_proximity-service)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_proximity-service" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Proximity service (cell index, cache-aside, hash-partitioned store) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Mobile Client")]
  gw_1["API gateway"]
  svc_2["Resource server"]
  cache_3[("Distributed cache")]
  store_4[("System of record")]
  tsdb_5[("Time-series database (TSDB)")]
  alerting_6[("Alerting")]
  capacity_7["Capacity Estimate"]
  client_0 -->|"1. Asks with JWT · HTTPS"| gw_1
  gw_1 -->|"2. Forwards (mTLS) · HTTP/2"| svc_2
  svc_2 -->|"3a. Reads cells · TCP"| cache_3
  svc_2 -->|"3b. Reads on a miss · HTTPS"| store_4
  svc_2 -->|"3c. Fills cells · TCP"| cache_3
  svc_2 -->|"3d. Returns businesses · HTTP/2"| gw_1
  gw_1 -->|"4. Returns results · HTTPS"| client_0
  tsdb_5 -->|"Scrapes hit ratio, latency · HTTPS"| svc_2
  tsdb_5 -->|"Feeds alerts · HTTP"| alerting_6

COMPONENT STACK (7)

  • Mobile ClientSTATEFUL
    Asks for businesses near a point
  • API gatewaySTATELESS
    Checks the JWT on every request
  • Resource serverSTATELESS
    Search service: cell ids, then exact distance
  • Distributed cacheSTATEFUL
    One entry per cell; expires by TTL
  • System of recordSTATEFUL
    Hash-partitioned by cell id
  • Time-series database (TSDB)STATEFUL
    Stores hit ratio and search latency
  • AlertingSTATEFUL
    Pages on-call when latency or misses grow

REQUEST & DATA FLOW (9)

  1. Mobile Client → API gateway (Asks with JWT)[HTTPS]
  2. API gateway → Resource server (Forwards (mTLS))[HTTP/2]
  3. Resource server → Distributed cache (Reads cells)[TCP]
  4. Resource server → System of record (Reads on a miss)[HTTPS]
  5. Resource server → Distributed cache (Fills cells)[TCP]
  6. Resource server → API gateway (Returns businesses)[HTTP/2]
  7. API gateway → Mobile Client (Returns results)[HTTPS]
  8. Time-series database (TSDB) → Resource server (Scrapes hit ratio, latency)[HTTPS]
  9. Time-series database (TSDB) → Alerting (Feeds alerts)[HTTP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →