Ubuntu – Does having a load balancer allow you to re-use socket connections

load balancingsocketUbuntu

I have a service where servers upload 20kb xml files to my server.

There is no session, it is a single POST request and that's it. Each individual request is authenticated based on the contents of the xml file.

There are socket related tweaks that I will have to make as during load testing the server exhausts its sockets pool (32K).

Anyhow, I was wondering what things might change when I bring a load balancer into the equation that would round robin requests between 2+ web servers.

Could the load balancer re-use sockets?

Again, just want to be clear, client servers are posting a file over to my server, once the file has been http posted they are 100% completed. Any subsequent http posts will be considered a new 'transaction'.

Best Answer

I'm assuming you are refering to SO_REUSEADDR rather than connection multiplexing. The only benefit this gives is that a socket in TIME_WAIT does not prevent a new socket binding to the same address. I've never come across a system which actually uses the TIME_WAIT phase for what it is intended for - if you've got lots of sockets in TIME_WAIT maybe you should just reduce the timeout.

Making it all go faster would help too - but you've not given a lot of information on the set up here and the pattern of traffic.

Any type of proxy load balancer will give you even fewer clien connections than you have now (since each incoming connection requires a connection to the back end devices). OTOH RRDNS will halve the load without the complexity and cost of a SPOF.

it is a single POST request

So we talking HTTP here? If so then then there's ENORMOUS scope for tuning.

Related Topic