The latest insights from the load balancing experts | Loadbalancer.org
  • Support
  • Blog
  • +1 833 274 2566
  • Solutions
  • Services
  • Products
  • Resources
  • Get Started
  • Support
  • Blog
Schedule your demo
  • Solutions
  • Services
  • Products
  • Resources
  • Get Started
  • Support
  • Blog

The latest insights from the load balancing experts | Loadbalancer.org

  • Latest posts
  • By topic
    • How Tos
    • Events
    • Guest Blogs
    • Top Ten Blogs
    • HA Proxy
  • By sector
    • Healthcare
    • Storage
    • Security
    • Print
    • Microsoft
  • How-To's
  • HAProxy
  • High Availability
  • Just for Fun
  • Security
  • Events
  • News
  • Linux
  • Top 10 Blogs
  • Amazon AWS
  • Reviews and Comparisons
  • Healthcare
  • SSL
  • Web Application Firewall (WAF)
  • Case Studies
  • Microsoft Azure
  • Disaster Recovery
  • Direct Server Return (DSR)
  • Global Server Load Balancing (GSLB)
  • Microsoft
  • Microsoft Exchange
  • Print
  • Denial of Service
  • Microsoft Remote Desktop Services
  • Object Storage
  • Web Filters / Proxy
  • Broadcast Media
  • X-Forwarded-For Header (XFF)
  • Guest Blogs
  • VMware
  • Google Cloud Platform (GCP)
  • Nutanix
See more tags

Layer 4 vs Layer 7 load balancing - we still love DSR, but…

21 May 2020 / 3 min read / HAProxy

Some time ago, we blogged about why we still love DSR. It’s a load balancing method which goes by many names: direct server return (DSR), direct routing (DR), LVS/DR, and nPath routing - to name a few.

The idea is the same: reply traffic flows from the servers straight back to the clients. This means that the load balancer is bypassed on the return journey. Using DSR maximizes the throughput of return traffic and allows for near endless scalability.

A year and a bit since we published our previous blog post on the matter, we have a small update: we still love DSR, but…

It’s still often misunderstood

It’s still the case that DSR doesn’t always get a fair hearing, often because it isn't fully understood. That’s certainly something we can help with - we’ve produced a handy dandy video overview of DSR and how it works. We specifically cover 'layer 4 DR mode' which is the name of our load balancer’s DSR implementation. Check it out below:

It’s also true that some load balancer vendors use fear, uncertainty, and doubt to try and discredit the idea of DSR in favor of more complex solutions. The alternatives are almost certainly less efficient and require more computing power, leading to more expensive hardware requirements. While alternative load balancing methods do tend to offer more features, if the added features aren’t needed or used then it starts to look more like an exercise in upselling.

It works great in tandem with layer 7 load balancing

While we’ve discussed this subject before in a blog post on load balancing your load balancers, it’s worth mentioning again as it’s a very cool concept used by some of the world’s largest organisations.

Using a two-tiered load balancing model, it’s possible to serve far greater volumes of traffic than would otherwise be possible. An initial tier of layer 4 load balancers (DSR is a perfect solution here) distributes inbound traffic across a second tier of layer 7, proxy-based load balancers. Splitting up the traffic in this way allows the more computationally expensive work of the proxy load balancers to be spread across multiple nodes. The whole solution can be built on commodity hardware and scaled horizontally over time to meet changing needs.

One of the best talks we saw during our visit to the HAProxy Conference 2019 was by Joe Williams from GitHub who talked about using a multi-tiered load balancing approach with DSR, tunnel-based load balancing at the front end. It’s a great example of the clever things that can be done using DSR, especially when the underlying infrastructure can be optimized and tinkered with. The talk is currently available on YouTube and is well worth a watch.

It’s a rock solid solution for object storage

We’ve seen the demand to load balance object storage solutions explode over the past few years. Layer 7 based solutions are undoubtedly simple and flexible, but DSR / layer 4 DR mode still has unbeatable performance. In particular, we've found DR mode useful for read-heavy object storage deployments due to the large reply traffic to request traffic ratio. The much larger volume of reply (read) traffic bypasses the load balancer and is not constrained by the load balancer’s network throughput.

Our conclusion

Traditional layer 4 load balancing is showing no signs of disappearing any time soon. Layer 7 solutions are absolutely becoming ever faster, more mature, and increasingly feature-packed with each passing year. Even so, our position on DSR remains as consistent as ever: we still love and recommend it to our customers for its unbeatable performance, simplicity, and consistency.

Found in

HAProxy, Object Storage, Direct Server Return (DSR)

About the author

Andrew Howe-profile-image
Andrew Howe

From a diverse background including point of sale IT support and homelessness support, Andrew joined Loadbalancer.org to further his passion for Linux and free and open-source software. Outside of work, Andrew can be found at the annual FOSDEM free and open-source software event in Brussels, and is also a fan of left field cinema, classic synth-pop/disco music, and tabletop role-playing.

Read More

Related posts

HAProxy
HAProxy
26 Aug 2020
Loadbalancer.org releases Open Source SNMP MIB and Agent for HAProxy Peter Statham
We’re always keen to give back to the community that writes such great software – our new SNMP agents and MIBs for HAProxy make monitoring your Virtual Services and Real Servers a breeze.

7 min read

Read more
Web Application Firewall (WAF)
Web Application Firewall (WAF)
31 Jul 2020
Secure connections: encrypt, inspect and decrypt traffic when using a WAF Neil Stone
Protect both web servers and users, with this combination of layers and tools.

4 min read

Read more
Reviews and Comparisons
Reviews and Comparisons
16 Jun 2020
Why choosing a load balancer with no end-of-life (EOL) is important George Booth
So many companies enforce end-of-life (EOL) on their products, but our customers are free to choose when to upgrade their appliances. Unlike our competitors, we don’t EOL our products.

4 min read

Read more

Get started

Get in touch

Start a conversation about the right solution for your business.

Get in touch

Create your quote

Transparent pricing you can see straight away.

Create your quote

Download now

Try us free for 30 days – see why our customers love us.

Download now

Schedule a virtual meeting with us

Working remotely or from home? Let’s meet on a call or online.

Let's meet

Follow Loadbalancer.org

+1 833 274 2566
  • Company
    • Solutions
    • Services
    • Load balancer
    • Why Loadbalancer.org
    • Blog
    • Professional services
    • Sitemap
  • Load balancer
    • Get a quote
    • Free trial
    • Online demo
  • Resources
    • Manuals
    • Deployment guides
    • Applications
    • White papers
    • Case studies
    • Solutions
  • Support
    • FAQ's
    • Open a ticket
    • Security news
  • Applications
    • Healthcare
    • Storage
    • Print
    • Security
    • Microsoft
The latest insights from the load balancing experts | Loadbalancer.org

The latest insights from the load balancing experts | Loadbalancer.org. All rights reserved

  • Contact Us
  • Terms & Conditions
  • Privacy Policy