Benjamin Cane
Portrait of Benjamin Cane
Benjamin Cane
November 28, 2025

Does resource usage within your application or database suddenly spike periodically? Does it cause system slowdown? 🐢

A simple answer to your problem might be to add a bit of jitter (random timing delay).

When you schedule recurring tasks or loops, adding a bit of jitter can significantly improve how your application behaves.

📖 What is Jitter?

In simple terms, jitter is a small bit of randomness added to the time between two events.

While there are many types of jitter in computing, for this post, we will keep the scope to randomness, adding delay between events.

⚙️ Why it Matters:

When tasks don’t implement jitter, they can accidentally synchronize, running at the same time.

Which leads to:

  • CPU and Memory spikes
  • Thread contention
  • Request storms to downstream systems

🧩 A Simple Example

Imagine an API Gateway that caches responses. You decide to invalidate responses every 30 minutes with a scheduled thread.

No problem for a handful of APIs, but scale this to 1,000 APIs. Suddenly, every 30 minutes, 1,000 threads fire up at once.

The periodic spikes could cause performance issues or even crash the gateway.

Now add random Jitter: instead of running every 30 minutes, add or subtract a few random seconds for each task.

You’ve just spread out the load, making utilization smoother and more predictable.

⚠️ Caveats

Jitter isn’t perfect; this approach spreads out the load, but with random jitter, small spikes could still occur.

Still, for many scenarios, it’s a simple approach.

🧠 Final Thoughts

If you find your application slowing down periodically with spikes in resource utilization. You might be dealing with synchronized tasks, and adding random jitter might be a good solution.

It’s simple, it’s easy, and it usually works well.

Back to the feed

Next Post

  • December 5, 2025 Do you use Architecture Decision Records? I’m a big fan, and I think they’re a best practice every engineering org should adopt.

Previous Posts

  • November 21, 2025 When you shut down an application instance, don't stop the listener immediately — that's how you end up with failed requests during every application rollout. 😢
  • November 14, 2025 A common issue I see when teams first adopt gRPC is managing persistent connections, especially during failovers.
  • November 7, 2025 A dangerous mindset I’ve seen—and been guilty of—is assuming code doesn't change.

Made with Eleventy and a dash of #Bengineering energy.