Horizontal vs Vertical Scaling Simulator
Interactive game to learn scaling strategies for web applications. Experiment with horizontal and vertical scaling, see the effects on performance, cost, and reliability with realistic pricing simulation and budget constraints.
Category: Infrastructure
Topics covered: scaling, infrastructure, educational, interactive, cloud, auto-scaling
// simulator
Horizontal vs Vertical Scaling Simulator
Interactive game to learn scaling strategies for web applications. Experiment with horizontal and vertical scaling, see the effects on performance, cost, and reliability with realistic pricing simulation and budget constraints.
Learn scaling strategies by managing traffic under real-world conditions
Upgrade individual server specs. Note: each upgrade takes the server down for about 3 simulated seconds.
Pricing Reference (Monthly)
Traffic Pattern (Last 60s)
Understanding Scaling Strategies
What you'll learn
- Horizontal scaling (scale out) vs vertical scaling (scale up)
- When to use each scaling strategy based on workload
- Impact on performance, cost, and reliability
- Auto-scaling configuration and benefits
- Load distribution with horizontal scaling
- Budget management and cost optimization
Scaling strategies
- Vertical Scaling: Increase server resources (CPU, RAM, disk). Simple but limited.
- Horizontal Scaling: Add more servers with load balancer. Unlimited but complex.
- Auto-Scaling: Automatically adjust capacity based on demand.
- Hybrid Approach: Combine both strategies for optimal results.
Real-world applications
- AWS EC2: Use Auto Scaling Groups with ELB for horizontal scaling.
- Kubernetes: Horizontal Pod Autoscaler (HPA) for container workloads.
- Databases: Read replicas (horizontal) vs larger instances (vertical).
- Serverless: Automatic scaling without managing servers.
Best practices
- Start with vertical scaling for simplicity, then scale horizontally.
- Use auto-scaling to handle traffic spikes cost-effectively.
- Set appropriate cooldown periods to avoid scaling thrashing.
- Monitor key metrics: CPU, memory, response time, error rate.
- Design stateless applications for easier horizontal scaling.
Overview
Scaling is how a system keeps serving requests as traffic grows, and each approach has a different cost in money, downtime and complexity. In this simulator you run a small service against a traffic scenario and decide how to keep it up. Vertical scaling upgrades the server to a bigger size, which is simple but causes downtime during the change and eventually hits a ceiling. Horizontal scaling adds more servers behind a load balancer, which spreads the load and removes the single point of failure. Autoscaling adds and removes servers automatically when CPU passes a threshold, within a minimum and maximum, with delays before scaling up and down. Four scenarios test your choices: gradual growth, a sudden spike, variable load and a Black Friday surge. The simulator tracks failed requests, response time, uptime and the cost of the servers you run, so the goal is not only to survive the traffic but to do it on a budget. Over-provisioning wins easily but costs too much; reacting too slowly drops requests.
Try this
- Run "Sudden Spike" with one server and no load balancer, then try again after upgrading the server to see the downtime vertical scaling causes.
- Add a load balancer and more servers, then compare failed requests and cost with the vertical approach.
- Add a load balancer, turn on autoscaling for "Black Friday" and tune the CPU threshold and the minimum and maximum instances to stay within budget.
Frequently asked questions
- What is the difference between vertical and horizontal scaling?
- Vertical scaling makes one server bigger with more CPU or memory. Horizontal scaling adds more servers and spreads traffic across them, which also improves availability.
- How does autoscaling decide when to add servers?
- It watches a metric such as average CPU or requests per second and adds instances when it stays above a target, within configured minimum and maximum counts. Cooldowns or delays stop it from flapping.
- Why does autoscaling not prevent every outage during a spike?
- New instances take time to start and warm up. A sharp spike can overload the existing servers before the new ones are ready, which is why teams pre-scale for known events.
Try next
// simulator
Message Queue Simulator
Visualize how message queues work across Kafka and RabbitMQ patterns. Explore producers, brokers, topics, partitions, exchanges, queues, consumer groups, lag, rebalancing, backpressure, ordering, and dead letter queues.
// simulator
Caching Strategies Simulator
Learn caching fundamentals with an interactive simulator. Visualize cache hits, misses, eviction policies (LRU, LFU, FIFO), and understand write strategies.
// simulator
BCDR Simulator
Learn Business Continuity & Disaster Recovery with interactive RTO/RPO planning, failover strategies, and disaster scenarios. Understand hot, warm, and cold DR sites.