← back home

how I see distributed systems

what a microservices architecture looks like when I draw it from memory. no moving parts here — just the map, the neighborhoods, and a few notes to self. click any box if you want the long version.

the edgethe services — small, focused, replaceablestateevents & the slow laneuserscache-asideeventsconsumepsst — ~90% of readsnever actually reach the DBservices don’t call each other — they gossip through eventsone door. many rooms.fig. 1 — the system, from memoryClientbrowser · appCDN / Load Balancertraffic copAPI Gatewaysingle entry pointAuthstateless serviceOrderscore domainPaymentsmoves moneyRediscache · in-memoryPostgreSQLsource of truthKafkaevent backboneNotifierasync worker

click any box on the sketch…I wrote a note about each one, the way I’d explain it over coffee.

the whole idea, in five lines:

  1. a request lands at the front door — the gateway checks who you are and points you to the right room.
  2. reads try Redis first. the database is the backup plan, not the default.
  3. writes commit to PostgreSQL — the one box that is never allowed to lie.
  4. when something important happens, services publish a fact to Kafka instead of calling each other.
  5. slow work (emails, pushes, whatever) happens later in workers — nobody waits for it.