Question: What's the best practice for horizontally scaling a legacy ASP.NET web application that relies on Active Directory and is currently deployed to a single Windows EC2 instance?
- Use Sysprep to shut down the instance during a maintenance window. Create an AMI image and place both servers behind Application Load Balancer with sticky sessions.
- Launch a new EC2 with the latest version of Windows Server and install the application again. Use Application Load Balancer and sticky sessions to balance between both servers.
- Create a clone of the server using an AMI image and user Application Load Balancer to balance the traffic between both instances using sticky sessions.
- Horizontal scaling is not the best practice in this situation. Increase the size of the existing EC2 instance and vertically scale the application.
Answer: The correct answer of the above question is Option A:Use Sysprep to shut down the instance during a maintenance window. Create an AMI image and place both servers behind Application Load Balancer with sticky sessions.