F5N2 NGINX Configuration: Knowledge Practice Questions
Prepare for F5N2 with more than an answer.
- Exam fee
- $50 USD
- Time limit
- 30 minutes
- Questions on the exam
- 30
- Passing score
- 245
- Level
- Administrator
- Valid for
- 2 years from the date you pass the last of the four exams
Domains covered on the exam 4
- Configure NGINX as a load balancer25%
- Configure NGINX as a content cache server25%
- Configure NGINX as a web server25%
- Configure NGINX as a reverse proxy25%
- 1
A developer wants to test a new version of an application with production traffic without impacting actual users. How can NGINX be configured to duplicate incoming requests and send a copy to a testing backend, while ignoring the responses from the testing backend?
Show answer details
Correct answer: B
The 'mirror' directive in NGINX is used to duplicate traffic. It specifies a background location where requests are mirrored. NGINX will send the request to both the primary backend and the mirrored location simultaneously, and any responses from the mirrored backend are discarded.
- 2
You are configuring NGINX as a content cache server. You attempt to define the cache storage using the
proxy_cache_pathdirective, but NGINX fails to start, citing a syntax error. In which NGINX configuration context MUST theproxy_cache_pathdirective be placed?Show answer details
Correct answer: D
The 'proxy_cache_path' directive, which sets the path and other parameters of a cache, is valid ONLY in the 'http' context. Placing it inside a 'server' or 'location' block will cause NGINX to throw a configuration syntax error.
- 3
You want NGINX to cache HTTP 200 and 302 responses for 10 minutes, and HTTP 404 responses for 1 minute. Which configuration snippet correctly defines this minimum retention policy?
Show answer details
Correct answer: C
The 'proxy_cache_valid' directive sets caching time for different response codes. You can specify multiple codes in a single directive followed by the time duration. To set different times for different codes, you use multiple 'proxy_cache_valid' directives.
- 4
A systems engineer is configuring NGINX Open Source as a load balancer for a cluster of three backend application servers. No specific load balancing algorithm has been defined in the
upstreamblock. How will NGINX distribute the incoming requests by default?Show answer details
Correct answer: B
By default, if no load balancing algorithm is specified in an upstream block, NGINX Open Source uses the Round Robin algorithm. This algorithm distributes incoming requests sequentially across all available servers in the pool, assuming equal weighting.
- 5
You are configuring passive health checks for an upstream pool in NGINX Open Source. You want NGINX to consider a server 'down' if it fails to respond successfully 5 times within a 30-second window. Which server directive parameters should you use?
Show answer details
Correct answer: B
In NGINX Open Source, passive health checks are configured using the 'max_fails' and 'fail_timeout' parameters on the 'server' directive within an 'upstream' block. 'max_fails=5' sets the number of unsuccessful attempts, and 'fail_timeout=30s' sets both the window in which those failures must occur and how long the server will be considered unavailable.
- 6
A high-traffic e-commerce site uses NGINX to load balance requests to backend inventory servers. Some inventory queries take significantly longer to process than others, leading to uneven load distribution when using Round Robin. Which algorithm is best suited to resolve this issue by routing new requests to the server with the lowest active workload?
Show answer details
Correct answer: D
The 'least_conn' algorithm instructs NGINX to pass a new request to the server with the least number of active connections, while also taking server weights into consideration. This is ideal for scenarios where requests have varying execution times, preventing one server from being overwhelmed while others sit idle. Note that 'least_time' is an NGINX Plus exclusive feature.
