Azure : What does the Direct Server Return option do for a Load Balancer?


When setting up a load balancing rule in Azure, you’ll be given the opportunity to enable/disable “Direct Server Return”.

2016-08-18 16_06_29-Add load balancing rule - Microsoft Azure


So what does it do?

Apart from disabling the “backend port” input field, what does it do? Clicking on the “?” gives us a start…

2016-08-18 16_06_00-Add load balancing rule - Microsoft Azure

Basically, DSR (Direct Server Return) will disable any NAT involved. So the targetted VM should be aware of the loadbalancer IP, or the network flow will break.

So it’s usefull to use as a cluster IP address (for example, when using a cluster IP), though do NOT use it for typical load balancing scenario’s where the nodes aren’t aware of the cluster address.


5 thoughts on “Azure : What does the Direct Server Return option do for a Load Balancer?

    1. Hey Roger,
      DSR is a common feature, present in many load balancers out there. The main goal is not having the return traffic processed by the LB, and thus spare LB CPU cycles (and eventually reduce latency and eliminate the LB as possible bandwidth bottleneck).
      If you google for DSR you will find articles by many ADC vendors explaining use cases in detail, but the one I have seen the most is heavily asymmetric traffic, such as video serving apps.

  1. On azure with internal lb does the floating ip have to come from the same subnet address as the lb and nfv private addresses or can you define a float ip subnet for addresses within the vnet so you scale out service pool separately to nfv subnet and give identifiable ip addresses ranges for different flows. Lb requires float ip to be within same vnet but not sure if native routing or mac address take precedence.

    1. In Azure SDN there is no ‘MAC routing’, all traffic is switched/routed by the Vnet.

      For the Internal ALB the same rules apply for both DSR and non-DSR config AFAIK regarding where the frontend IP can be (same subnet).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.