DAY-8 AWS-CSA
1] What is Network Loadbalancer in AWS
An AWS Network Load Balancer (NLB) is a high-performance Layer 4 (Transport Layer) load balancer that distributes incoming traffic across multiple targets (EC2 instances, containers, or IP addresses) based on TCP, UDP, or TLS protocols.
Key Features of NLB
Layer 4 Load Balancing
High Performance & Low Latency
Static IP & Elastic IP Support
Zonal Failover & Health Checks
TLS Offloading
Target Types Supported
Cross-Zone Load Balancing (Optional)
Use Cases of NLB
2] What is Gateway loadbalancer ?
The AWS Gateway Load Balancer (GWLB) is a Layer 3 (Network Layer) load balancer designed specifically for deploying, managing, and scaling third-party virtual appliances like firewalls, intrusion detection systems (IDS), deep packet inspection (DPI), and network monitoring tools
Key Features of Gateway Load Balancer (GWLB)
Works at Layer 3 (Network Layer)
Intelligent Traffic Distribution
Transparent Deployment
Inline Security Inspection
Highly Scalable & Resilient
Simplifies Security & Traffic Control
Use Cases of GWLB
How Gateway Load Balancer Works
3] OSI 7 layers
The OSI (Open Systems Interconnection) Model is a conceptual framework used to understand how different network protocols interact in a communication system. It has 7 layers, each with a specific function.
4] Elastic load balancer-sticky sessions
What are Sticky Sessions in AWS ELB?
Sticky sessions (also called session affinity) allow a client to be consistently routed to the same backend instance for the duration of the session. This is useful for applications that store session-specific data on a particular instance, like shopping carts or login sessions.
How Does It Work?
Types of Load Balancers Supporting Sticky Sessions:
Network Load Balancer (NLB) does not support sticky sessions.
How to Enable Sticky Sessions in ALB?
Use Cases for Sticky Sessions
? E-commerce websites (Shopping carts, user preferences) ? Login-based applications (Session-based authentication) ? Applications with in-memory caching (e.g., Redis, Memcached)
Limitations & Considerations
? May cause uneven load balancing (One instance may get overloaded) ? Not recommended for stateless applications ? Sessions tied to a single instance (If the instance fails, session data is lost)
5] Sticky sessions-Cookie names
Sticky sessions (session affinity) in AWS Elastic Load Balancer (ELB) ensure that requests from the same client are always routed to the same backend instance during a session. This is achieved using cookies, which can be categorized as follows:
1?? Application-Based Cookies
These cookies are managed by the Application Load Balancer (ALB) and are used when stickiness is enabled at the target group level.
?? Types of Application-Based Cookies
1.1 Custom Cookie
? Example: If your application creates a cookie called session_id, you can configure the ALB to use it for stickiness.
1.2 Application Cookie (AWS-Generated Cookie)
? Example: ALB sets a cookie like:
2?? Duration-Based Cookies
Used by Classic Load Balancer (CLB) and managed by AWS.
2.1 AWS-Generated Cookie (AWSELB)
? Example: The CLB sets a cookie like:
6] Elastic load balancer-cross-Zone load balancing
?? What is Cross-Zone Load Balancing?
Cross-Zone Load Balancing is a feature in AWS Elastic Load Balancer (ELB) that distributes incoming traffic evenly across all registered instances in multiple Availability Zones (AZs), rather than only within a single AZ.
领英推荐
?? How It Works?
?? Without Cross-Zone Load Balancing (Disabled by Default in NLB & CLB)
?? With Cross-Zone Load Balancing (Enabled in ALB by Default)
?? How to Enable Cross-Zone Load Balancing?
?? For Classic Load Balancer (CLB)
?? For Network Load Balancer (NLB)
?? Advantages of Cross-Zone Load Balancing
? Better Resource Utilization - Prevents uneven traffic distribution across instances.
? Higher Availability - If one AZ has fewer instances, traffic is balanced across all AZs.
? Prevents Overloading - Ensures no single instance receives excessive traffic.
?? When Should You Use It?
7] What is SSL/TLS in ELB?
AWS Elastic Load Balancer (ELB) supports SSL/TLS termination, which helps secure traffic between clients and the load balancer. ELB can manage SSL certificates and offload the encryption/decryption process from backend instances.
?? SSL/TLS Certificate Management in ELB
To enable HTTPS on your ELB, you need an SSL certificate. ELB supports certificates issued by AWS Certificate Manager (ACM) or imported manually.
? Where Does ELB Use SSL Certificates?
?? Types of SSL Termination in ELB
1?? SSL Termination (Managed at ELB Level)
2?? SSL Passthrough (Managed at Instance Level)
3?? SSL Re-encryption
?? Steps to Attach SSL Certificate to ELB
?? Using AWS Console
?? AWS Certificate Manager (ACM)
AWS Certificate Manager (ACM) allows you to create and manage free SSL/TLS certificates for ELB.
?? Requesting a Certificate in ACM
?? Benefits of Using SSL on ELB
? Improved Security – Encrypts data between clients and ELB.
? SSL Offloading – Reduces CPU load on backend servers.
? Compliance – Meets security standards like PCI DSS.
? Free SSL with ACM – Saves costs on SSL certificates.
8] What is Server Name Indication (SNI)?
Server Name Indication (SNI) is an extension of the TLS (Transport Layer Security) protocol that allows multiple SSL certificates to be hosted on a single IP address. This enables hosting multiple domains or subdomains with different SSL certificates on the same AWS Elastic Load Balancer (ELB).
?? Why is SNI Needed?
?? How SNI Works in AWS ELB
?? How to Enable SNI in AWS ELB
?? Step 1: Create or Import SSL Certificates in AWS Certificate Manager (ACM)
?? Step 2: Attach SSL Certificates to ELB
?? Benefits of SNI in AWS ELB
? Host multiple domains with SSL on one ELB
? Saves IP addresses (No need for dedicated IPs)
? Cost-effective (No extra ELB needed for each certificate)
? Works seamlessly with AWS Certificate Manager (ACM)
9] What is Connection Draining / Deregistration Draining?
Connection Draining (for Classic Load Balancer) or Deregistration Draining (for Application & Network Load Balancers) is a feature that ensures active requests are completed before a backend instance is deregistered or terminated.
This prevents abrupt disconnections and improves the user experience by allowing ongoing requests to finish before the instance stops receiving new traffic.
?? How Connection/Deregistration Draining Works?
?? Connection Draining in Classic Load Balancer (CLB)
?? How to Enable Connection Draining in CLB?
?? Deregistration Draining in ALB & NLB
?? How to Enable Deregistration Draining in ALB/NLB?
?? Benefits of Connection/Deregistration Draining
? Prevents abrupt termination of user sessions.
? Ensures a smooth removal of instances in Auto Scaling.
? Improves application reliability and user experience.
? Helps maintain graceful shutdowns of backend servers.
Certified multi-cloud and DevOps Professional | Data | Developer | Architecture
4 周Hey Meet Soni , just so I know Classic Load Balancer will soon be deprecated right? If not already..?
Meet Soni, your clear breakdown of AWS load balancing concepts is incredibly valuable for anyone scaling their cloud infrastructure!