0

Let's imagine a client A watching a live stream (which translates to a bunch of HTTP requests) with keep-alive header on.

    A -r-> LB-----> R1 --|
   /|\      |-----> R2 --|
    |       ------> R3 --| 
    |---R----------------|

Is it possible that this DSR (direct server return) Load Balancer (L4) offers least-conn method?

If it's yes, how does the reals manage to work with TCP sequence number? (and also to keepalive the connection) Since for each new client connection, the LB can route you to a different real server.

load balancing dsr http://blog.haproxy.com/wp-content/uploads/2011/07/layer4_dsr_data_flow.png

1

If you are using DSR then the load-balancer is not proxying the TCP connection, and so must not alter sequence or acknowledgement numbers. It's not fashionable these days as it's limited in functionality, and needs to be coupled to the farm at layer 2 which does not lend itself to hosting multiple services or load-balancing across multiple data centres, plus modern load-balancers run on much more powerful hardware.

  • Thanks, the DSR should be layer 3 or lower, isn't? If yes, then it acts more like a router. Even in this case, it should "persist" connection IP to a given real server otherwise, each new server would need to reset the TCP, establish a new TCP... – leandro moreira Nov 14 '16 at 11:49
  • If you're using least-conns then it must keep track of sessions, but if you were to use source IP distribution then it wouldn't even need to do that, it could be entirely stateless! – marctxk Nov 14 '16 at 12:14

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.