Agent Wranglers

SCL-33Recommended

Track cost per request

Divide each service's monthly cost by the work it did, such as cost per 1,000 requests or per active customer. Alert when it rises more than 20% from the month before.

How to do it

Total cost grows with traffic, which is expected. A rising cost per unit means scaling went wrong, such as an autoscaler that never scales down or a cache that misses. Watch what the service costs tracks the totals and tags. Take the request counts from rate, errors and duration. Show the unit cost on the service dashboard, and compare it before and after each scaling change.

How to check

A monthly report shows the cost per 1,000 requests for each service. An alert fires when it rises more than 20% from the month before.

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/cost-per-request">Agent Wranglers scaling playbook</a>. In code you write, add a comment next to it with the same link.