Score:1

How to load balance Socket Connections?

cn flag

We have a large pool of devices that establishes socket connections with a server. Connections are TCP socket connections hitting a server IP: port pair from a destination IP port pair. In stand alone mode there is no problem in responding back to the devices.

However as the number of devices have scaled up, we are forced to introduce a load balancer which would then repool traffic to various receivers in the backend. Receivers then processes the information, and store it in the database for future processing.

However, we are unable to send response to any of the devices, as the Load Balancer(HA Proxy) NATs the packets and changes IP Address as it sends the packets to the Server Pool behind firewall.

How do we ensure that connections are not lost, and the responses are made back to the devices?

What is the correct way to load balance TCP/IP Connections, and still ensure that the connections are responded back?

Any help will be appreciated.

We are currently using HA Proxy. We are open to switching to any other open source Load Balancer. We only need a round-robin load balancer.

Michael Hampton avatar
cz flag
How exactly did you configure HAProxy?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.