Engineering Decision Guides

Side-by-side comparisons of competing approaches, with the criteria that matter, when to choose each option and a clear verdict.

API Gateway vs BFF vs Service Mesh Where should cross-cutting concerns and client-specific logic live? API gateway · Backend for Frontend (BFF) · Service mesh At-Most-Once vs At-Least-Once vs Effectively-Once What delivery guarantee do you need, and how do you get it? At-most-once · At-least-once · Effectively-once Atomic Update vs Pessimistic vs Optimistic Locking How should concurrent writes to the same data be controlled? Atomic conditional update · Pessimistic lock (SELECT … FOR UPDATE) · Optimistic version check · Constraint / upsert · Queue / single writer Build vs Buy vs Open Source Should your team build this capability, buy it, or adopt open source? Build · Buy (SaaS / vendor) · Open source (self-hosted) Cache-Aside vs Read-Through vs Write-Through vs Write-Behind Which caching pattern fits this data? Cache-aside · Read-through · Write-through · Write-behind Choosing a Transaction Isolation Level Which isolation level should this transaction run at? Read Committed · Repeatable Read (snapshot) · Serializable Choreography vs Orchestration How should services coordinate a multi-step business process? Choreography · Orchestration Circuit Breaker and Resilience Libraries by Stack Which resilience library should you use in your stack (or should the mesh do it)? Resilience4j (Java/Kotlin) · Polly (.NET) · opossum / cockatiel (Node.js) · tenacity / pybreaker / stamina (Python) · Service mesh (Envoy/Istio/Linkerd) Event Sourcing vs CRUD + Audit Log vs CDC How should you capture history and publish changes? CRUD + audit log · CDC (change data capture) · Event sourcing Full Sync vs Delta Sync vs CRDTs How should a mobile or offline-first app synchronize data with the server? Full snapshot sync · Delta sync (change tokens) · CRDT-based sync Hash vs Range vs Directory Sharding How should data be split across database shards? Hash sharding · Range sharding · Directory (lookup) sharding · Don't shard yet Hosted Checkout vs Embedded Fields vs Direct API How should your product integrate card payments with a PSP? Hosted checkout / redirect · Embedded fields / drop-in · Direct API with raw card data Kafka vs RabbitMQ vs SQS vs Redis Streams Which message broker fits your workload? Kafka · RabbitMQ · SQS / SNS · Redis Streams Offset vs Cursor vs Keyset Pagination How should a collection endpoint paginate? Offset / limit · Opaque cursor · Explicit keyset OpenAPI vs AsyncAPI vs Protobuf Which contract format should describe your API? OpenAPI · AsyncAPI · Protobuf (+ gRPC) Polling vs Push vs Persistent Connections for Mobile How should a mobile app learn about server-side changes? Periodic polling / sync on foreground · Push notifications (APNs/FCM) · Persistent connection (WebSocket/SSE) Polling vs Webhooks (vs Streaming) How should clients learn that something changed on your server? Polling · Webhooks · Streaming (SSE/WebSockets) Rate-Limit Algorithms Compared Which rate-limiting algorithm should you implement? Fixed window · Sliding window counter · Sliding log · Token bucket / GCRA · Leaky bucket (queue) REST vs GraphQL vs gRPC Which API style should you use for a new API? REST · GraphQL · gRPC Retry Strategies Compared How should clients retry failed calls? No retry · Immediate retry · Exponential backoff + jitter · Retry with budget + breaker Rewrite vs Incremental Refactor vs Strangler Fig How should you deal with a legacy system that slows the team down? Full rewrite · Incremental refactoring · Strangler fig Scaling Reads: Cache, Replicas or Read Models? Reads are overloading the database — where should they go? Fix queries and indexes · Cache (HTTP/CDN and Redis) · Read replicas · Read models / materialized views Sessions vs JWT vs Opaque Tokens for Mobile Apps What kind of credentials should a mobile app hold? Server session token · JWT access + rotating refresh token · Opaque access token + introspection Staff Engineer vs Tech Lead vs Team Lead vs Engineering Manager Which senior path fits what you want to spend your days on? Staff / principal engineer · Tech lead · Team lead · Engineering manager Story Points vs Throughput Forecasting vs No Estimates How should your team estimate and forecast delivery? Story points and velocity · Throughput forecasting (Monte Carlo) · No estimates (fixed time, variable scope) Streaming vs Synchronous vs Batch LLM Calls How should your application call an LLM for a given feature? Streaming · Synchronous request/response · Batch API / background queue Strong vs Eventual Consistency Which consistency guarantee does each part of your system need? Strong (linearizable) · Session guarantees · Eventual Team Structures: Stream-Aligned vs Component vs Platform Teams How should you organise engineering teams? Stream-aligned teams · Component / layer teams · Platform team · Enabling team Temporal vs Step Functions vs Queue + State Machine What should run your long-running business workflows? Temporal · AWS Step Functions · Queue + state machine (DIY) TTL vs Delete-on-Write vs Event-Driven Invalidation How should cached data be kept fresh? TTL only · Delete on write (in code) · Event-driven (outbox / CDC) · Versioned keys / generations URL vs Header vs Date-Based API Versioning How should you version an API when breaking changes are unavoidable? URL major version · Header / query version · Date-pinned per account · No versioning (evolution) WebSockets vs SSE vs Long Polling vs Webhooks How should your system push updates in real time? WebSockets · Server-Sent Events · Long polling · Webhooks Where to Store Idempotency Keys Database, Redis or both — where should idempotency records live? Same database as the business data · Redis only · Hybrid (Redis lock + DB record)