ingenieux/beanstalker

Support for ELB healthchecks

Closed this issue · 4 comments

Default configuration of beanstalk is to do EC2 operating system heatlhchecks, but there is also a configuration that allows for ELB application healthchecks. This makes it so autoscaling will rotate out a server that is failing the designated healthcheck test.

would be very excited to see support for configuring this setting in beanstalker.

see documentation here: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-add-elb-healthcheck.html

Marston,

I believe AWS EB (and beanstalker) already supports app-level healthchecks via health check url. Try this:

<beanstalk.applicationHealthCheckURL>/services/api/v1/debug</beanstalk.applicationHealthCheckURL>

I am already passing in the applicationHealthCheckURL this way

<configurationTemplate>
    <OptionSettings>
        <member>
            <OptionName>Application Healthcheck URL</OptionName>
            <Value>/rest/healthcheck</Value>
            <Namespace>aws:elasticbeanstalk:application</Namespace>
        </member>
    </OptionSettings>
</configurationTemplate>

but the autoscaling group does not have ELB heathcheck enabled. I'm not sure the EB API supports this?

I'm thinking about a wider approach, combining not only ELB Healthchecks, but also other ELB Settings. Not sure if its worth another plugin or just augment the existing functionality.

Can you ping me on Skype to address those?

Achieved the same effect by using cloudformation resources inside my ebextensions scripts.

Example:

"Resources" : {
  "AWSEBLoadBalancer" : {
    "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
    "Properties" : {
      "CrossZone" : true,
      "Listeners" : [
        {
          "LoadBalancerPort" : "80",
          "InstancePort" : "80",
          "Protocol" : "HTTP"
        },
        {
          "LoadBalancerPort" : "443",
          "InstancePort" : "80",
          "Protocol" : "HTTPS",
          "SSLCertificateId" : "arn:aws:iam:XXXXX:server-certificate/YYYYYY"
        },
        {
          "LoadBalancerPort" : "8009",
          "InstancePort" : "8009",
          "Protocol" : "TCP"
        }
      ],
      "AccessLoggingPolicy" : {
        "EmitInterval" : 60,
        "Enabled" : true,
        "S3BucketName" : "ELB_Access_Logs",
        "S3BucketPrefix" : "ZZZZZ"
      }
    }
  },
  "AWSEBAutoScalingGroup" : {
    "Type": "AWS::AutoScaling::AutoScalingGroup",
    "Properties" : {
      "HealthCheckGracePeriod" : "600",
      "HealthCheckType" : "ELB"
    }
  }
}