NGINX Configuration: Demonstrate Free Sample Questions

Description

Covers demonstrating how to manage NGINX connections and bandwidth, restrict access, configure logging and certificates, and enable HTTPS and other associated security settings.

12 free sample questions150 in the full practice test

Try simulator

F5N3 Sample Questions

  1. Question 1

    Intermediate

    Demonstrate how to manage connections and bandwidth · Rate limiting vs bandwidth throttling

    A systems engineer is configuring NGINX to protect a backend API from being overwhelmed by sudden traffic spikes. The requirement is to limit requests to 10 per second per IP address, but allow bursts of up to 20 requests to be processed immediately without adding artificial delay. Which configuration block achieves this?

    Answer and explanation

    Correct answer: A

    The correct configuration uses 'limit_req_zone' to define the rate (10r/s) and 'limit_req' with both 'burst=20' to allow queuing up to 20 requests, and 'nodelay' to ensure those burst requests are processed immediately rather than being delayed to match the 10r/s rate.

  2. Question 2

    Intermediate

    Demonstrate how to manage connections and bandwidth · Set a bandwidth limit

    A video streaming platform wants to allow users to download the first 50 Megabytes of a video file at full speed, but then restrict the download speed to 500 Kilobytes per second for the remainder of the file to save bandwidth. Which combination of NGINX directives should be used?

    Answer and explanation

    Correct answer: C

    The 'limit_rate_after' directive specifies the amount of data (50m) that is transferred at maximum speed before the bandwidth throttling specified by 'limit_rate' (500k) takes effect.

  3. Question 3

    AdvancedMultiple answers

    Demonstrate how to manage connections and bandwidth · Enable and optimize keep-alives

    To optimize performance, an administrator wants to enable persistent connections (keep-alives) between NGINX and a pool of upstream HTTP/1.1 application servers. Which THREE configurations are required to achieve this? (Select THREE)

    Answer and explanation

    Correct answers: A, B, E

    By default, NGINX uses HTTP/1.0 for upstream connections, which does not support keep-alives natively in the same way. You must explicitly set 'proxy_http_version 1.1;'.

    By default, NGINX sets the 'Connection: close' header when communicating with upstreams. Clearing this header allows the HTTP/1.1 keep-alive mechanism to function properly.

    To enable upstream keep-alives, you must specify the 'keepalive' directive in the upstream block (e.g., keepalive 32;) to set the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process.

  4. Question 4

    Intermediate

    Demonstrate how to manage connections and bandwidth · Limit connections to server and upstreams

    Company Alpha is running a file hosting service. They are experiencing issues where malicious users open hundreds of slow connections to tie up server resources, but each connection only downloads data at a very slow rate. The architect wants to limit the number of concurrent connections per IP address to 5.

    Which directive correctly establishes the shared memory zone required for this connection limiting?

    Answer and explanation

    Correct answer: A

    The 'limit_conn_zone' directive is required to define the state storage for connection limiting. '$binary_remote_addr' is used as the key (which is more memory-efficient than '$remote_addr'), and 'zone=addr:10m' names the zone 'addr' and allocates 10 megabytes of shared memory.

  5. Question 5

    Beginner

    Demonstrate how to manage connections and bandwidth · Enable and optimize keep-alives

    True or False: The NGINX keepalive_timeout directive sets the maximum time a keep-alive client connection will stay open on the server side, and its default value is 0 (which disables keep-alives).

    Answer and explanation

    Correct answer: B

    False. While a value of 0 does disable keep-alive client connections, the default value in NGINX OSS is 75 seconds, not 0. Keep-alives are enabled by default.

  6. Question 6

    Intermediate

    Demonstrate how to manage connections and bandwidth · Set a bandwidth limit

    An administrator needs to enforce a dynamic bandwidth limit. Clients authenticating as 'premium' users should have no bandwidth limit (0), while 'standard' users should be limited to 100k per second. The user type is extracted to a variable named $user_bandwidth_limit.

    Which directive correctly applies this dynamic limit in a location block?

    Answer and explanation

    Correct answer: D

    The 'limit_rate' directive supports the use of variables (since version 1.17.0). By passing the variable '$user_bandwidth_limit' (which would evaluate to '0' for premium and '100k' for standard), NGINX dynamically throttles the bandwidth per request.

Register free for 6 more questions

Or unlock all 150 F5N3 questions with explanations, timed mode and flashcards.