Sobrevivir a un pico de tráfico
Sigue sirviendo cuando la demanda se multiplica por un rato, durante el pico y con capacidad de reserva, cachés y descarte de carga antes del siguiente.
Use this guide when a Traffic spike incident starts, or when you want your Design to survive the next one with no action.
In a spike, a big site links to you and demand rises 3 to 10 times for a short while, so every Node on the path gets the extra load at once. A Design with no spare capacity drops requests and loses users, because waiting time climbs fast as a Node nears full load. That curve is what Capacity, utilization, and queues draws.
Recognize the spike#
A red line labelled ▲ SEV3 Traffic spike appears on the Dashboard charts (D).
The Requests row on the Users Node jumps. Every Node card turns amber, then red.
With Alerting, the pager fires on errors, p99, or saturation.
During the spike#
The spike ends on its own. Your goal is to lose as few users as you can until it does. An incident that hurts users for more than half of its time escalates once: it lasts longer and the spike grows by half.
Press Space to pause if you need time to look. With the setting Pause on SEV1 and SEV2 on, the game pauses for you on the worse incidents.
Find the first Node on the path that turned red, which is usually the App Server or the Database.
Select it and select Larger, or press U. Larger capacity helps at once, after a short restart.
If the App Server is red, place a second copy behind the Load Balancer instead, so that no restart drops traffic.
If you own Priority load shedding, open the Overload section of each App Server and select Shed low value, so that a saturated App Server drops the lowest-value kinds first, starting with bots.
Watch the Apdex figure on the HUD, and stop making changes once it holds near the target.
After the spike#
When the incident ends, a postmortem Mail arrives. If it offers an action item, press its button to put that Study first in the queue. Filing the message without it leaves the item open, and the incident stays twice as likely.
Use Smaller (free) on the Nodes you resized, once Load falls, if Burn matters to you.
Prepare for the next spike#
A Design that survives spikes with no action has headroom on every Node of the path. Do these in order of cost.
Keep spare capacity. Size each Node so that its Load stays under 50% at the daily peak, then check the Saturation row on the Dashboard at the evening peak.
Cache reads. Research Caching and place a Cache in front of the Database, so most extra reads in a spike never reach it.
Answer pages at the edge. From the Seed Era, research Content delivery and place a CDN in front of the App Servers, which answers cacheable pages and media without your servers.
Spread App Servers. Use a Load Balancer with two or more copies of the App Server. A second copy adds headroom with no restart, and it also survives an instance failure.
Scale with demand. Research Autoscaling. Link the App Servers into an Autoscaler, and set its min to the copies you need at the peak. The minimum keeps copies warm, so the spike meets capacity that already runs.
Shed load. Turn on Shed low value on every App Server, so that a spike costs you bots and cheap kinds first.
Look at the Users Node during the next spike, where the dropped errors in Errors by cause
must stay near zero, and check that Apdex on the HUD stays above its target through the spike. If
one Node still turns red, it is the next limit, so see
Find the bottleneck.
The Cold Start Sandbox sends a spike at a Java App Server. New Java copies start slow, so you must plan the capacity before the spike arrives.