AWS Interview Question ( ELB, ALB, AWS WAF, GLB )
General Concepts
- What is the default limit for ELB instances in a single AWS account?
The default limit for ELB instances is 50 per region, which can be increased by submitting a request to AWS Support. - Can you attach multiple certificates to a single listener?
Yes, ALB supports multiple certificates using Server Name Indication (SNI). - What is the purpose of the “forwarding action” in ALB listener rules?
It forwards requests to one or more target groups based on conditions defined in the rules. - Does NLB support path-based or host-based routing?
No, NLB does not support path-based or host-based routing as it operates at Layer 4. - What is the role of DNS in ELB?
ELB automatically provides a DNS name that routes client requests to the load balancer.
Types and Comparisons
- When should you use ALB over NLB?
Use ALB for HTTP/HTTPS traffic where advanced routing, WebSocket, or HTTP/2 support is required. - What is the primary use case for a Gateway Load Balancer (GLB)?
GLB is used for integrating and scaling virtual appliances, such as firewalls or intrusion detection systems. - What is the key difference between CLB and ALB?
CLB supports both Layer 4 and Layer 7 traffic but lacks advanced routing features, while ALB is optimized for Layer 7 traffic with advanced rules. - Can ALB and NLB share the same target group?
No, ALB and NLB cannot share the same target group because they operate at different layers of the OSI model. - Which load balancer type is best suited for microservices architecture?
ALB is ideal due to its advanced Layer 7 features like path-based routing and host-based routing.
Configuration
- What happens if no rules match a request in ALB?
The default action (either forwarding to a target group or returning a fixed response) is applied. - Can an ELB distribute traffic across multiple AWS accounts?
Yes, by registering cross-account targets using IP-based or Lambda targets. - What is the purpose of listener timeouts in ELB?
They define the duration a connection can remain idle before being closed by the load balancer. - How can you redirect HTTP to HTTPS using ALB?
Create a listener rule in ALB that redirects HTTP traffic on port 80 to HTTPS on port 443. - How do you assign static IP addresses to NLB?
By associating Elastic IPs with NLB during its creation.
Security
- How does ALB integrate with AWS WAF?
AWS WAF can filter and block malicious traffic at the ALB level based on defined rules. - What is mutual TLS authentication in ELB?
It ensures both the client and server verify each other using SSL/TLS certificates. - How do you restrict access to ELB from specific IP ranges?
Use security groups or network ACLs to restrict access by IP address or range. - What happens if an SSL certificate attached to an ALB expires?
HTTPS traffic will fail, resulting in connection errors. Renew and update the certificate to restore functionality. - How does Shield Advanced protect ELB from DDoS attacks?
Shield Advanced offers enhanced DDoS protection and provides detailed diagnostics for ELB.
Health Checks
- What are the differences between active and passive health checks?
- Active checks: Regularly probe targets using health check settings.
- Passive checks: Monitor traffic for errors and mark targets as unhealthy based on response codes.
2. How can you customize HTTP headers in health checks?
Use custom health check settings in ALB to define additional headers.
3. What happens if the health check path in ALB is incorrect?
All targets will be marked as unhealthy, and traffic will not be routed.
4. How does health check status impact Auto Scaling?
Auto Scaling automatically replaces instances marked as unhealthy by ELB health checks.
Get Yuvraj Singh’s stories in your inbox
Join Medium for free to get updates from this writer.
5. What is the minimum number of consecutive health check failures for a target to be marked unhealthy?
The default is 2, but this value is configurable.
Traffic Management
- What is connection multiplexing in ELB?
Connection multiplexing allows ALB to reuse existing connections between the client and backend to reduce latency. - How does ELB support high availability across AZs?
By distributing incoming traffic across targets in multiple Availability Zones. - What is the role of deregistration delay in ELB?
It ensures existing connections are completed before a target is removed from the target group. - What is the purpose of target group stickiness?
It ensures a client is consistently routed to the same target within a target group. - How does ELB handle uneven traffic distribution?
ELB balances traffic based on weights assigned to targets or target groups.
Monitoring and Debugging
- What are request tracing headers in ALB?
They include anX-Amzn-Trace-Idheader to track requests through the load balancer. - How can you analyze traffic logs for an ELB?
Enable access logging and analyze logs stored in an S3 bucket. - What is the purpose of the SurgeQueueLength metric in NLB?
It tracks the number of requests waiting for target connections. - How do you monitor failed health checks in ELB?
Use theUnHealthyHostCountmetric in CloudWatch. - What is the effect of HTTP 504 errors in ELB?
It indicates the backend target is not responding within the timeout period.
Integration and Use Cases
- How do you integrate ELB with Kubernetes?
Use the AWS Load Balancer Controller to create ALB or NLB resources for Kubernetes services. - What is the purpose of deregistering targets in maintenance mode?
It allows ongoing connections to complete while preventing new traffic to those targets. - Can ELB route traffic to an on-premises server?
Yes, by registering the on-premises server’s IP address in the target group. - How does ELB handle gRPC traffic?
ALB supports gRPC for real-time and low-latency communication applications. - What are typical use cases for ALB redirect actions?
- HTTP to HTTPS redirection.
- Redirecting old URLs to new URLs.
Optimization and Costs
- How do you optimize ELB performance?
- Enable cross-zone load balancing.
- Tune health checks for faster failover.
2. How do you minimize ELB costs?
Use the appropriate ELB type and ensure optimal target group utilization.
3. What is a slow-start mode in target groups?
It gradually increases the target’s traffic share after registration to avoid overloading.
4. How does ALB handle idle connections?
ALB closes idle connections after the idle timeout period (default is 60 seconds).
5. What is the impact of weighted routing in ALB?
It distributes traffic based on assigned weights for testing or gradual rollouts.
Special Scenarios
- How do you perform blue-green deployments using ALB?
Use separate target groups for each version and switch traffic using listener rules. - Can you attach an ALB to multiple Auto Scaling groups?
Yes, multiple Auto Scaling groups can register targets in a single target group. - What happens when ELB scales beyond its initial capacity?
ELB dynamically scales its infrastructure to handle additional traffic. - Can ELB handle encrypted traffic end-to-end?
Yes, by using HTTPS between clients, the ELB, and backend targets. - What is the difference between “Fixed-response” and “Redirect” actions in ALB?
- Fixed-response: Returns a specific HTTP status code and response body.
- Redirect: Sends clients to a different URL.









