# thundering herd

Published articles for thundering herd.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How Fixed Intervals Synchronize Distributed Clients and How Jitter Helps

DevFeed: [How Fixed Intervals Synchronize Distributed Clients and How Jitter Helps](<https://devfeed.tech/articles/jitter-is-the-cheapest-reliability-fix-you-are-not-using-39601.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/49-jitter-synchronised-clients/>)

Author: hello@ankit-rana.com

Published: 2026-09-07T00:00:00Z

Content type: opinion

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [reliability](<https://devfeed.tech/topics/reliability.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Network](<https://devfeed.tech/topics/network.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [jitter](<https://devfeed.tech/tags/jitter.md>), [network](<https://devfeed.tech/tags/network.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [retries](<https://devfeed.tech/tags/retries.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

Fixed retry intervals, TTLs, restarts, reconnects, and other recurring events can cause independent clients in distributed systems to synchronize, producing repeated load spikes. Adding randomness, or jitter, helps break that alignment; the article cites AWS measurements indicating that full jitter improves total work and completion time under contention.

### Source excerpt

Distributed systems synchronise themselves without being told to: every client that retries on a fixed interval, restarts after a deploy, or reconnects after a network blip ends up firing at the same moment as every other client. The resulting spike is a self-inflicted denial of service that no single component is responsible for. Adding randomness to any repeating interval breaks the alignment, and it is usually one line of code against a failure mode that otherwise requires capacity you never needed.

## Cache stampede: how one expired key takes down the database

DevFeed: [Cache stampede: how one expired key takes down the database](<https://devfeed.tech/articles/cache-stampede-how-one-expired-key-takes-down-the-database-39600.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/48-cache-stampede-expired-key/>)

Author: hello@ankit-rana.com

Published: 2026-09-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Database](<https://devfeed.tech/topics/database.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [cache-stampede](<https://devfeed.tech/tags/cache-stampede.md>), [caching](<https://devfeed.tech/tags/caching.md>), [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [jitter](<https://devfeed.tech/tags/jitter.md>), [query](<https://devfeed.tech/tags/query.md>), [redis](<https://devfeed.tech/tags/redis.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [traffic](<https://devfeed.tech/tags/traffic.md>), [ttl](<https://devfeed.tech/tags/ttl.md>)

### AI overview

This article explains how a cache stampede occurs when a hot key expires and many requests simultaneously recompute the same value against the database. It recommends TTL jitter to prevent synchronized expirations and request coalescing so only one caller recomputes while others wait or serve stale data. It also discusses cache warming and consistent hashing for broader cache-failure scenarios.

### Source excerpt

A cache TTL is a scheduled simultaneous failure: every request being served from one key misses at the same instant and goes to the origin together. If the recompute takes two seconds, every request arriving during those two seconds also misses, so the pileup grows faster than it drains. Jitter on the TTL stops keys expiring in lockstep, and request coalescing so only one caller recomputes while the rest wait or serve stale is what stops a single expensive key from saturating the database.

## Redesigning Kubernetes Workqueues and Resyncs to Reduce Thundering Herd Effects

DevFeed: [Redesigning Kubernetes Workqueues and Resyncs to Reduce Thundering Herd Effects](<https://devfeed.tech/articles/this-shit-is-hard-taming-the-thundering-herd-13289.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/this-shit-is-hard-taming-the-thundering-herd>)

Published: 2026-09-02T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Maintainers](<https://devfeed.tech/topics/maintainers.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [defense-in-depth](<https://devfeed.tech/tags/defense-in-depth.md>), [failover](<https://devfeed.tech/tags/failover.md>), [goroutines](<https://devfeed.tech/tags/goroutines.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [latency](<https://devfeed.tech/tags/latency.md>), [maintainers](<https://devfeed.tech/tags/maintainers.md>), [reconciliation](<https://devfeed.tech/tags/reconciliation.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

This article explains how Kubernetes controllers can experience thundering herd effects when restarts, leader failovers, or periodic resyncs cause many keys to enter an in-memory workqueue at once. It describes the queue and informer behavior behind the problem and introduces Chainguard's redesign of workqueues and resyncs to improve reconciliation under these conditions.

### Source excerpt

The thundering herd is an architecture problem. See how Chainguard redesigned workqueues and resyncs to keep reconciliation running smoothly.

## Understanding Load Balancing for Beginners

DevFeed: [Understanding Load Balancing for Beginners](<https://devfeed.tech/articles/understanding-load-balancing-for-beginners-17489.md>)

Original publisher: [Read original article](<https://kodekloud.com/blog/understanding-load-balancing-for-beginners/>)

Author: Pramodh Kumar M

Published: 2026-08-17T17:00:34Z

Content type: tutorial

Language: en

Sources: [Kubernetes - KodeKloud Blog | DevOps, Cloud, Kubernetes, AI Tutorials & More](<https://devfeed.tech/sources/kubernetes-kodekloud-blog-devops-cloud-kubernetes-ai-tutorials-more.md>)

Topics: [backends](<https://devfeed.tech/topics/backends.md>), [networking](<https://devfeed.tech/topics/networking.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [beginners](<https://devfeed.tech/tags/beginners.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [connection-draining](<https://devfeed.tech/tags/connection-draining.md>), [devops](<https://devfeed.tech/tags/devops.md>), [failover](<https://devfeed.tech/tags/failover.md>), [health-checks](<https://devfeed.tech/tags/health-checks.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [layer-4-vs-layer-7](<https://devfeed.tech/tags/layer-4-vs-layer-7.md>), [least-connections](<https://devfeed.tech/tags/least-connections.md>), [load-balancer](<https://devfeed.tech/tags/load-balancer.md>), [load-balancer-for-beginners](<https://devfeed.tech/tags/load-balancer-for-beginners.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [load-balancing-algorithms](<https://devfeed.tech/tags/load-balancing-algorithms.md>), [networking](<https://devfeed.tech/tags/networking.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [round-robin](<https://devfeed.tech/tags/round-robin.md>), [session-affinity](<https://devfeed.tech/tags/session-affinity.md>), [sre](<https://devfeed.tech/tags/sre.md>), [sticky-sessions](<https://devfeed.tech/tags/sticky-sessions.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [traffic-management](<https://devfeed.tech/tags/traffic-management.md>)

### AI overview

This beginner-oriented article explains load balancing as both traffic distribution and backend failure detection. It compares round robin and least-connections algorithms, distinguishes Layer 4 from Layer 7 routing, and discusses health checks, failover, draining, sticky sessions, and the risks of overly aggressive checks.

### Source excerpt

Spreading traffic is the easy half of load balancing. The half that decides whether an outage lasts ten seconds or ten minutes is noticing that a backend has stopped working, and most health checks cannot.

## The Thundering Herd Problem in Agentic AI: Why Traditional Fixes Fall Short

DevFeed: [The Thundering Herd Problem in Agentic AI: Why Traditional Fixes Fall Short](<https://devfeed.tech/articles/the-thundering-herd-problem-in-agentic-ai-why-traditional-fixes-fall-short-23739.md>)

Original publisher: [Read original article](<https://cockroachlabs.com/blog/agentic-ai-thundering-herd-problem>)

Author: Quentin Packard

Published: 2026-06-19T00:00:00Z

Content type: article

Language: en

Sources: [Cockroach Labs](<https://devfeed.tech/sources/cockroach-labs.md>)

Topics: [Agentic AI Architecture](<https://devfeed.tech/topics/agentic-ai-architecture.md>), [agent orchestration](<https://devfeed.tech/topics/agent-orchestration.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [agent-orchestration](<https://devfeed.tech/tags/agent-orchestration.md>), [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [ai-architecture](<https://devfeed.tech/tags/ai-architecture.md>), [load-testing](<https://devfeed.tech/tags/load-testing.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

This article examines how agentic AI can create a thundering herd through intentional fan-out and parallel execution. It argues that traditional mitigations only partly transfer because agent-generated synchronization can produce a sharp saturation point that staging load tests may not reveal.

### Source excerpt

The thundering herd of the past was externally triggered.

## Scaling Nextdoor's Datastores: Part 3

DevFeed: [Scaling Nextdoor's Datastores: Part 3](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-3-20342.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-3-e9b4dd8a9393?source=rss----5e54f11cdfdf---4>)

Author: Ronak Shah

Published: 2025-03-19T15:08:43Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [schema-evolution](<https://devfeed.tech/topics/schema-evolution.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Django](<https://devfeed.tech/topics/django.md>), [Python](<https://devfeed.tech/topics/python.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [valkey](<https://devfeed.tech/topics/valkey.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching](<https://devfeed.tech/tags/caching.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [database](<https://devfeed.tech/tags/database.md>), [django](<https://devfeed.tech/tags/django.md>), [lua](<https://devfeed.tech/tags/lua.md>), [python](<https://devfeed.tech/tags/python.md>), [redis](<https://devfeed.tech/tags/redis.md>), [schema](<https://devfeed.tech/tags/schema.md>), [serialization-format](<https://devfeed.tech/tags/serialization-format.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [valkey](<https://devfeed.tech/tags/valkey.md>)

### AI overview

Part 3 of Nextdoor's datastore-scaling series explains how applications serialize database objects for Redis or Valkey look-aside caches. It describes compatibility problems caused by runtime, package, and schema changes, including cache misses and thundering-herd effects during migrations.

### Source excerpt

In this part of the Scaling Nextdoor's Datastores blog series, we'll explore how the Core-Services team at Nextdoor serializes database data for caching while ensuring forward and backward compatibility between the cache and application code. In part 1 of this series we discussed how ORMs, object-relational mapping frameworks, help abstract away database specific schemas and queries from application code. Developers simply utilize objects in their application's language to access database data. Here's a simple example of using Python's Django ORM to define a model: from django.db import models class Users(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) The associated SQL create table would look like: CREATE TABLE users ( "id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "first_name" varchar(30) NOT NULL, "last_name" varchar(30) NOT NULL ); Developers would then access database data like this: user_id = 123 user = User.objects.get(id=user_id) print(user.first_name)Object Byte Serialization for Caching An issue arises when adding a look-aside cache such as Redis/Valkey to an application: How do you store what you got from the database in the cache? A common solution to caching complex objects, such as those from ORMs, is object byte serialization. This process converts language objects into bytes before storing them in the cache. When reading from the cache the process is done in reverse where the byte data is turned into language objects. For instance in Python this is often done with the pickle package. The interaction between the application, database, and the cache looks like this: Look-Aside Cacheimport pickle # Try getting from cache ('None' if not in cache) user_bytes = cache.get("user_123") if user_bytes is not None: # Read bytes using pickle user = pickle.loads(user_bytes) else: # Fetch from database user = User.objects.get(id=123) # Convert to bytes user_bytes = pickle.dumps(user) # Sto

## The Thundering Herd Problem

DevFeed: [The Thundering Herd Problem](<https://devfeed.tech/articles/the-thundering-herd-problem-17852.md>)

Original publisher: [Read original article](<https://encore.dev/blog/thundering-herd-problem>)

Author: Matt Boyle

Published: 2024-01-30T00:00:00Z

Content type: article

Language: en

Sources: [Encore Updates](<https://devfeed.tech/sources/encore-updates.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [incident](<https://devfeed.tech/topics/incident.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [incident](<https://devfeed.tech/tags/incident.md>), [latency](<https://devfeed.tech/tags/latency.md>), [scale](<https://devfeed.tech/tags/scale.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

An account of a 2018 incident in which a feature launch sent notifications to customers and enabled a waitlist, triggering a thundering herd of requests. The resulting service crashes, high latency, and high CPU usage illustrate how retries and unreliable networks can overload an API and its dependencies.

### Source excerpt

Distributed Systems Horror Stories: Part Two

## Epoll's design limitations in multithreaded and load-balancing scenarios

DevFeed: [Epoll's design limitations in multithreaded and load-balancing scenarios](<https://devfeed.tech/articles/epoll-is-fundamentally-broken-1-2-38959.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12>)

Author: Marek

Published: 2017-02-19T23:00:00Z

Content type: opinion

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [IO](<https://devfeed.tech/topics/io.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>)

Tags: [epoll](<https://devfeed.tech/tags/epoll.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [threading](<https://devfeed.tech/tags/threading.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

This article examines design limitations in Linux epoll, focusing on event delivery when file descriptors are shared across worker threads and on epoll's association with underlying kernel objects rather than file descriptors. It recommends defensive programming and avoiding several sharing, forking, and load-balancing patterns.

### Source excerpt

Epoll is fundamentally broken 1/2 I/O multiplexing part #3 In previous articles we talked about: This time we'll focus on Linux's successor - the I/O multiplexing syscall. Epoll is relatively young. It was created by Davide Libenzi in 2002. For comparison: Windows did IOCP in 1994 and FreeBSD's kqueue was introduced in July 2000. Unfortunately, even though epoll is the youngest in the advanced IO multiplexing family, it's the worse in the bunch.

## Building NSQ Client Libraries

DevFeed: [Building NSQ Client Libraries](<https://devfeed.tech/articles/building-nsq-client-libraries-19702.md>)

Original publisher: [Read original article](<https://word.bitly.com/post/50027069647>)

Author: Wordbitly

Published: 2013-05-09T18:58:23Z

Content type: tutorial

Language: en

Sources: [Bitly](<https://devfeed.tech/sources/bitly.md>)

Topics: [Messaging](<https://devfeed.tech/topics/messaging.md>), [client](<https://devfeed.tech/topics/client.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [servers](<https://devfeed.tech/topics/servers.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [client-library](<https://devfeed.tech/tags/client-library.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [developers](<https://devfeed.tech/tags/developers.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [guide](<https://devfeed.tech/tags/guide.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [message-queue](<https://devfeed.tech/tags/message-queue.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [nsq](<https://devfeed.tech/tags/nsq.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

A guide to the responsibilities and design expectations of NSQ client libraries, focusing on consumers. It covers configuration, discovery, TCP connections, message handling, pipelining, asynchronous processing, and techniques for maintaining cluster robustness and performance.

### Source excerpt

Brace yourself, this is a long one. The following guide was originally intended for client library developers to describe in detail all the important features and functionality we expected in an NSQ client library. While writing it we began to realize that it had value beyond client library developers. It incorporates a comprehensive analysis of most of the capabilities of NSQ (both client and server) and is therefore interesting and useful for end-users as well (or anyone using or interested in infrastructure messaging platforms). If you need some background on NSQ please see our original blog post or its follow up, spray some NSQ on it. Intro NSQ's design pushes a lot of responsibility onto client libraries in order to maintain overall cluster robustness and performance. This guide attempts to outline the various responsibilities well-behaved client libraries need to fulfill. Because publishing to nsqd is trivial (just an HTTP POST to the /put endpoint), this document focuses on consumers. By setting these expectations we hope to provide a foundation for achieving consistency across languages for NSQ users. Overview Configuration Discovery (optional) Connection Handling Feature Negotiation Data Flow / Heartbeats Message Handling RDY State Backoff Configuration At a high level, our philosophy with respect to configuration is to design the system to have the flexibility to support different workloads, use sane defaults that run well "out of the box", and minimize the number of dials. A client subscribes to a topic on a channel over a TCP connection to nsqd instance(s). You can only subscribe to one topic per connection so multiple topic consumption needs to be structured accordingly. Using nsqlookupd for discovery is optional so client libraries should support a configuration where a client connects directly to one or more nsqd instances or where it is configured to poll one or more nsqlookupd instances. When a client is configured to poll nsqlookupd the polling int