(3) Part 2 - AWS Hands-on | Network Load Balancer | SSL Certificates
Network LB
The choice between NLBs and ALBs depends on the specific needs of your application and the type of traffic you need to handle.
A Network Load Balancer (NLB) operates at the network layer (Layer 4) of the OSI model.
NLBs are more suitable for handling traffic that requires high performance and low latency, such as TCP and UDP traffic, whereas ALBs are more suitable for applications that require advanced routing, SSL termination, and content-based routing.
Hands-On
Select all the regions where you want to deploy.
You can see our 2 instances are healthy and by using NLB DNS name we can see if these 2 instances are running
Delete the NLB as it will charge.
Gateway Load Balancer
Elastic Load Balancing (ELB) and Application Load Balancing (ALB) are both load-balancing services provided by Amazon Web Services (AWS), but they have some differences.
ELB is a service that automatically distributes incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, within one or more Availability Zones. It can handle both HTTP and HTTPS traffic, and it supports both IPv4 and IPv6. ELB also provides features such as SSL/TLS termination, health checks, and auto-scaling.
ALB, on the other hand, is a more advanced load-balancing service that is designed for modern application architectures, such as microservices and container-based applications. ALB operates at the application layer (layer 7) of the OSI model, whereas ELB operates at the transport layer (layer 4). This means that ALB can intelligently route traffic based on the content of the requests, such as the URL path or the HTTP headers, in addition to factors such as the IP address and port number. ALB also supports advanced features such as content-based routing, WebSocket support, and containerized applications running on Amazon ECS.
In summary, while both ELB and ALB are load-balancing services, ALB is a more advanced and flexible service that is specifically designed for modern application architectures.
Concept of SSL certificates
Generally, client refers to the end-user or the device that is accessing a website or application. The client can be any device that can connect to the internet and access a website, such as a web browser on a desktop or laptop computer, a mobile phone or tablet, or any other internet-connected device.
When a client connects to a website or application that is distributed across multiple servers behind a load balancer, the load balancer acts as an intermediary between the client and the servers. The load balancer receives requests from the client and distributes them across the servers based on various factors, such as the current load on each server or the type of request.
In order to establish a secure connection between the client and the servers behind the load balancer, SSL/TLS encryption is used. This encryption helps to protect sensitive data transmitted between the client and the servers from being intercepted and read by unauthorized third parties. The client must trust the SSL/TLS certificate presented by the load balancer to establish a secure connection.
SSL Certificates
An SSL (Secure Sockets Layer) certificate is a digital certificate that is used to establish a secure encrypted connection between a web browser and a web server. It is a way to verify the identity of a website and to encrypt the data that is transmitted between the website and the browser.
Hands-On
Enabling Certificates both on ALB and NLB
Got to your Load balancer and Add a listener.
Click on Add. By this we enabled certificate from ACM to the LB. So that client machine can securely connect to the servers.