Om Infowave Developers
Om Infowave Developers

Reputation: 1565

HAProxy load balance, is there any way to automate the traffic distribution?

We have Google cloud server, and we have implemented a queue system to process multiple FFmpeg processes requested by users. Currently, if there are multiple requests then it goes to the same server instance and takes time to process all requests.

We have implemented HAProxy, but still, it doesn't distribute the requests properly, is there any configuration in HAProxy to automatically distribute the requests to multiple server instances?

Upvotes: 0

Views: 308

Answers (1)

Hemanth Kumar
Hemanth Kumar

Reputation: 3784

For configuration in HAProxy to automatically distribute the requests to multiple server instances we can use the Round Robin Algorithm.

Load balancer handles traffic depending on the load balancing algorithm we configured at backend and by default it uses Round Robin Algorithm. Load balancer performs the following functions: Distributes client requests or network load efficiently across multiple servers. Ensures high availability and reliability by sending requests only to servers that are online Provides the flexibility to add or subtract servers as demand dictates Different load balancing algorithms provide different benefits; the choice of load balancing method depends on your needs:

Round Robin – Requests are distributed across the group of servers sequentially.

The load balancing algorithm of a backend is set to round robin when no other algorithm, mode nor option have been set. The algorithm may only be set once for each backend.Please find this doc to install HAProxy using round robin.

Upvotes: 1

Related Questions