How would you make a simple web application highly available in the cloud?
What the interviewer wants to hear
- Run multiple instances across at least two availability zones
- Put a load balancer with health checks in front
- Use an Auto Scaling group to replace failed instances
- Use a managed database with Multi-AZ failover
- Keep app servers stateless; store sessions and files externally
Model answer
The goal is to remove single points of failure. I would run the web tier on at least two instances, or containers, spread across two or three availability zones. An Application Load Balancer sits in front, does health checks and only sends traffic to healthy targets. An Auto Scaling group keeps the desired count and replaces any instance that fails. The app servers must be stateless, so sessions go into something like Redis or DynamoDB and uploaded files go to S3. For the database I would use a managed service like RDS or Aurora with Multi-AZ, so a standby takes over automatically if the primary fails. DNS with Route 53 health checks can add another layer. Finally, I would add monitoring and alarms so the team knows when something degrades, and test failover regularly.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Cloud Engineer questions
- Explain the difference between IaaS, PaaS and SaaS with an example of each.
- What is a VPC and what are its main building blocks?
- Explain IAM users, groups, roles and policies. When would you use a role instead of a user?
- What pricing models do cloud providers offer for compute, and when would you use each?
- What is the difference between containers and virtual machines, and when would you choose each?
- What is Infrastructure as Code and why do teams use it instead of the cloud console?
- Explain metrics, logs and traces. How does each help you run a cloud application?
- How does a CDN work, and what should you consider when caching content with one?
- Compare block, object and file storage in the cloud. Give a use case for each.