instance is unhealthy yet doesn't get replaced

0

I have a load balanced + auto scaled .NET Windows application configured with 2 hosts minimum. But when 1 of the hosts is "unhealthy", it doesn't get replaced automatically. I have to kill it and then it will be replaced.

The load balancer also knows it is unhealthy. So why the disconnect with Elastic Beanstalk?

Any ideas what could be configured wrong here?

And FWIW, I'm pretty sure this used to work.

preguntada hace 5 años846 visualizaciones
2 Respuestas
0
Respuesta aceptada

Hello,

So I get that when the ELB healthchecks fails for the instances, the instances are not replaced. By default the ASG healthcheck type is set to EC2 in Beanstalk. So even if the ELB healthcheck fails, the instances wont be replaced.

In order to replace the instances based on ELB healthchecks, we would have to set the HealthCheckType to ELB using the .ebextions config file:

Resources:
  AWSEBAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      # Example syntax of a property that takes in the actual value
      HealthCheckType: ELB
      HealthCheckGracePeriod: 600

More info:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environmentconfig-autoscaling-healthchecktype.html

AWS
respondido hace 5 años
0

Awesome, thank you!

respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas