SRE Capacity Planning & Scaling 4 — Questions and Answers
Question 1: Which of the following best describes 'elastic scaling'?
- Manually adding servers during peak hours
- Automatically provisioning and deprovisioning resources in response to real-time demand (Correct answer)
- Permanently over-provisioning to handle any possible load
- Distributing load across multiple geographic regions
Correct answer: Automatically provisioning and deprovisioning resources in response to real-time demand
Elastic scaling automatically adjusts resource capacity up or down based on current demand, optimizing both performance and cost.
Question 2: An SRE is capacity planning for a batch processing system that runs nightly. What is the most cost-effective cloud strategy?
- Keep a large fixed cluster running 24/7
- Use spot/preemptible instances that scale up at night and terminate after completion (Correct answer)
- Use on-demand instances permanently sized for peak batch load
- Offload processing to a third-party SaaS tool
Correct answer: Use spot/preemptible instances that scale up at night and terminate after completion
Spot or preemptible instances at scale for short-duration batch jobs significantly reduce cost since the workload is fault-tolerant and time-flexible.
Question 3: What is the purpose of a 'capacity model' in SRE practice?
- Documenting on-call rotation schedules
- Mapping resource consumption to traffic levels to forecast infrastructure needs (Correct answer)
- Defining SLOs for each service tier
- Tracking incident resolution times
Correct answer: Mapping resource consumption to traffic levels to forecast infrastructure needs
A capacity model quantifies the relationship between traffic/usage and resource consumption, enabling accurate infrastructure forecasting as load grows.
Question 4: When horizontal scaling is applied to a stateless web tier, what happens to the system's theoretical maximum throughput?
- It remains fixed regardless of instance count
- It scales linearly with the number of instances (assuming no shared bottleneck) (Correct answer)
- It decreases due to increased coordination overhead
- It doubles with each additional instance up to a hard limit
Correct answer: It scales linearly with the number of instances (assuming no shared bottleneck)
Stateless services with no shared state bottleneck scale nearly linearly horizontally because each instance independently handles requests.
Question 5: A service regularly hits its connection pool limit during peak traffic. Which capacity action directly addresses this bottleneck?
- Increase the number of application server instances
- Increase the database connection pool size or add a connection pooler like PgBouncer (Correct answer)
- Reduce the query complexity
- Enable read replicas
Correct answer: Increase the database connection pool size or add a connection pooler like PgBouncer
A connection pool limit is a concurrency bottleneck; increasing pool size or adding a connection pooler like PgBouncer multiplexes connections efficiently.
Question 6: What does Amdahl's Law imply for SRE capacity planning when scaling parallel systems?
- Performance scales linearly with added resources
- The speedup from parallelization is limited by the sequential (non-parallelizable) fraction of the workload (Correct answer)
- Network bandwidth is always the primary bottleneck
- Doubling CPU cores always halves processing time
Correct answer: The speedup from parallelization is limited by the sequential (non-parallelizable) fraction of the workload
Amdahl's Law states that sequential portions of a workload cap the maximum speedup achievable through parallelization, setting an upper bound on scaling benefits.
Question 7: Which SRE practice helps validate that a new capacity plan will actually meet SLOs before rolling it out to production?
- Canary deployment followed by load testing in production
- Load testing the new capacity configuration in a staging environment that mirrors production (Correct answer)
- Reviewing historical incident reports
- Increasing alert thresholds temporarily
Correct answer: Load testing the new capacity configuration in a staging environment that mirrors production
Load testing in a production-mirror staging environment validates the capacity plan against realistic conditions without risking production availability.
Which of the following best describes 'elastic scaling'?