DEV Community

es404020
es404020

Posted on

2

AWS Load balancer

AWS EC2 load balancer is one of the most popular service offer by Amazon Web Service. In this post we shall be exploring AWS load balancer, types of AWS load balancers, when to use them and how to setup load balancers on AWS Management console.

load Balancers are servers that forward internet traffic to multiple servers (EC2 instances) downstream.
load balancer

Why use a load balancer?

1.Spread load across multiple downstream instances
2.Expose a single point of access(DNS) to your application
3.Seamlessly handle failures of downstream instances
4.Do regular health checks to your instances
5.Provide SSL termination (HTTPs) for your website
6.High availability across zones
7.Separate public traffic from private traffic(inbound and outbound)

Why use an EC2 Load Balancer

An ELB(EC2 Load Balancer ) is a managed load balancers by AWS. Meaning AWS guarantees that it will be working. AWS takes care of upgrades ,maintenance, high availability across multiple zones. It costs less to setup your own load balancers but it would be a lot of effort on your end.

Health checks

They are support important for load balancers. They enable the load balancer to know if instances it forward traffic to are available to reply to requests. The health check is done on a port and a route. If the response is not 200 (OK) ,then the instance is unhealthy.
eee

Type of load balances in AWS

1.Classic load Balances(V1 -old generation)-2009
supports HTTP,HTTPS AND TCP
2.Application load Balancer (V2 - new generation) --2016 support HTTP, HTTPS , Web Socket
3.Network Load Balancer(V2 -new generation) -2017
support TCP,TLS(secure TCP) and UDP
Please try to remember this they common questions ask in the AWS Exam.
4.Gateway load balancer(Out of scope)
It recommended to use newer version of load balancers has they have more feature

Load Balancer can scale but not instantaneously if you have a massive scale to do you need to contact AWS for a "Warm-up".

For Troubleshooting
1.4xx errors are client induces errors
2.5xx errors are application induced errors
3.Load Balancer Errors 503 means at a capacity or no registered target.

In the next post we shall be setting up ELb .Thanks for reading.

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Image of DataStax

AI Agents Made Easy with Langflow

Connect models, vector stores, memory and other AI building blocks with the click of a button to build and deploy AI-powered agents.

Get started for free

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay