Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang Load balancer [closed]

Load balancer must know all the nodes. Clients will interface with load balancer, who then gives each task to node.

How can there be no single point of failure if client always accesses same (single) load balancer? You cannot have two load balancers, otherwise how will client know which one to connect to?

Is it accepted that for some parts of design you cannot avoid single point failure?

like image 638
Lethi Avatar asked Oct 24 '12 19:10

Lethi


1 Answers

Having more than one load balancer as part of a highly available solution is very common, and there is no need for the load balancer to be a single point of failure. The load balancers can e.g. be placed behind a single virtual IP address that floats between them. If one goes down the IP floats over to the other one which takes over. The client is only aware of the single virtual IP which it always connects to.

If the clients are Erlang nodes and the communication takes place through Erlang messaging (missed this when providing the first part of the answer), you can set up the load balancing processes to belong to a process group (pg2) and rout through this. This would allow you to have multiple load balancers sharing the load. If all requests have to go through a single process for routing, you could register one process as global and have identical processes deployed on other nodes as a backup. These backups would need to monitor the global service, and take over if the global process is lost.

like image 54
Christian Dahlqvist Avatar answered Nov 13 '22 01:11

Christian Dahlqvist