Specific load balancer
Good afternoon.
I have a task to write a load balancer for an online game where clients establish websocket connections with servers, and each new game should start on a less-loaded server.
My idea of a balancer: a regular L7/L4 balancer passes traffic through itself, which can be a bottleneck when there is a huge amount of traffic. That's why I decided to make a balancer, which clients will access each time they create a new game session (match), to get the IP address of the less-loaded server. The logic of determining the less-loaded server I want to write myself. Updating information about less-loaded servers should be instantaneous. The DNS balancer will not work here because DNS has a huge number of caches, which will prevent instant definition of a less-loaded server. Also, in the DNS balancer, there may be problems with connection of the real-time algorithm of definition of a less-loaded server. In general, my balancer should work in a similar way to DNS, but through its own protocol that is not cached by most computer systems like DNS.
The main profit of my load balancer is give ability for load balancer to handle a much more clients ( and traffic)
This is a text description of how my load balancer should work in steps:
I have a task to write a load balancer for an online game where clients establish websocket connections with servers, and each new game should start on a less-loaded server.
My idea of a balancer: a regular L7/L4 balancer passes traffic through itself, which can be a bottleneck when there is a huge amount of traffic. That's why I decided to make a balancer, which clients will access each time they create a new game session (match), to get the IP address of the less-loaded server. The logic of determining the less-loaded server I want to write myself. Updating information about less-loaded servers should be instantaneous. The DNS balancer will not work here because DNS has a huge number of caches, which will prevent instant definition of a less-loaded server. Also, in the DNS balancer, there may be problems with connection of the real-time algorithm of definition of a less-loaded server. In general, my balancer should work in a similar way to DNS, but through its own protocol that is not cached by most computer systems like DNS.
The main profit of my load balancer is give ability for load balancer to handle a much more clients ( and traffic)
This is a text description of how my load balancer should work in steps:
- Servers periodically report their load information to a load balancer.
- The load balancer calculates the least-loaded server based on the reported information.
- When a client needs to create a game match, it requests the load balancer for the IP address of the least loaded server.
- The load balancer responds with the IP address of the least-loaded server.
- The client then connects directly to the provided IP address.

