cloudformation-zookeeper icon indicating copy to clipboard operation
cloudformation-zookeeper copied to clipboard

Zookeeper ELB Protocol and port forward

Open dalekurt opened this issue 9 years ago • 2 comments

Hi,

Is there a reason why the ELB for Zookeeper uses HTTP protocol over TCP and why port 80 forwards to 8181 and not 2181?

I'm setting up Bamboo within my cluster and this came up as a concern, before making any changes to the cloud formation template, I wanted to see if there was a reason behind this configuration.

"ElasticLoadBalancer" : {
      "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
      "Properties" : {
        "CrossZone": "true",
        "Scheme": "internal",
        "SecurityGroups": [{ "Ref": "LbSecurityGroup" }, { "Ref": "AdminSecurityGroup" }],
        "Subnets": { "Ref": "Subnets" },
        "Listeners" : [ {
          "LoadBalancerPort" : "80",
          "InstancePort" : "8181",
          "Protocol" : "HTTP"
        } ],
        "HealthCheck" : {
          "Target" : "HTTP:8181/exhibitor/v1/cluster/state",
          "HealthyThreshold" : "3",
          "UnhealthyThreshold" : "5",
          "Interval" : "30",
          "Timeout" : "5"
        }
      }
    },

dalekurt avatar Jun 21 '15 17:06 dalekurt

This listener is for Exhibitor, not for ZooKeeper:

The template also creates an internal-facing ELB for clients to interact with Exhibitor via a static endpoint. This is especially useful for node discovery, so Exhibitor's /cluster/list API is exposed as an output as well (ExhibitorDiscoveryUrl).

ZooKeeper is not usually run behind a load balancer (context).

To get the list of ZK nodes, just query the Exhibitor's /cluster/list API on the ELB. Here's a little Python script for it: https://github.com/thefactory/cloudformation-bamboo/blob/master/bamboo.json#L169

mbabineau avatar Jun 22 '15 17:06 mbabineau

I guess this can be closed

clehene avatar Oct 15 '15 23:10 clehene