Bird
Raised Fist0
AWScloud~20 mins

Network Load Balancer (NLB) in AWS - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
NLB Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does a Network Load Balancer handle sudden traffic spikes?

Imagine a popular online store uses a Network Load Balancer (NLB) to distribute incoming customer requests. Suddenly, a flash sale causes a huge spike in traffic. How does the NLB manage this sudden increase?

AIt automatically scales to handle millions of requests per second without pre-warming.
BIt queues incoming requests until backend servers are free to handle them.
CIt drops excess requests when traffic exceeds a fixed limit set during setup.
DIt redirects traffic to a backup load balancer to share the load.
Attempts:
2 left
💡 Hint

Think about how NLBs are designed to handle large volumes of traffic efficiently.

❓ Architecture
intermediate
2:00remaining
Choosing the right target type for an NLB

You are designing a system using an AWS Network Load Balancer. You have two options for targets: IP addresses or instance IDs. Which choice allows you to load balance traffic to resources outside your VPC?

AUsing instance IDs because they allow cross-region load balancing.
BUsing instance IDs because they represent EC2 instances inside the VPC only.
CUsing IP addresses because they can point to any reachable resource, including outside the VPC.
DUsing IP addresses because instance IDs are deprecated.
Attempts:
2 left
💡 Hint

Consider which target type can represent resources outside the AWS environment.

❓ scaling
advanced
2:00remaining
Estimating capacity for a Network Load Balancer

Your application expects 10 million TCP connections per minute. You plan to use an NLB to distribute this load. Which of the following is the best estimate of the NLB's capacity to handle this traffic?

ANLB can handle up to 1 million connections per minute, so you need 10 NLBs.
BNLB cannot handle TCP connections, only HTTP/HTTPS.
CNLB capacity depends on backend instances, so you must scale instances, not the NLB.
DNLB can handle millions of connections per second, so a single NLB can handle 10 million per minute easily.
Attempts:
2 left
💡 Hint

Recall the NLB's design for high throughput and connection handling.

❓ tradeoff
advanced
2:00remaining
Tradeoffs between Network Load Balancer and Application Load Balancer

You need to choose between an AWS Network Load Balancer (NLB) and an Application Load Balancer (ALB) for your service. Which statement correctly describes a key tradeoff?

ANLB operates at the transport layer (TCP/UDP) and offers ultra-low latency, while ALB operates at the application layer (HTTP/HTTPS) with more routing features.
BALB can handle millions of connections per second, but NLB is limited to thousands.
CNLB supports advanced HTTP routing features, while ALB only supports TCP routing.
DNLB is cheaper but less reliable than ALB.
Attempts:
2 left
💡 Hint

Think about the OSI layers where each load balancer operates and their feature sets.

❓ component
expert
3:00remaining
Request flow through a Network Load Balancer with multiple AZs

Consider an NLB deployed across three Availability Zones (AZs) with backend instances in each AZ. A client sends a TCP request. Which sequence best describes the request flow from client to backend instance?

A1, 2, 4, 3
B1, 2, 3, 4
C2, 1, 3, 4
D1, 3, 2, 4
Attempts:
2 left
💡 Hint

Think about how NLB preserves client IP and routes within AZs.

Practice

(1/5)
1. What is the primary purpose of an AWS Network Load Balancer (NLB)?
easy
A. To efficiently distribute TCP/UDP traffic at the connection level
B. To manage HTTP requests with advanced routing rules
C. To store and retrieve data in a scalable way
D. To provide a user interface for managing AWS resources

Solution

  1. Step 1: Understand NLB's traffic handling

    NLB works at the connection level and handles TCP/UDP traffic efficiently.
  2. Step 2: Compare with other AWS services

    Unlike Application Load Balancer, NLB does not manage HTTP features but focuses on low latency and high throughput for TCP/UDP.
  3. Final Answer:

    To efficiently distribute TCP/UDP traffic at the connection level -> Option A
  4. Quick Check:

    NLB purpose = TCP/UDP load balancing [OK]
Hint: NLB handles TCP/UDP, not HTTP features [OK]
Common Mistakes:
  • Confusing NLB with Application Load Balancer
  • Thinking NLB manages HTTP routing
  • Assuming NLB stores data
2. Which of the following is a valid characteristic of an AWS Network Load Balancer (NLB)?
easy
A. Only supports HTTP and HTTPS protocols
B. Requires manual scaling for high traffic
C. Automatically modifies HTTP headers
D. Supports static IP addresses for the load balancer

Solution

  1. Step 1: Identify NLB features

    NLB supports static IP addresses, which is useful for fixed IP requirements.
  2. Step 2: Eliminate incorrect options

    NLB does not only support HTTP/HTTPS (it supports TCP/UDP), does not modify HTTP headers, and scales automatically.
  3. Final Answer:

    Supports static IP addresses for the load balancer -> Option D
  4. Quick Check:

    Static IP support = true for NLB [OK]
Hint: NLB supports static IPs, unlike ALB [OK]
Common Mistakes:
  • Thinking NLB only supports HTTP/HTTPS
  • Assuming NLB modifies HTTP headers
  • Believing NLB requires manual scaling
3. Given an NLB configured to balance TCP traffic across three targets, what happens if one target becomes unhealthy?
medium
A. NLB stops sending traffic to the unhealthy target and continues with healthy ones
B. NLB sends traffic evenly to all targets regardless of health
C. NLB shuts down until the unhealthy target recovers
D. NLB redirects traffic to a backup Application Load Balancer

Solution

  1. Step 1: Understand NLB health checks

    NLB performs health checks and routes traffic only to healthy targets.
  2. Step 2: Analyze behavior on unhealthy target

    If a target is unhealthy, NLB excludes it from routing until it recovers.
  3. Final Answer:

    NLB stops sending traffic to the unhealthy target and continues with healthy ones -> Option A
  4. Quick Check:

    Health checks exclude unhealthy targets [OK]
Hint: NLB routes only to healthy targets [OK]
Common Mistakes:
  • Assuming NLB sends traffic to unhealthy targets
  • Thinking NLB stops completely on failure
  • Believing NLB redirects to ALB automatically
4. You configured an NLB but notice it is not distributing UDP traffic as expected. What is the most likely cause?
medium
A. Health checks are disabled for the target group
B. The target group is configured for TCP instead of UDP
C. NLB does not support UDP traffic
D. NLB requires HTTP listeners for UDP traffic

Solution

  1. Step 1: Check protocol configuration

    NLB supports UDP, but the target group must be set to UDP to handle UDP traffic.
  2. Step 2: Identify misconfiguration

    If the target group is set to TCP, UDP traffic won't be routed correctly.
  3. Final Answer:

    The target group is configured for TCP instead of UDP -> Option B
  4. Quick Check:

    Target group protocol must match traffic [OK]
Hint: Match target group protocol to traffic type [OK]
Common Mistakes:
  • Thinking NLB does not support UDP
  • Ignoring target group protocol settings
  • Assuming health checks cause traffic issues
5. You need to design a highly scalable system that requires static IP addresses and low latency for millions of TCP connections. Which AWS load balancer should you choose and why?
hard
A. Gateway Load Balancer, because it manages HTTP and TCP traffic with static IPs
B. Application Load Balancer, because it supports HTTP routing and static IPs
C. Network Load Balancer, because it supports static IPs and handles millions of TCP connections with low latency
D. Classic Load Balancer, because it is the newest and fastest option

Solution

  1. Step 1: Identify requirements

    The system needs static IPs, low latency, and support for millions of TCP connections.
  2. Step 2: Match requirements to load balancer features

    NLB supports static IPs, is designed for extreme scalability, and handles TCP traffic efficiently with low latency.
  3. Step 3: Eliminate incorrect options

    ALB focuses on HTTP, Classic LB is older and less scalable, Gateway LB is for network appliances, not general TCP load balancing.
  4. Final Answer:

    Network Load Balancer, because it supports static IPs and handles millions of TCP connections with low latency -> Option C
  5. Quick Check:

    Static IP + TCP + scalability = NLB [OK]
Hint: For static IP and TCP scale, choose NLB [OK]
Common Mistakes:
  • Choosing ALB for TCP static IP needs
  • Confusing Classic LB as newest
  • Assuming Gateway LB handles general TCP load balancing
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard