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

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

How does AI transform chaos engineering from an experiment into a critical capability? Learn how to effectively operationalize the chaos.

Data quality isn't just a technical issue: It impacts an organization's compliance, operational efficiency, and customer satisfaction.

Are you a front-end or full-stack developer frustrated by front-end distractions? Learn to move forward with tooling and clear boundaries.

Developer Experience: Demand to support engineering teams has risen, and there is a shift from traditional DevOps to workflow improvements.

Related

  • Zero Trust for AWS NLBs: Why It Matters and How to Do It
  • A Guide to Microservices Deployment: Elastic Beanstalk vs Manual Setup
  • A Deep Dive on Read Your Own Writes Consistency
  • Mastering Load Balancers: Optimizing Traffic for High Availability and Performance

Trending

  • Mastering Kubernetes Observability: Boost Performance, Security, and Stability With Tracestore, OPA, Flagger, and Custom Metrics
  • Understanding the Circuit Breaker: A Key Design Pattern for Resilient Systems
  • Effective Exception Handling in Java and Spring Boot Applications
  • Understanding the 5 Levels of LeetCode to Crack Coding Interview
  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.6K 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

  • Zero Trust for AWS NLBs: Why It Matters and How to Do It
  • A Guide to Microservices Deployment: Elastic Beanstalk vs Manual Setup
  • A Deep Dive on Read Your Own Writes Consistency
  • Mastering Load Balancers: Optimizing Traffic for High Availability and Performance

Partner Resources

×

Comments

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: