Skip to main content

Server Capacity Auto-Scaling Threshold Planner

Calculate optimal autoscaling thresholds for CPU, RPS, and cloud capacity planning. Enter values for instant results with step-by-step formulas.

Worked Examples

Example 1: API Service Peak Planning

Problem:API service: baseline 500 RPS, peak 2,000 RPS. Current: 4 instances, 300 RPS each. Target: <200ms P99. Should we autoscale or over-provision?

Solution:Current Capacity: 1,200 RPS\nBaseline util: 42% (comfortable)\nPeak util: 167% (OVERLOAD)\n\nInstances needed for peak:\n- 2,000 / 300 = 6.67 โ†’ 7 instances minimum\n- With 25% headroom: 9 instances\n\nAutoscaling Strategy:\n- Min instances: 4 (handles baseline)\n- Max instances: 10 (handles peak + headroom)\n- Scale up at 70% CPU (~210 RPS/instance)\n- Scale down at 30% CPU (~90 RPS/instance)\n\nCost Analysis:\n- Current (4 always): $400/month\n- Autoscale (avg 6): $600/month\n- Always-on peak (9): $900/month\n\nAutoscaling saves $300/month vs. always-peak.\n\nRecommendation: Autoscale with 4 min, 10 max

Result:Autoscale: 4-10 instances | Saves $300/month | Meets latency target

Example 2: Setting Optimal Thresholds

Problem:Currently scaling at 85% CPU (too lateโ€”seeing latency spikes) and 40% down (too aggressiveโ€”thrashing). Tune thresholds.

Solution:Problem Diagnosis:\n- 85% scale-up: By the time action triggers, CPU often hits 95%+\n- 40% scale-down: During normal variance (40-70%), instances flap\n\nBoot time analysis:\n- Instance boot: 45 seconds\n- Health check: 30 seconds\n- Total lag: 75 seconds\n\nDuring 75s lag at 85% CPU:\n- If load is increasing 10%/min\n- CPU will hit 97% before new instance serves\n\nOptimal Thresholds:\n- Scale up: 65% CPU (gives 2-3 min buffer)\n- Scale down: 25% CPU (prevents thrashing)\n- Cooldown: 5 min between scale events\n\nExpected result:\n- P95 CPU: 70-75% (vs current 85-90%)\n- Thrashing eliminated\n- Slight cost increase (+10%) for stability

Result:New: 65% up, 25% down | Prevents 85%+ CPU spikes | +10% cost for stability

Example 3: Predictable Daily Pattern

Problem:E-commerce site: 100 RPS at 3 AM, 1,500 RPS at 1 PM. Traffic is predictable. Compare scheduled vs reactive scaling.

Solution:Traffic Pattern:\n- Off-peak (midnight-6am): 100-200 RPS\n- Morning ramp (6-10am): 200-800 RPS\n- Midday peak (10am-4pm): 1,200-1,500 RPS\n- Evening (4pm-10pm): 600-1,000 RPS\n- Late night (10pm-midnight): 200-400 RPS\n\nReactive Autoscaling:\n- Reacts 1-3 minutes after threshold\n- Morning ramp experiences 8-10 min of degraded performance daily\n- Cost-efficient but user impact\n\nScheduled Scaling:\n- 2 instances: midnight-6am\n- 4 instances: 6-10am (pre-scale at 5:45am)\n- 6 instances: 10am-4pm (pre-scale at 9:45am)\n- 4 instances: 4-10pm\n- 2 instances: 10pm-midnight\n\nAvg instances:\n- Reactive: 3.8\n- Scheduled: 3.7\n\nBenefit: No morning degradation, similar cost\n\nRecommendation: Scheduled + load-based for unexpected spikes

Result:Scheduled scaling: better UX, same cost | Add load-based for spikes

Frequently Asked Questions

What is the difference between target tracking and step scaling?

Target tracking maintains a metric at a specific value (e.g., 60% CPU) and automatically adds/removes capacity. Step scaling uses thresholds and explicit policies (e.g., add 2 instances when CPU >75%, add 4 when >85%). Target tracking is simpler; step scaling offers more control for complex patterns.

How do I calculate my car's towing capacity?

Towing capacity = Gross Combined Weight Rating (GCWR) minus the vehicle's curb weight minus passengers and cargo. Never exceed the manufacturer's rated towing capacity. Consider tongue weight (10-15% of trailer weight), trailer brakes, and transmission cooler requirements.

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

References