The data layer: cache, replicas, shards and backups

Scroll or pinch to zoom, drag to move, double-click to zoom in 100% SVG PNG Back to the post
Architecture: app containers check a Redis cache, then route by hash of user id to one of two PostgreSQL shards; each shard has a primary taking writes and a replica serving reads, and replicas are backed up off-site.