DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Why Round-Robin Won't Save You: Load Balancing Challenges in Data Streaming Services With Heterogeneous Traffic
  • Zero Trust, Build High Scale TLS Termination Layer
  • Why Your "Stateless" Services Are Lying to You
  • Beyond Outages: Building True Resilience After the AWS Outage

Trending

  • Rethinking Java CRUDs With Event Sourcing and CQRS Patterns
  • Run Gemma 4 on Your Laptop: A Hands-On Guide to Google's Latest Open Multimodal LLM
  • A Hands-On ABAP RESTful Programming Model Guide
  • How to Format Articles for DZone
  1. DZone
  2. Software Design and Architecture
  3. Performance
  4. Content-based Load Balancer

Content-based Load Balancer

Here is a short guide to content-based load balancing, focusing on layers 4 and 7.

By 
Ram Chauhan user avatar
Ram Chauhan
·
Aug. 26, 16 · Opinion
Likes (3)
Comment
Save
Tweet
Share
3.8K Views

Join the DZone community and get the full member experience.

Join For Free

Load balancing can be performed at various layers in the Open Systems Interconnection (OSI) Reference Model for networking. Generally, load balancers run at Layer 4 (Transport) or at Layer 7 (Application).

So far different providers used to provide the load balancers only at Layer 4, but recently providers like AWS, Google Cloud, and NGINX, have come up with Layer 7, content-based load balancers also known as Application Load Balancer.

The Difference Between Layer 4 and Layer 7

Layer 4

It operates at transport layer with protocols like TCP/UDP and does not look inside of the actual network packets, remaining unaware of the specifics of HTTP and HTTPS. That means simply delivering the messages with no regard to content of the message, with a load balancing algorithm such as round-robin and by calculating the best destination server based on least connections or server response times.

Layer 7

It operates at a high-level of OSI model, i.e. application layer which deals with the content of the message. With a protocol such as HTTP, a load balancer can uniquely identify client sessions based on cookies and use this information to deliver all client's requests to the same server. 

New – AWS Application Load Balancer | AWS Blog

It is designed to handle streaming, real-time, and WebSocket workloads in an optimized fashion. Instead of buffering requests and responses, it handles them in streaming fashion. This reduces latency and increases the perceived performance of your application.

Benefits

  • URL based routing: Create a load balancer that routes to the different instances based on URL path.
  • Support for container-based applications: Container-based applications which are based on micro service architecture, the Content Based Load Balancer understands and supports its needs. It allows one instance to host several containers that listen on multiple ports behind the same target group and also performs fine-grained, port-level health checks.
  • Support for additional protocols: It supports two additional protocols like WebSocket and HTTP/2.
  • Cost Efficient: It is cheaper as compared to traditional load balancers. AWS charges 10% lower than 'Classic Load Balancers'.

Conclusion

Content Based Load Balancer is a way forward — a new alternative to traditional transport layer load balancers as it operates in a more efficient way.

Load balancing (computing)

Opinions expressed by DZone contributors are their own.

Related

  • Why Round-Robin Won't Save You: Load Balancing Challenges in Data Streaming Services With Heterogeneous Traffic
  • Zero Trust, Build High Scale TLS Termination Layer
  • Why Your "Stateless" Services Are Lying to You
  • Beyond Outages: Building True Resilience After the AWS Outage

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook