Professional Cloud ArchitectManage and provision solution infrastructureMedium
An e-commerce company experiences significant traffic spikes during sales events, requiring their web servers to scale rapidly. They use Compute Engine instances and need to ensure that their application remains highly available and responsive during these peaks. What is the most effective approach to automatically scale their web server instances to handle fluctuating demand?
- AConfigure Scheduled Snapshots for instance backups.
- BUse custom scripts to start and stop individual instances.
- CManually resize machine types of existing instances.
- DImplement Managed Instance Groups with autoscaling.
Show answer & explanationAnswer & explanation
Correct answer: D. Implement Managed Instance Groups with autoscaling.
Managed Instance Groups (MIGs) with autoscaling are designed precisely for this scenario. They automatically add or remove instances based on defined metrics (CPU utilization, load balancer capacity, etc.), ensuring the application can handle traffic spikes efficiently and maintain high availability.
Why the other options are wrong
- A. Scheduled Snapshots are for data backup and recovery, not for scaling compute resources.
- B. Custom scripts for starting/stopping instances are a manual, reactive, and less efficient approach compared to autoscaling MIGs.
- C. Manually resizing is not automatic and cannot react quickly to traffic spikes.
Managed Instance Groups (MIGs) with Autoscaling
MIGs manage a group of identical VM instances, and with autoscaling enabled, they automatically adjust the number of instances to meet demand.
- Automated instance creation/deletion
- Ensures high availability and fault tolerance
- Supports rolling updates and autohealing
Memory trick: MIGs auto-scale, keeping your apps alive and thriving.