Search
Lessons (40)
- Resilience Patterns
… AbortSignal.timeout(2000), // give up after 2 s }); 💡 Base timeouts on the dependency's p99 latency plus a …
- Timeouts, Retries & Backpressure
… This lesson is about stopping that. Three words you need Word Plain meaning Everyday example --- --- --- Timeout "I'll …
- AWS Messaging: Queues, Topics and Events
… Further reading: [SQS visibility timeout](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html), [SQS …
- Serverless: Lambda and API Gateway
… Successful curl requests alone do not prove browser CORS is correct. Timeout, capacity, and cold starts Select a …
- Async JavaScript: Promises, async/await and Node's Event Loop
… running work in parallel, handling errors, timeouts and cancellation with AbortController, and how Node.js orders nextTick, microtasks …
- Creational Patterns: How to Make Objects
… readable, step by step, with defaults class RequestBuilder { config = { method: "GET", headers: {}, timeout: 10 000, retries: 0 }; url …
- Event-Driven Patterns, Step Functions and Reliable Lambdas
… AWS recommends a visibility timeout of at least six times the function timeout plus the configured batch window …
- Concurrency, Resilience & Distributed Workflows
… A production job should have: - a durable queue and a unique job ID; - a visibility timeout or lease …
- Scaling, Load Balancing & Rate Limiting
… 5. Connection management: reuse connections, apply timeouts and limit slow clients. 6. Protection: enforce request-size limits, quotas …
- 10,000 Users Do Not Need 10,000 Database Connections
… Waiting requests hit their timeout. Users see errors. The tempting fix is "add more connections". That often makes …
- Payment Retries: Prevent Duplicate Charges
… A timeout or lost reply gives UNKNOWN , which a background job later resolves by asking the payment company …
- Design an E-Commerce Checkout
… A timeout is not a known failure. Walk through a failure The payment call times out . Did the …
- Putting AI Systems into Production
… Set timeouts and bounded retries with backoff; retries should not repeat unsafe side effects. Provide a clear fallback …
- Resilient Service Calls: Retries, Breakers and Load Shedding
… Only retry what is safe to repeat Retry only when: - the error is temporary (a timeout or "busy …
- Service Communication: Sync vs Async
… queues. Keeping sync calls safe - ⏱️ Always set timeouts. No timeout = one slow service can exhaust every thread. - 🔁 Retry …
- API Gateway, BFF & Service Discovery
… networking as infrastructure As services multiply, every one needs retries, timeouts, mutual TLS, metrics and tracing. Instead of …
- CI/CD and Reviewed Production Changes
… validate terraform test terraform plan -input=false -lock-timeout=5m -out=reviewed.tfplan terraform show -no-color reviewed …
- AWS Interview Questions: Clear Answers
… Receiving hides it for the visibility timeout. Delete it using the current receipt handle after successful processing. If …
- Nginx Reverse Proxy & HTTPS
… Gateway Timeout The app is too slow to answer App logs, slow queries, proxy read timeout 413 Request …
- Zero-Downtime Deploys & Rollbacks
… Nginx automatically retries the other instance while one is down ( proxy next upstream error timeout http 502; ). Database …
- Backend Design Scenarios
… A timeout means “unknown,” not “failed.” Use an outbox for internal payment events and a reconciliation job for …
- Resilience, Disaster Recovery and Multi-Region Design
… Pre-provision capacity rather than depending on scaling during an AZ failure. - Use timeouts, retries with exponential backoff …
- The Hot SKU Alert Problem
… a provider timeout . We asked the email provider to send, and the call timed out. Maybe it sent …
- Jenkins in Production: Deploys, Docker and Scaling
… docker' } // an agent that has Docker installed options { timeout(time: 30, unit: 'MINUTES') buildDiscarder(logRotator(numToKeepStr: '50')) disableConcurrentBuilds …
- Jenkins: From Install to Your First Pipeline
… Use declarative. groovy pipeline { agent any // run on any available agent options { timeout(time: 20, unit: 'MINUTES') // kill …
- AI Agents and Tool Use
… Handle timeouts, duplicate calls, partial failures, and retries. Record enough trace information to understand what happened without logging …
- VPC Networking Without the Confusion
… A TCP timeout suggests investigating the network path. A PostgreSQL authentication error shows that the client reached a …
- Go Web Services with Gin
… services take context.Context and return domain errors, mapped to HTTP in one place. - Configure server timeouts and …
- AI Evaluation, Safety, and Security
… For tool use, test argument validation, authorization, retries, timeouts, and harmful actions. Measure latency and cost alongside quality …
- Go Concurrency: Goroutines, Channels and Context
… return "", errors.New("timeout") // the goroutine above is now stuck } } go // ✅ Fix 1: a buffer of 1, so …
- AWS Databases: Choose the Right One
… A timeout suggests network/listening issues; an authentication error suggests credentials or database permissions. These require different fixes …
- Design a Reliable Notification System
… Don't guess after a timeout The provider might have sent the email and the answer just got …
- Design a Polite Web Crawler
… Fetch with a strict timeout and byte limit . 4. Save the response details and a checksum (fingerprint) of …
- Rust: Types, Errors and Concurrency
… let res = tokio::time::timeout(Duration::from secs(2), slow call()).await; // timeout Ok(()) } ⚠️ Never block inside async …
- Distributed Coordination: Consensus, Heartbeats and Gossip
… If you set the timeout too short, you'll "kill" healthy machines often. Too long, and real failures …
- Extending Kubernetes: CRDs, Operators and Admission
… Exclude kube-system and the webhook's own namespace, keep timeouts short, and run multiple replicas. Remember this …
- Capacity Planning, SLOs and Error Budgets
… A timeout counts as bad. A real "sold out" answer counts as a correct product result, not a …
- Kafka for Backend Services
… A long sleep can exceed the session timeout and trigger a rebalance. Use retry topics instead: shop.orders …
- How a Web Request Works
… Error, 502 Bad Gateway, 503 Unavailable, 504 Gateway Timeout 5. Your server code Inside the server, a request …
- Monolith vs Microservices
… function call that becomes a network call needs timeouts, retries, idempotency, authentication, monitoring and versioning. The middle path …