A company runs a stateful web application on EC2 instances behind a Network Load Balancer. The application requires that client requests from a particular session are always sent to the same target instance. Which feature should the SysOps administrator configure on the NLB to meet this requirement?
Sticky sessions on an NLB are implemented through flow-based routing, also known as client IP affinity, which uses a consistent hash of the connection's protocol, source IP, source port, destination IP, and destination port to route all flows from a client to the same target. Unlike ALBs, NLBs cannot rely on cookie-based stickiness because they operate at Layer 4, so this affinity mechanism is the correct way to ensure a stateful web application's user requests consistently hit the same EC2 instance, preserving session state.
Why this answer
Network Load Balancers (NLBs) support session stickiness through flow-based routing based on the client's IP address and port (Layer 4). This ensures that requests from the same client session are consistently routed to the same target instance, meeting the requirement without using application-layer cookies.
Exam trap
The trap here is that candidates often confuse NLB features with ALB features, assuming path-based routing or HTTP-level cookies apply to NLBs, when in fact NLBs operate at Layer 4 and use flow-based stickiness rather than application-layer session persistence.
How to eliminate wrong answers
Option A is wrong because path-based routing rules are a feature of Application Load Balancers (ALBs), not Network Load Balancers (NLBs); NLBs route traffic based on TCP/UDP/TLS protocols and do not inspect HTTP paths. Option B is wrong because health checks determine target availability but do not influence session persistence; they only mark unhealthy targets as out of service. Option D is wrong because cross-zone load balancing distributes traffic evenly across targets in all Availability Zones, which can actually break session affinity by sending requests to different targets; it does not provide session stickiness.