AdvertiseDonate
Newz Spotlight · 370 Main Street, 11th & 12th Floor, Worcester, MA
Business · Yonkers

Peak Load Exposes Hidden Bottlenecks First

An enterprise app handling 500 requests a second can collapse when traffic hits 2,000, and the first sign is rising latency not a server failure.

By Allison Girard ·

Illustration for: Peak Load Exposes Hidden Bottlenecks First
Illustration generated for this article, not a news photograph.

An enterprise application that handles 500 requests a second for months can break in minutes when a seasonal sale, a payroll run or a burst of customer activity pushes it to 2,000. Response times stretch, requests time out, and teams that looked fine an hour earlier are suddenly fielding failures across several systems at once.

The server is rarely the first thing to give way. The assumption that every component can keep pace with every other one tends to go first. In tightly coupled systems services lean on each other to finish even routine work, so a slowdown in one passes straight to whatever is waiting on it.

The first warning is usually a slowdown, not an outage. An online retailer processing an order may check inventory, ask for payment authorization, update a customer record and start fulfillment in a chain of synchronous calls. On a normal day that works. At peak one slow dependency can hold up hundreds or thousands of requests and the damage compounds quickly. Requests wait longer on downstream services, connection pools fill because earlier requests have not finished, threads sit occupied by work that cannot move forward, and more requests time out while users retry.

Extra servers help when raw compute is the constraint. They do nothing for a saturated database, a small connection pool or a downstream service that cannot go faster. Average response time hides the problem, so engineers look at high-percentile latency, queue lengths, connection usage and timeout rates to find where requests begin to wait and why.

One slow service becomes everyone’s problem. If an order service calls a payment service which depends on a database already under strain, the order service waits. New orders keep arriving and keep consuming resources. Eventually the order service starts timing out too even though its own CPU and memory look healthy. That is a cascading failure.

Retries pile on top of it. Failed requests get tried again, and if thousands of clients do that at once an overloaded service receives more traffic exactly when it can least cope. Amazon’s Builders’ Library article on timeouts, retries and backoff with jitter describes retries as selfish: each one spends more of the server’s time to improve a single client’s to improve a single client’s odds. It also notes that when several layers each retry, the extra traffic multiplies, and it recommends adding jitter to backoff so clients don’t all return at the same moment.

Google Cloud’s guidance on graceful degradation takes a complementary line. It advises letting replicas throttle incoming requests during overload, which helps prevent cascading failures, and designing the system to keep working at reduced performance rather than fail outright. These controls are worth having even when the architecture can’t change yet. Set sensible timeouts, cap concurrent requests and decide in advance what happens when a dependency disappears.

Databases and connection pools often run dry first. Closely coupled applications can issue multiple queries in response to each incoming request. Certain transactions maintain locks while waiting for other tasks, and other transactions vie for a restricted set of connections. As concurrency increases, queries become slower, connections remain in use longer, and requests build up on the upstream side. Increasing the number of application instances can worsen the situation, because each additional instance creates more connections to the same database. Mapping the requests that travel through the most important workflows, and load testing to see which component hits its ceiling first, shows where queues, separated workloads, concurrency controls or fewer dependencies would help.

Synchronous dependencies give a spike no place to dissipate. A payment authorization generally requires a clear result before an order can be finalized. A confirmation email, an analytics update or a warehouse notification does not need to hold up the original transaction. An event-driven design lets a producer publish an event and interested consumers handle it on their own time. Queues hold events while slower consumers catch up, and each consumer can scale to its own workload instead of every component having to run at the same pace.

Event driven architectures have their own set of constraints. Queues increase when events are produced faster than consumers are able to handle them. A consumer that continues to fail can cause messages to accumulate or to be sent again. Safeguards worth having include backpressure and concurrency limits, idempotent processing so a repeated delivery does not repeat the business action, dead-letter queues for messages that keep failing, and monitoring of queue depth, processing delays, delivery failures and consumer throughput. Recovery procedures should spell out how failed messages are retried, corrected or replayed.

Weaknesses concealed during normal days become visible under peak load. Response times lengthen, common resources become scarce, and synchronous dependencies allow a localized issue to spread across the entire application. The work involves identifying which dependencies present the greatest risk and determining where greater isolation would be beneficial. Capacity measured on quiet days provides almost no useful information. The important question is what occurs when a single component lags, and if the remaining components continue operating.

More Business · Business Watchdog · Report a business · Got a Story?

Get Newz Spotlight in your inboxReporting on the stories people talk about. Free, a few times a week, unsubscribe any time.

Related stories

Get Newz Spotlight in your inboxReporting on the stories people talk about. Free, a few times a week, unsubscribe any time.