keystone
Backend engineering, distributed systems, security, and production tradeoffs, built and broken deliberately.
Concepts
Protocols, consistency, security, reliability, APIs, and runtime behavior.
Systems
PostgreSQL, Redis, Kafka, queues, caches, search, object storage, and coordination tools.
Labs
Small reproducible experiments that show failure modes before abstractions hide them.
Backend Engineering Map
-
Systems Toolbox guideA map of common backend building blocks and when each one belongs in an architecture.
-
Networking and Protocols coming
- HTTP/1.1, HTTP/2 multiplexing, HTTP/3 and QUIC
- TLS handshake, certificates, mTLS, and session resumption
- gRPC, protobuf, streaming, and flow control
- Connection pools, timeouts, retries, and backpressure
-
Storage and Databases in progress
- PostgreSQL overview: MVCC, Vacuum, Locking, Indexes, WAL
- PostgreSQL concurrency: lost updates in warehouse stock
- PostgreSQL MVCC: deep dive
- PostgreSQL indexes: deep dive
- PostgreSQL WAL for CDC
- PostgreSQL vacuum and locking
- PostgreSQL zero-downtime migrations: locks, queues, expand-contract
- Storage engines: B-tree vs LSM-tree
- Distributed storage: sharding, hot partitions, replica lag, failover
-
Redis and Caching in progress
- Overview, internals, use cases, and Lua scripts
- Caching: thundering herd and fill locks
- Rate limiting: fixed window vs sliding window
- Distributed locks: ownership tokens and safe release
- Streams: consumer groups, pending entries, and recovery
- Pub/Sub: fire-and-forget fan-out vs durable streams
- Sorted sets: leaderboard, ranking, and time indexes
- Persistence: RDB vs AOF
- Eviction, TTLs, memory pressure, and stale reads
- Cluster, Sentinel, replication, and failover
-
Messaging and Events in progress
- Kafka internals: partitions, ISR, and what an ack promises
- Delivery semantics: at-least-once, at-most-once, and idempotent consumers
- Outbox pattern + CDC: killing the dual-write gap
- RabbitMQ: acks, dead-letter queues, and redelivery ordering
- Consumer rebalancing: deep dive
- SQS: visibility timeout, FIFO vs standard, redrive policies
-
Distributed Systems coming
- CAP theorem in practice
- Consistency model ladder
- Raft: leader election and log replication
- Quorums, fencing tokens, and distributed locking
- Sagas, 2PC, and compensating transactions
- Consistent hashing and hot-key mitigation
-
Reliability and Resilience in progress
- Retry amplification, timeout budgets, and jitter
- Rate limiting: token bucket, leaky bucket, fixed window
- Circuit breakers, bulkheads, load shedding, and graceful degradation
- Background job retry semantics and deduplication
- Chaos experiments and failure-mode testing
-
Security and Auth in progress
- Encryption in transit, encryption at rest, and envelope encryption
- Webhook HMAC signatures, replay protection, and raw-body verification
- Password hashing: Argon2, bcrypt, salts, peppers, and migration
- JWT signing, key rotation, OAuth2, OIDC, and introspection
- Authorization models: RBAC, ABAC, policy engines, and tenancy boundaries
- Secrets management and container runtime security
-
Observability coming
- OpenTelemetry trace propagation
- Metrics, SLOs, alerting, and burn rates
- Prometheus cardinality explosions
- Structured logs, sampling, and correlation IDs
-
API and Schema Design coming
- REST resource modeling, pagination, and idempotency keys
- Backward-compatible schema evolution
- API contract testing and consumer-driven contracts
- GraphQL resolver batching and N+1 prevention
-
Deployment and Infrastructure coming
- Zero-downtime deployment and graceful draining
- Blue-green, canary, feature flags, and rollback
- Kubernetes disruption budgets and readiness gates
- Service discovery, API gateways, and traffic shifting
-
Runtime and Performance coming
- Threads, async I/O, event loops, and pool sizing
- GC pauses, memory pressure, and allocation patterns
- Syscalls, batching, zero-copy, and context switches
- Lock contention, atomics, and shared-memory pitfalls