- Slow reads → Add a cache
- Write spikes → Buffer with a queue
- Too much traffic → Add a load balancer
- Read-heavy DB → Add read replicas
- Write-heavy DB → Shard the data
- Slow queries → Add indexes
- Slow file loads → Object storage + CDN
- Temporary failures → Retry with backoff
- Too many requests → Rate limiting
- One service failing → Circuit breaker
- Duplicate requests → Idempotency keys
- Can't see what broke → Logs, metrics, tracing
- One server can't handle the load → Stateless services + horizontal scaling
- Slow API due to heavy work → Background jobs (return 202, check status later)
- Cache stampede on popular keys → TTL jitter + request coalescing
- Stale cache data → TTL + invalidation on write/events
- DB connections exhausted → Connection pooling
- N+1 queries → Eager loading / batching (DataLoader)
- Huge list responses → Cursor-based pagination
- Slow text search → Search engine (Elasticsearch/OpenSearch) or full-text index
- Analytics slowing the production DB → Separate warehouse/replica (OLAP) fed via CDC
- Global users, high latency → CDN + multi-region
- Large file uploads → Presigned URLs + multipart upload
- Need real-time updates → WebSocket / SSE
- Hot key / hot shard → Better shard key, consistent hashing, key salting
- Single point of failure → Redundancy + health checks + automatic failover
- Slow downstream drags everything down → Timeouts + bulkheads + load shedding
- Retry storms → Exponential backoff + jitter + retry budget
- Poison messages that keep failing → Dead-letter queue
- Data loss risk → Replication + backups + point-in-time recovery (test your restores)
- Risky deployments → Canary/blue-green + feature flags + rollback plan
- Dependency is down → Graceful degradation / fallback
- Transaction across services → Saga pattern
- DB write and event publish can diverge → Transactional outbox
- Concurrent updates overwrite each other → Optimistic locking (version column)
- Duplicate or out-of-order messages → Idempotent consumers + version/sequence numbers
- User doesn't see their own write (replica lag) → Read-your-writes (read from primary briefly)
- Schema change without downtime → Expand/contract migrations
- Need an audit trail → Append-only audit log
- Cron job runs twice on multiple instances → Distributed lock / leader election
- Unauthorized access → AuthN + AuthZ (OAuth2/OIDC, RBAC), checks always server-side
- Bots / DDoS / abuse → WAF + CDN + rate limiting
- Leaked secrets → Secrets manager, never in code or repo
- Fake webhooks → Signature verification
- Injection attacks → Parameterized queries + input validation
- One tenant hogs resources (noisy neighbor) → Per-tenant quotas and rate limits
- Team blocked by shared deploys → Modular monolith first, microservices only when truly needed
- Cloud cost growing → Autoscaling + right-sizing + budget alerts
- Config change needs a deploy → Feature flags / config service
- LLM doesn't know your private or fresh data → RAG
- Answers need citations or per-user permissions → RAG
- One small document fits in context → Long context (+ prompt caching)
- Need consistent style, format, behavior → Fine-tuning
- Hallucinations → Grounding (RAG) + "I don't know" fallback + evals
- High LLM cost → Prompt caching + model routing + response caching
- Broken output format → Structured output (JSON schema) + validation + retry
- LLM provider rate limits or outage → Queue + backoff + fallback model/provider
- Quality regressions → Eval set
- Prompt injection → Least-privilege tools + human approval for risky actions
- Fixed multi-step LLM task → Workflow (chaining, routing)
- Unknown steps, needs tool feedback → Agent (with step and cost limits)
- Multi-hop questions → Agentic RAG
Top comments (0)