Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_photo-sharing

Photo sharing (presigned uploads, CDN and fan-out feeds)

12 COMPONENTS · 15 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Photo sharing (presigned uploads, CDN and fan-out feeds) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_photo-sharing/opengraph-image)](https://archos.sageideas.dev/d/dgm_photo-sharing)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_photo-sharing)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_photo-sharing" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Photo sharing (presigned uploads, CDN and fan-out feeds) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  app_0[("Photo app")]
  gw_1["API gateway"]
  cdn_2[("Content delivery network (CDN)")]
  photo_3["Photo service"]
  obj_4[("Object storage")]
  tsdb_5[("Time-series database (TSDB)")]
  metadb_6[("Metadata store")]
  cdc_7[("Change Data Capture (CDC)")]
  queue_8[("Message queue")]
  worker_9["Fanout workers"]
  feed_10[("Distributed cache")]
  capacity_11["Capacity Estimate"]
  app_0 -->|"1. Calls with JWT · HTTPS"| gw_1
  gw_1 -->|"2. Forwards (mTLS) · HTTP/2"| photo_3
  photo_3 -->|"3. Returns URL · HTTP/2"| gw_1
  gw_1 -->|"4. URL · HTTPS"| app_0
  app_0 -->|"5. Uploads with URL · HTTPS"| obj_4
  obj_4 -->|"6. Notifies upload done · HTTPS"| photo_3
  photo_3 -->|"7. Saves record · HTTPS"| metadb_6
  metadb_6 -->|"8. Streams changes · HTTPS"| cdc_7
  cdc_7 -->|"9. Publishes reference · TCP"| queue_8
  queue_8 -->|"10. Delivers reference · TCP"| worker_9
  worker_9 -->|"11. Updates feeds · TCP"| feed_10
  app_0 -->|"Fetches photo · HTTPS"| cdn_2
  cdn_2 -->|"Fills on miss · HTTPS"| obj_4
  photo_3 -->|"Reads feed first · TCP"| feed_10
  tsdb_5 -->|"Scrapes queue lag · HTTPS"| queue_8

COMPONENT STACK (11)

  • Photo appSTATEFUL
    Uploads photos and opens the feed
  • API gatewaySTATELESS
    Checks the JWT, then forwards the call
  • Content delivery network (CDN)STATEFUL
    Caches photos near the viewer
  • Photo serviceSTATELESS
    Signs upload URLs, saves records, reads feeds
  • Object storageSTATEFUL
    Holds the photo files
  • Time-series database (TSDB)STATEFUL
    Stores queue lag
  • Metadata storeSTATEFUL
    Photo records and the follower list
  • Change Data Capture (CDC)STATEFUL
    Reads new records from the change stream
  • Message queueSTATEFUL
    Holds references, not photo files
  • Fanout workersSTATELESS
    Add the photo to each follower feed
  • Distributed cacheSTATEFUL
    Holds each feed as a sorted set of ids

REQUEST & DATA FLOW (15)

  1. Photo app → API gateway (Calls with JWT)[HTTPS]
  2. API gateway → Photo service (Forwards (mTLS))[HTTP/2]
  3. Photo service → API gateway (Returns URL)[HTTP/2]
  4. API gateway → Photo app (URL)[HTTPS]
  5. Photo app → Object storage (Uploads with URL)[HTTPS]
  6. Object storage → Photo service (Notifies upload done)[HTTPS]
  7. Photo service → Metadata store (Saves record)[HTTPS]
  8. Metadata store → Change Data Capture (CDC) (Streams changes)[HTTPS]
  9. Change Data Capture (CDC) → Message queue (Publishes reference)[TCP]
  10. Message queue → Fanout workers (Delivers reference)[TCP]
  11. Fanout workers → Distributed cache (Updates feeds)[TCP]
  12. Photo app → Content delivery network (CDN) (Fetches photo)[HTTPS]
  13. Content delivery network (CDN) → Object storage (Fills on miss)[HTTPS]
  14. Photo service → Distributed cache (Reads feed first)[TCP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →