0
votes

I have a .NET web application that is deployed to EC2 instances via AWS Elastic Beanstalk.

I have auto-scaling enabled with instance counts ranging from 3-10. I have notifications in place that tell me when new instances are added and no-longer-needed instances are removed from the cluster.

Sometimes, around when the instances are added/removed, I'm getting complaints from my users that they are seeing the IIS web server web page - you know, the blue one...? After a few seconds, the same user is able to see the application correctly and things work fine.

I've turned off sticky sessions and I've enabled connection draining - what could be causing this?

1
How is your health check setup?error2007s

1 Answers

2
votes

Turning off sticky sessions wouldn't help this situation, and might actually exacerbate the problem to some extent. However the root of the problem is that your ELB health check appears to only be checking that IIS is responding, where it needs to be checking that your application is fully deployed and IIS is serving the application.

Configure your Elastic Load Balancer's health check to check for a page that will only be available once your application is fully deployed and running. Then a new server will not be added to the load balancer's pool (and users won't be routed to that server) until the application is being served properly on that server.