F5N2 Sample Questions & Answers
The weighting splits evenly across four NGINX roles: balancing load across backend servers, caching content to speed delivery, serving general-purpose web traffic, and proxying client connections in reverse.
Launch the full F5N2 simulator →Showing 6 of 12 free samples.
- Question 1IntermediateSelect 2
Configure NGINX as a load balancer · Layer 4 (stream) load balancing
An administrator needs to configure NGINX to load balance raw TCP traffic for a legacy database cluster, rather than HTTP traffic. Which TWO directives or blocks are essential for configuring this Layer 4 load balancing? (Select TWO)
Show answer & explanation
Correct answers: A, C
Layer 4 (TCP/UDP) load balancing in NGINX must be configured within the 'stream' context, as opposed to the 'http' context used for Layer 7 traffic.
Within the 'stream' block's 'server' configuration, the 'proxy_pass' directive is used to forward the raw TCP/UDP connections to an upstream group.
- Question 2Beginner
Configure NGINX as a load balancer · Server-down behavior
True or False: NGINX Open Source supports out-of-the-box active health checks (using the
health_checkdirective) to proactively probe upstream servers without relying on actual client traffic.Show answer & explanation
Correct answer: B
False. NGINX Open Source only supports passive health checks (monitoring real client requests for errors). Active health checks, which use the 'health_check' directive to proactively send synthetic probes to backend servers, are a commercial feature exclusive to NGINX Plus.
- Question 3Advanced
Configure NGINX as a load balancer · LB algorithms
A video streaming platform uses NGINX to load balance requests to backend cache servers. To maximize cache hit ratios, requests for the same video file must always be routed to the same backend server, regardless of the client's IP address. Which load balancing configuration achieves this?
Show answer & explanation
Correct answer: C
The 'hash' algorithm allows you to distribute load based on a specific text string or variable. By using 'hash $request_uri', NGINX maps requests for the same file path to the same backend server, improving cache utilization. Adding the 'consistent' parameter ensures minimal remapping if a server is added or removed (Consistent Hashing).
- Question 4Intermediate
Configure NGINX as a load balancer · Load balancing pools/systems (upstream)
You are managing an NGINX upstream group with three primary application servers and one maintenance server. The maintenance server should only receive traffic if all three primary servers are marked as down. How should you configure the maintenance server in the upstream block?
Show answer & explanation
Correct answer: C
Appending the 'backup' parameter to a server directive within an upstream block marks that server as a backup. NGINX will only pass requests to a backup server if all primary (non-backup) servers are currently unavailable or down.
- Question 5Advanced
Configure NGINX as a load balancer · Memory zone tuning
When configuring an upstream block in a multi-worker NGINX environment, you notice that the 'least_conn' load balancing algorithm is not behaving optimally. Each worker process appears to be maintaining its own independent count of active connections to the backend servers. Which directive must be added to the upstream block to resolve this?
Show answer & explanation
Correct answer: B
The 'zone' directive defines a shared memory zone where all NGINX worker processes share state information about the upstream group, such as active connections and failure counts. Without this directive, each worker process keeps its own independent state, which degrades the effectiveness of algorithms like 'least_conn' and passive health checks across the worker pool.
flowchart TD subgraph Without Zone W1[Worker 1] --> S1[State A] W2[Worker 2] --> S2[State B] end subgraph With Zone W3[Worker 1] --> SZ[(Shared Zone)] W4[Worker 2] --> SZ end - Question 6Advanced
Configure NGINX as a load balancer · API Gateway
A financial services company is using NGINX as an API Gateway. They need to route incoming traffic to different upstream pools based on the first path segment of the URL (e.g.,
/accounts/goes to the Accounts pool,/transactions/goes to the Transactions pool).They also need to ensure that if a request is sent to
/transactions/, the backend server receives the request with the/transactions/prefix removed (e.g.,/transactions/historybecomes/historyon the backend).Which configuration block achieves both the routing and the correct URI rewriting?
Show answer & explanation
Correct answer: B
In NGINX, when the 'proxy_pass' directive includes a URI (even just a trailing slash '/'), NGINX replaces the part of the request URI that matches the 'location' block with the URI specified in 'proxy_pass'. Thus, 'proxy_pass http://transactions_pool/;' will strip '/transactions/' and replace it with '/', turning '/transactions/history' into '/history'. Option A lacks the trailing slash, so the original URI would be passed unmodified.
Ready for the real thing?
The full F5N2 simulator has every exam-style question, timed mode, and instant scoring.