How do you approach retries and timeouts across a chain of services?
AdvancedProductionLoad Balancing, Proxies & nginx in Production
Answer
Set deadlines that shrink down the chain (client 3s, gateway 2.5s, service 2s, DB 1s) so inner calls never outlive outer ones. Retry only idempotent calls, with exponential backoff and jitter, limit retries at one layer (typically the outermost) and apply retry budgets of about 10%.
Retries at every layer multiply: three layers with three tries each is 27 requests for one user action.
More on Load Balancing, Proxies & nginx in Production
How do you choose between ALB, NLB and an nginx or Envoy fleet?IntermediateHow do you tune ALB idle timeout and backend keep-alive to avoid 502s?IntermediateWhich nginx directives matter most for a production reverse proxy?IntermediateHow do you do rate limiting and abuse protection in nginx?IntermediateHow do you achieve zero-downtime configuration reloads in nginx and HAProxy?IntermediateHow would you design a highly available load-balancing tier on-prem or in a colo?Advanced