typescript
5 minNode.js Foundations: Event Loop Work, Backpressure, and Cancellation
Keep request handlers responsive by distinguishing asynchronous waiting from CPU work, bounding concurrency, and propagating stream failures.
Loading page...
typescript
5 minKeep request handlers responsive by distinguishing asynchronous waiting from CPU work, bounding concurrency, and propagating stream failures.
python
8 minA practical guide to request concurrency, connection pools, timeouts, and overload behavior in async Python APIs.
Q&A
Q&ANo; an adapter can hide an unbounded push queue behind a pull-shaped interface.
A consumer can request one item at a time, but callback-backed sources still need an explicit capacity and overflow policy. Tie early iterator exit and cancellation to resource cleanup.
Q&A
Q&ABound concurrency and queue depth at the scarce resource, and enforce an end-to-end deadline.
Use bounded connection pools, semaphores or worker queues, request deadlines, and deliberate overload responses. Local limits must account for replica count because each replica has its own pool. Avoid unbounded in-memory tasks and retries that amplify load during an incident.
Q&A
Q&ANative stack memory, scheduling overhead, context switching, and file descriptors can be exhausted.
Each platform thread consumes native resources, including stack reservation, and excessive runnable threads add scheduling and context-switching overhead. The service may hit native-thread creation errors or degrade before that point. Bound executors, measure queue depth and task latency, and apply backpressure rather than creating one thread per unbounded unit of work.
distributed systems
12 minConsumer groups are the mechanism that turns Kafka partitions into scalable, failure-tolerant work units. Learn how rebalances, offsets, and lag interact under load before you ship your first serious pipeline.
Q&A
Q&ARollback restores code, not every side effect. Expand-and-contract changes preserve compatibility during overlap, and recovery assumptions must be exercised.
Rollback restores code, not every side effect. Expand-and-contract changes preserve compatibility during overlap, and recovery assumptions must be exercised.
java
11 minSeparate heap pressure from thread-stack failure, collect the right evidence, and fix the retention path rather than masking symptoms.