DEV Community

Ryan Peterman
Ryan Peterman

Posted on β€’ Originally published at developing.dev

1

Threads' Invisible Armor

πŸ‘‹ Hi, this is Ryan with another edition of my weekly newsletter. Each week, I write about software engineering, big tech/startups and career growth. Thank you for your continued readership, we crossed 5,000 readers this week πŸ™ πŸŽ‰


The recent viral Threads launch got me thinking about how tech companies prepare for major events. For instance, how do you think Amazon prepares for a 50% traffic spike on Prime Day? There's a lot of work that goes on behind the scenes to make sure these services can handle these traffic spikes. If everything goes well, users shouldn't notice anything. Here's what this hidden operational excellence looks like.

Image description

Conservative Projections

First, we need to figure out how much traffic we're expecting. Accurate predictions are tough; the goal here is to get a rough estimate. In general, we should overestimate how much traffic we expect to be better prepared.

There are many ways to get these projections. One of the most common ways is to use past data along with your product's current growth rate. In most cases, we'd have folks on the data science side come up with a sensible estimate.

Shadow Traffic Testing

Now that we have an estimate, we can test how our system handles the load we'd expect. My favorite way to test this is to duplicate existing production traffic in a sandboxed environment. These "shadow" requests will exercise the system but will not write to any production databases. That way, we can monitor system health metrics like throughput, latency, and utilization under increased load. There are two reasons load testing like this works well:

  1. Easy Setupβ€Š---β€ŠWe piggyback off existing scale and code paths. This makes it simple to set up, despite the complexity involved in confirming these "shadow requests" execute in a sandboxed environment.

  2. Simulates Production Inputsβ€Š---β€ŠSince we copy existing production traffic, we exercise a wide variety of inputs in proportions that match real traffic.

This "shadow traffic" testing is also called "replay traffic" testing by Netflix. See the section where they mention "load testing"; it's a great read.

When your system is at peak load, that's the best opportunity to test any graceful degradation mechanisms. If your system has any knobs that can shed optional load, turn them on and monitor how much they help. You don't want to wait until launch day to confirm these mitigation tactics work.

People Preparation

The most underrated part of preparing for an important launch is making sure your team is ready. This means we should update runbooks and arrange oncall shifts in advance. Oncalls get fatigued if your system is under load into the night. Having shifts helps distribute the burden among the team.

Lastly, you'll want to set up some preemptive communication channels in case things go wrong. This is critical if your infrastructure spans many relevant oncalls. If something happens you don't want people to waste time finding the right place to escalate in.

Digital products can have viral growth moments (e.g. Threads). It's important to capture that growth. Infrastructure preparation ensures that users get a reliable experience during business-critical launches. Otherwise, your product could end up like BeReal, which lost users due to lagging and crashes at its peak.

Join 5000+ software engineers from companies like Google, Meta, and Amazon who receive new posts and support my work on Substack

Thanks for reading,
Ryan Peterman

Image of Wix Studio

2025: Your year to build apps that sell

Dive into hands-on resources and actionable strategies designed to help you build and sell apps on the Wix App Market.

Get started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay