I asked this question here first.Eventually I was advised to ask it here.

I am developing a server side software which uses ASIO for TCP socket communication between client and server. All is done in C++ because the software is used for extremely fast low latency data transfers.I need an ability to distribute incoming client connections between different instances (processes) of my server. So I learned a new term - load balancer. Now, because I use C++ and ASIO I started looking for available open source libraries. I found this. What I understood was that this is a proxy server which mediates the connection between client and server. That's, it maintains a bridge between the two.

I have the following questions:

Do all proxy servers work like that?

Is it possible to make a proxy server (or load balancer) that only redirects an incoming connection to a server instance without serving as a mediator of the open socket traffic during active connection?

Again, what I finally want is that my loadbalancer gets incoming connection request from a client, then "tells" my server to grab that connection info (like IP address for example) and from then on proceed with direct connection between the server and the client.

1 Answer 1


A "normal" loadbalancer/ADC (F5 BIG-IP, Citrix Netscaler, etc.) will proxy connections.

What you want is GSLB (or similar) DNS based load balancing techniques (not DNS round robin). I know both F5 and A10 also have GSLB implementations, I'm sure there's many others.

How it basically works is that you will have a box who's job it is, is to monitor the servers, and respond to DNS queries from clients with the IP of the server that client should go to. You'll have your normal internal (or external) dns, but then you have some of that DNS scope delagated to the GSLB box.

Functionally, your client will try to connect by name, it will query your dns server, which will send the client to the GSLB box to get the answer. The GSLB box will respond to the DNS query with the server it deems most fit (or next in line, or however you have it configured). The client will continue to hit that same IP for the TTL of that record, at which time it will re-query the GSLB box.

In this regard the loadbalancing is never in-between the client and server, it just tells the client where to go. And neither the client or server need any knowledge about this taking place. As far as the client is concerned, it's just a DNS query, it doesn't need to know that it's a conditional one.

  • You're the man! Thanks a lot for this info. Do you have an idea if services like AWS EC2 provide this kind of functionality? I mean,is this something that's widely practiced?
    – Michael IV
    Oct 27, 2017 at 19:53
  • 1
    We do GSLB with F5s (which also happen to do our application load balancing). I'm not sure if EC2 has their own version available. But I'm pretty sure the F5 VMs are able to run on EC2 if you want to bring your own. Oct 27, 2017 at 19:58
  • A quick google search lead me to Amazon Route53, which may do what you need, but I can't say for sure without having tried it myself. Oct 27, 2017 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.