Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Elastic Load Balance

1. What is Elastic Load Balancer (ELB)?

Elastic Load Balancer (ELB) is a service offered by Amazon Web Services


(AWS) that automatically distributes incoming application traffic across
multiple Amazon Elastic Compute Cloud (Amazon EC2) instances. It is a fully
managed load balancer that automatically scales in response to incoming
traffic, providing a simple and cost-effective way to ensure that applications
are highly available and able to handle the demands of your users.
ELB offers three different types of load balancers: Application Load Balancer
(ALB), Network Load Balancer (NLB), and Classic Load Balancer (CLB). The
type of load balancer you choose will depend on your specific requirements,
such as the type of traffic you are handling and the level of performance you
need.
ELB can also be integrated with other AWS services, such as Amazon Route
53 and Amazon CloudWatch, to provide additional functionality and visibility
into your application's performance.
2. What are the key features provided by Elastic Load Balancer (ELB)?

Some of the key features provided by Elastic Load Balancer (ELB) include:

1. Automated scaling: ELB automatically scales in response to incoming traffic,


ensuring that your application can handle the demands of your users.
2. High availability: ELB automatically distributes traffic across multiple Amazon
Elastic Compute Cloud (Amazon EC2) instances, providing a highly available
and fault-tolerant solution for your applications.
3. Multiple load balancer types: ELB offers three different load balancer types:
Application Load Balancer (ALB), Network Load Balancer (NLB), and Classic
Load Balancer (CLB). This allows you to choose the load balancer that best
fits your specific requirements.
4. Flexible load balancing: ELB supports multiple protocols and provides
advanced features such as SSL termination and sticky sessions, allowing you
to configure your load balancer to meet the specific needs of your application.
5. Integration with other AWS services: ELB can be integrated with other AWS
services, such as Amazon Route 53 and Amazon CloudWatch, to provide
additional functionality and visibility into your application's performance.
6. Security: ELB provides built-in security features, such as support for Secure
Sockets Layer (SSL) and Transport Layer Security (TLS), to help protect your
applications from threats.
7. Cost-effective: ELB is a fully managed service, which means that you don't
have to worry about managing and maintaining your load balancer. This
makes it a cost-effective solution for ensuring the availability and performance
of your applications.
3. How AWS Elastic Load Balancing Works?

AWS Elastic Load Balancing (ELB) is a service that automatically distributes


incoming application traffic across multiple Amazon Elastic Compute Cloud
(Amazon EC2) instances. It is a fully managed load balancer that
automatically scales in response to incoming traffic, providing a simple and
cost-effective way to ensure that your applications are highly available and
able to handle the demands of your users.
When you create an ELB load balancer, you specify the protocol and port that
you want it to listen on, as well as the Amazon EC2 instances that you want it
to route traffic to. ELB then automatically distributes incoming traffic across
the specified instances in a manner that ensures the maximum performance
and availability of your application.
ELB uses a number of strategies to distribute traffic, such as round-robin,
least connections, and connection draining. It also provides advanced
features such as SSL termination, sticky sessions, and support for multiple
protocols, allowing you to tailor your load balancer to the specific needs of
your application.
Additionally, ELB integrates with other AWS services, such as Amazon Route
53 and Amazon CloudWatch, to provide additional functionality and visibility
into your application's performance. This allows you to monitor and optimize
the performance of your applications in real time.
4. What are the types of load balancers?

There are three types of load balancers offered by AWS Elastic Load Balancing
(ELB):

1. Application Load Balancer (ALB): An ALB is a layer 7 load balancer that


routes traffic based on the content of the request. It is designed to handle
traffic from modern, web-based applications and provides advanced features
such as host-based routing and support for multiple protocols.
2. Network Load Balancer (NLB): An NLB is a layer 4 load balancer that routes
traffic based on network and transport layer information. It is designed to
handle high volumes of traffic with extreme performance and provides support
for TCP and UDP protocols.
3. Classic Load Balancer (CLB): A CLB is a layer 4 or layer 7 load balancer that
routes traffic based on network and transport layer information. It is the
original load balancer offered by ELB and provides a simple, flexible solution
for balancing traffic across multiple instances.

5. What is the difference between auto-scaling and ELB?


Auto-scaling and Elastic Load Balancer (ELB) are two separate services
offered by Amazon Web Services (AWS), but they are often used together to
ensure the availability and performance of applications.
Auto-scaling is a service that automatically adjusts the number of Amazon
Elastic Compute Cloud (Amazon EC2) instances in your application's fleet
based on pre-defined policies. This allows you to ensure that your application
always has the right amount of compute resources to handle the demands of
your users.
On the other hand, ELB is a service that automatically distributes incoming
application traffic across multiple Amazon EC2 instances. It is a fully managed
load balancer that automatically scales in response to incoming traffic,
providing a simple and cost-effective way to ensure that your applications are
highly available and able to handle the demands of your users.
While auto-scaling and ELB can be used independently, they are often used
together to provide a highly available and scalable application architecture.
Auto-scaling can ensure that your application always has the right number of
EC2 instances to handle incoming traffic, while ELB distributes that traffic
across those instances in a manner that ensures the maximum performance
and availability of your application.
6. What are Load balancing web sockets?

Load balancing web sockets is the process of distributing incoming web


socket traffic across multiple servers or instances in order to ensure the
availability and performance of an application. Web sockets are a technology
that allows for full-duplex communication between a client and a server over a
single, long-lived TCP connection. This allows for real-time, bidirectional
communication between the client and server, making it ideal for applications
such as online gaming, real-time messaging, and live data streaming.
Load balancing web sockets can be performed using a load balancer, such as
AWS Elastic Load Balancing (ELB). A load balancer acts as a reverse proxy,
accepting incoming web socket traffic and distributing it across multiple
instances in a manner that ensures the maximum performance and availability
of your application.

Load balancing web sockets can provide a number of benefits, such as


increased scalability, improved performance, and better reliability. By
distributing incoming traffic across multiple instances, a load balancer can
ensure that your application can handle a higher number of concurrent
connections and can provide a better user experience for your users.
7. How can we assign a static IP address to a ELB?

You cannot assign a static IP address to an Elastic Load Balancer (ELB) in


the same way that you would assign a static IP address to a device such as a
computer or a server. This is because ELB is a fully managed service that
automatically scales in response to incoming traffic, and the IP address of the
load balancer can change over time as the number of instances or availability
zones in your application changes.
However, you can use Amazon Route 53 to create a CNAME record that
maps a subdomain (such as "www.example.com") to the DNS name of your
ELB load balancer. This allows you to use a consistent hostname to access
your application, even if the underlying IP address of the load balancer
changes.
Additionally, you can use a feature called "Elastic IP addresses" in Amazon
EC2 to assign a static IP address to your application's instances. This allows
you to access your instances using a consistent IP address, even if the
instances are terminated and replaced with new instances. This can be useful
if your application requires a static IP address for connectivity or security
purposes.
8. Difference between Ingress and Load Balancer?

Ingress Load Balancer

Distribute incoming traffic across multiple servers


Route incoming traffic to the
or instances in order to ensure the
Purpose appropriate service within
availability and performance of an
a Kubernetes cluster
application

Kubernetes-specificYes No

Available outside of
No Yes
Kubernetes

Advanced routing
Yes No
capabilities

Can be used with any

type of No Yes

application

9. List the types of techniques that are used by load balancers?


Load balancers use a variety of techniques to distribute incoming traffic across
multiple servers or instances. Some of the most common load balancing techniques
include:

1. Round-robin: In this technique, the load balancer distributes incoming traffic to


each server or instance in turn, starting with the first one in the list and moving
down the list in a circular fashion. This technique is simple and easy to
implement, but it does not take into account the relative performance of each
server or instance.
2. Least connections: In this technique, the load balancer routes traffic to the
server or instance with the fewest number of active connections. This
technique ensures that traffic is distributed evenly among the available
servers or instances, and can help to prevent any single server or instance
from becoming overloaded.
3. Least response time: In this technique, the load balancer measures the
response time of each server or instance and routes traffic to the one with the
lowest response time. This technique helps to ensure that users receive the
fastest possible response from your application, but it can be more complex to
implement and requires the load balancer to have access to performance
metrics for each server or instance.
4. Weighted round-robin: In this technique, the load balancer assigns a weight to
each server or instance, indicating the relative capacity of that server or
instance. The load balancer then distributes traffic among the servers or
instances based on their weights, with servers or instances with higher
weights receiving a proportionally higher share of traffic. This technique allows
you to control the distribution of traffic among your servers or instances, and
can be useful if some servers or instances have more capacity than others.
5. Server affinity (or sticky sessions): In this technique, the load balancer routes
all subsequent requests from the same client to the same server or instance
that the client first connected to. This technique can be useful if your
application maintains state information on the server or instance, such as
session data, and you want to ensure that subsequent requests from the
same client are handled by the same server or instance.

These are just a few examples of the techniques that load balancers can use to
distribute traffic. The specific technique that a load balancer uses will depend on the
requirements of your application and the capabilities of the load balancer itself.

10. What do you mean by a target group in AWS Load Balancing?

In AWS Elastic Load Balancing (ELB), a target group is a group of Amazon


Elastic Compute Cloud (Amazon EC2) instances that you want your load
balancer to route traffic to. Each target group is associated with a specific load
balancer, and you can have multiple target groups associated with the same
load balancer.
When you create a target group, you specify the protocol and port that the
target group will use, as well as the Amazon EC2 instances that you want to
include in the group. The load balancer will then route traffic to the target
group based on the protocol and port that you specified.

Target groups are a key concept in AWS ELB, as they allow you to route
traffic to specific groups of instances within your application. This allows you
to create multiple target groups, each with a different set of instances, and
route traffic to the appropriate group based on the specific needs of your
application. For example, you could create one target group for web servers
and another for application servers, and route traffic to the appropriate group
based on the type of traffic received.
In summary, a target group in AWS ELB is a group of Amazon EC2 instances
that you want your load balancer to route traffic to. It allows you to create
multiple groups of instances, each with its own protocol and port, and route
traffic to the appropriate group based on the needs of your application.
11. What is the purpose of the AWS Elastic load balancer?

The purpose of AWS Elastic Load Balancer (ELB) is to distribute incoming


application traffic across multiple Amazon Elastic Compute Cloud (Amazon
EC2) instances in order to ensure the availability and performance of your
applications. ELB is a fully managed service that automatically scales in
response to incoming traffic, providing a simple and cost-effective way to
ensure that your applications are highly available and able to handle the
demands of your users.
ELB offers three different types of load balancers: Application Load Balancer
(ALB), Network Load Balancer (NLB), and Classic Load Balancer (CLB). The
type of load balancer you choose will depend on your specific requirements,
such as the type of traffic you are handling and the level of performance you
need.
ELB can also be integrated with other AWS services, such as Amazon Route
53 and Amazon CloudWatch, to provide additional functionality and visibility
into your application's performance. This allows you to monitor and optimize
the performance of your applications in real time.

In summary, the purpose of AWS ELB is to distribute incoming traffic across


multiple Amazon EC2 instances in order to ensure the availability and
performance of your applications. It is a fully managed service that provides a
simple and cost-effective way to ensure the availability and performance of
your applications.
12. What are the three types of elastic Load Balancing?

The three types of Elastic Load Balancing offered by Amazon Web Services (AWS)
are:
1. Application Load Balancer (ALB): An ALB is a layer 7 load balancer that
routes traffic based on the content of the request. It is designed to handle
traffic from modern, web-based applications and provides advanced features
such as host-based routing and support for multiple protocols.
2. Network Load Balancer (NLB): An NLB is a layer 4 load balancer that routes
traffic based on network and transport layer information. It is designed to
handle high volumes of traffic with extreme performance and provides support
for TCP and UDP protocols.
3. Classic Load Balancer (CLB): A CLB is a layer 4 or layer 7 load balancer that
routes traffic based on network and transport layer information. It is the
original load balancer offered by ELB and provides a simple, flexible solution
for balancing traffic across multiple instances.

13. What is the difference between cluster and load balancing?

Cluster Load Balancing

Increase the performance and Ensure the availability and performance of

reliability of an application by an application by distributing


Purpose
dividing the workload among incoming traffic among multiple

multiple computers servers or instances

Group of interconnected
Yes No
computers

Technique for distributing


No Yes
incoming traffic

Used to increase

performance and
Yes Yes

reliability
Used to ensure availability
Yes Yes
and performance

14. What is a database cluster?

A database cluster is a group of interconnected computers that work together


to provide a single, logical database. In a database cluster, each computer, or
node, in the cluster runs a separate instance of the database management
system (DBMS), and the nodes communicate with each other to coordinate
the storage and retrieval of data.
Database clusters are typically used to increase the performance and
availability of a database by distributing the workload among multiple
computers. This allows the database to scale horizontally and handle a larger
number of requests and a larger amount of data than a single computer could
handle on its own.
Database clusters also provide increased reliability and availability, as they
allow the database to continue operating even if one or more nodes in the
cluster fail. In a cluster, data is automatically replicated among the nodes, so if
one node fails, the other nodes can continue to serve data to users without
interruption.
In summary, a database cluster is a group of interconnected computers that
work together to provide a single, logical database. It is used to increase the
performance and availability of a database by distributing the workload among
multiple computers, and provides increased reliability and availability through
data replication.
15. Explain NLB in AWS?

Network Load Balancer (NLB) is a type of Elastic Load Balancer offered by


Amazon Web Services (AWS). NLB is a layer 4 load balancer that routes
traffic based on network and transport layer information, such as the source
and destination IP addresses and ports. It is designed to handle high volumes
of traffic with extreme performance and provides support for the TCP and
UDP protocols.
NLB is a fully managed service that automatically scales in response to
incoming traffic, providing a simple and cost-effective way to ensure the
availability and performance of your applications. NLB uses a flow-hash
algorithm to distribute traffic among the available instances in a manner that
ensures the maximum performance and availability of your application.
In addition to its high performance and scalability, NLB also provides a
number of other features that make it well-suited for a wide range of
applications. These features include support for multiple ports and protocols,
the ability to route traffic based on the content of the request, and integration
with other AWS services such as Amazon Route 53 and Amazon
CloudWatch.

Overall, NLB is a powerful and flexible load balancer that is well-suited for
applications that require high performance and the ability to handle large
volumes of traffic. It is a fully managed service that provides a simple and
cost-effective way to ensure the availability and performance of your
applications.
16. What is VPC load balancer?

A VPC (Virtual Private Cloud) load balancer is a load balancer that is


deployed within a VPC. A VPC is a virtual network that you can create in
AWS, and it provides a secure and isolated environment for your AWS
resources.

A VPC load balancer allows you to distribute incoming traffic across multiple
Amazon Elastic Compute Cloud (Amazon EC2) instances within your VPC.
This can help to ensure the availability and performance of your applications,
and allows you to scale your applications horizontally to handle a larger
number of requests.
VPC load balancers are available in two types: Application Load Balancer
(ALB) and Network Load Balancer (NLB). ALB is a layer 7 load balancer that
routes traffic based on the content of the request, while NLB is a layer 4 load
balancer that routes traffic based on network and transport layer information.
VPC load balancers are fully managed by AWS, and they automatically scale
in response to incoming traffic. They also provide a number of advanced
features, such as support for multiple ports and protocols, the ability to route
traffic based on the content of the request, and integration with other AWS
services such as Amazon Route 53 and Amazon CloudWatch.

In summary, a VPC load balancer is a load balancer that is deployed within a


VPC and that distributes incoming traffic among multiple Amazon EC2
instances. It is available in two types (ALB and NLB) and is fully managed by
AWS, providing a simple and cost-effective way to ensure the availability and
performance of your applications.
17. How many types of ELB are there in AWS?

There are three types of Elastic Load Balancer (ELB) offered by Amazon Web
Services (AWS):

1. Application Load Balancer (ALB): An ALB is a layer 7 load balancer that


routes traffic based on the content of the request. It is designed to handle
traffic from modern, web-based applications and provides advanced features
such as host-based routing and support for multiple protocols.
2. Network Load Balancer (NLB): An NLB is a layer 4 load balancer that routes
traffic based on network and transport layer information. It is designed to
handle high volumes of traffic with extreme performance and provides support
for TCP and UDP protocols.
3. Classic Load Balancer (CLB): A CLB is a layer 4 or layer 7 load balancer that
routes traffic based on network and transport layer information. It is the
original load balancer offered by ELB and provides a simple, flexible solution
for balancing traffic across multiple instances.

These three types of ELB offer different features and capabilities, and the specific
type of ELB that you choose will depend on the requirements of your application.

18. What is the purpose of the AWS Elastic load balancer?

The purpose of AWS Elastic Load Balancer (ELB) is to distribute incoming


application traffic across multiple Amazon Elastic Compute Cloud (Amazon
EC2) instances in order to ensure the availability and performance of your
applications. ELB is a fully managed service that automatically scales in
response to incoming traffic, providing a simple and cost-effective way to
ensure that your applications are highly available and able to handle the
demands of your users.
ELB offers three different types of load balancers: Application Load Balancer
(ALB), Network Load Balancer (NLB), and Classic Load Balancer (CLB). The
type of load balancer you choose will depend on your specific requirements,
such as the type of traffic you are handling and the level of performance you
need.
ELB can also be integrated with other AWS services, such as Amazon Route
53 and Amazon CloudWatch, to provide additional functionality and visibility
into your application's performance. This allows you to monitor and optimize
the performance of your applications in real time.
In summary, the purpose of AWS ELB is to distribute incoming traffic across
multiple Amazon EC2 instances in order to ensure the availability and
performance of your applications. It is a fully managed service that provides a
simple and cost-effective way to ensure the availability and performance of
your applications.
19. Which load balancer is best AWS?

The best load balancer for your AWS environment will depend on your
specific requirements and the type of traffic that you are handling. AWS offers
three different types of Elastic Load Balancer (ELB): Application Load
Balancer (ALB), Network Load Balancer (NLB), and Classic Load Balancer
(CLB).
If you are handling traffic from modern, web-based applications, then ALB is
likely the best choice. ALB is a layer 7 load balancer that routes traffic based
on the content of the request, and it provides advanced features such as host-
based routing and support for multiple protocols.

If you are handling high volumes of traffic with extreme performance


requirements, then NLB is likely the best choice. NLB is a layer 4 load
balancer that routes traffic based on network and transport layer information,
and it is designed to handle high volumes of traffic with extreme performance.
If you are looking for a simple, flexible load balancer that can handle a wide
range of traffic types, then CLB is likely the best choice. CLB is a layer 4 or
layer 7 load balancer that provides a simple, flexible solution for balancing
traffic across multiple instances.
Overall, the best load balancer for your AWS environment will depend on your
specific requirements and the type of traffic that you are handling. It is best to
evaluate the different types of ELB available and choose the one that is best
suited to your needs.
20. Does ELB have IP address?

Yes, Elastic Load Balancer (ELB) has an IP address. When you create an
ELB, AWS assigns a unique IP address to the load balancer. This IP address
is used by clients to access the services that are provided by the load
balancer.

ELB offers two types of IP addresses: a public IP address and a private IP


address. The public IP address is the address that is used by clients to
access the load balancer from the internet, while the private IP address is the
address that is used by the load balancer to communicate with the instances
that are registered with the load balancer.
The specific IP address assigned to an ELB will depend on the type of load
balancer that you are using. For example, if you are using an Application Load
Balancer (ALB), then the IP address will be a public IP address that is
assigned by AWS. If you are using a Network Load Balancer (NLB), then the
IP address will be a private IP address that is assigned by AWS.
In summary, ELB has an IP address that is used by clients to access the
services provided by the load balancer. The specific IP address will depend
on the type of ELB that you are using, and can be either a public IP address
or a private IP address.
21. What is difference between ELB and NLB?

ELB NLB
Type of traffic handled Wide range High volumes

Level of performance Flexible, scalable Extreme performance

Type of load balancer offered ALB, NLB, CLB NLB

Based on content of request (ALB) or Based on network and

Routing of traffic network and transport layer transport layer

information (NLB, CLB) information

Protocols supported Multiple (ALB), TCP and UDP (NLB, CLB)


TCP and UDP

Suitability for applications requiring high

performance and ability to handle large


Yes (ALB, NLB) Yes (NLB)

volumes of traffic

In summary, the main difference between ELB and NLB is the type of traffic that they

can handle and the level of performance that they provide. ELB is a flexible, scalable

load balancer that can handle a wide range of traffic types, while NLB is a high-

performance load balancer that is specifically designed to handle large volumes of

traffic with extreme performance.

22. What is difference between ALB and ELB?

The main difference between Application Load Balancer (ALB) and Elastic
Load Balancer (ELB) is the type of traffic that they can handle and the level of
performance that they provide.
ALB is a type of ELB that is specifically designed to handle traffic from
modern, web-based applications. It is a layer 7 load balancer that routes
traffic based on the content of the request, and it provides advanced features
such as host-based routing and support for multiple protocols. ALB is well-
suited for applications that require a high level of flexibility and the ability to
route traffic based on the content of the request.
ELB, on the other hand, is a load balancer that can handle a wide range of
traffic types and provides a flexible, scalable solution for balancing traffic
across multiple instances. In addition to ALB, ELB also offers Network Load
Balancer (NLB) and Classic Load Balancer (CLB), which provide different
features and capabilities.
In summary, the main difference between ALB and ELB is the type of traffic
that they can handle and the level of performance that they provide. ALB is a
type of ELB that is specifically designed to handle traffic from modern, web-
based applications, while ELB is a load balancer that can handle a wide range
of traffic types and provides a flexible, scalable solution for balancing traffic
across multiple instances.
23. Does ELB need gateway?
ELB stands for Elastic Load Balancer, which is a service provided by Amazon
Web Services (AWS) that allows users to distribute incoming traffic across
multiple targets, such as Amazon EC2 instances, containers, and IP
addresses. An ELB can improve the availability and fault tolerance of your
application, and it can automatically scale to handle increases in traffic.
In order to use an ELB, you will need to have a gateway set up to route traffic
to the load balancer. This could be a hardware gateway, such as a router or
switch, or it could be a software gateway, such as a virtual private cloud
(VPC) gateway. Once the gateway is in place, you can configure the ELB to
receive traffic from the gateway and distribute it to the targets as needed.
It's important to note that while an ELB does require a gateway to function, the
gateway does not need to be an AWS service. You can use any gateway that
is compatible with the ELB and your specific application architecture.

You might also like