To set up an Amazon ELB for an ElectricFlow Cluster, please follow these steps:
- Go to Load Balancers within Amazon EC2
- Select 'Create a Load Balancer'
- Select 'Classic Load Balancer'
- Fill in a Load Balancer 'Name'
- Select the VPC your Instances are residing in
- Remove Port 80 Listener
- Add 3 Listeners with Load Balancer Protocol and Instance Protocol as 'TCP'. These Ports will be based on KBEC-00041 - ElectricFlow TCP Port Usage - diagrams and descriptions:
- Port 8000 -> Port 8000
- Port 8443 -> Port 8443
- Port 61613 -> Port 61613
- Please see ELB_TCP_PORT_SETUP.PNG for an example.
- Assign or create any required Security Groups that have the necessary ports open based on the KB Article above and the Ports Opened in the previous step
- Configure the Health Check as follows:
- Ping Protocol 'HTTP'
- Ping Port '8000'
- Ping Path '/commanderRequest/health'
- For a more responsive Health Check, please Reduce the Interval and Healthy Threshold that suits your configuration
- Please see HealthCheck_Example.PNG for an example
- Add the EC2 Instances that contain the ElectricFlow Servers
- Add any Tags such as 'Name' to your ELB
- Review and Create
After you have created the ELB. It will take time to spin up and perform the initial health checks. Therefore, in the Instances subtab of the ELB, you might see your instances having the status of 'OutofService' for a few moments. Please refresh to ensure that your servers are properly being contacted by the ELB's Health checks.
Please see Instances.PNG for an example
The ELB will also generate a 'DNS Name' which can be found in the Description subtab of the ELB. This name is necessary to use within the configuration of ElectricFlow nodes.