Load Balancing and High Availability

On-premise installations would often require multiple application nodes, database nodes and search nodes to be run alongside for high availability. And therefore load balancing is required.

Application node load balancing

One option of application node load balacing is to use round-robin DNS. That way a client will randomly connect to one of the listed nodes. Healtchecks will have to be implemented manually, however, because in case of one node going down, the DNS A-record will still contain its IP and send traffic to it.

Another opton is to configure an Nginx load-balancer and setup a Let’s encrypt certificate using the following script:

Database load balancing

There are multiple ways to do load balancing with Cassandra in case you are running more than one node (which is highly recommended):

  • Configuring a comma-separated list of cassandra nodes with the cassandra.hosts property

  • TCP Nginx load balancing as shown above for the syslog backend

  • Round-robin DNS

Elasticsearch load balancing

When running multiple Elasticsearch nodes (which recommended), you have similar options:

  • Configuring a comma-separated list of elasticsearch nodes with the elasticsearch.url property

  • Use HTTP Nginx load balancing for port 9200 (as shown above)

  • Round-robin DNS

Other configurations

You have to set the hazelcast.nodes property to contain a comma-separated list of the IPs of application nodes