Agent Wranglers

SCL-32Recommended

Turn off optional work under load

Mark the features the service can live without, such as recommendations or live counters. Keep a switch that turns them off under overload without a deploy.

How to do it

Turning whole requests away, as Turn work away before overload does, is the last step. Before that, do less work per request. The Google SRE book calls this graceful degradation. Put each optional part behind a feature flag, and let an alert or a person flip it. The degraded path rarely runs, so test it on a schedule and alert when many servers enter it.

How to check

Flip the switch on staging under the planned peak. CPU per request drops by 20% or more, pages still load, and the error rate stays under 1%. The last such test is less than 90 days old.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/degrade-under-load">Agent Wranglers scaling playbook</a>. In code you write, add a comment next to it with the same link.