0
0
Nginxdevops~20 mins

Proxy buffering in Nginx - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Proxy Buffering Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Effect of disabling proxy buffering in nginx
What will be the effect on response delivery when proxy_buffering off; is set in an nginx configuration?
Nginx
location /api/ {
    proxy_pass http://backend;
    proxy_buffering off;
}
Anginx will reject the request if the backend response is larger than the default buffer size.
Bnginx will stream the response directly to the client without buffering, reducing latency for large or slow responses.
Cnginx will cache the response permanently on disk for future requests.
Dnginx will buffer the entire response before sending it to the client, increasing latency but improving throughput.
Attempts:
2 left
💡 Hint
Think about how buffering affects response delivery speed and latency.
Configuration
intermediate
2:00remaining
Correct syntax to enable proxy buffering with custom buffer sizes
Which nginx configuration snippet correctly enables proxy buffering with a 16k buffer size and 4 buffers of 8k each?
A
proxy_buffering on;
proxy_buffer_size 16k;
proxy_buffers 4 8k;
B
proxy_buffering on;
proxy_buffer_size 8k;
proxy_buffers 16 4k;
C
proxy_buffering off;
proxy_buffer_size 16k;
proxy_buffers 4 8k;
D
proxy_buffering on;
proxy_buffer_size 4 8k;
proxy_buffers 16k;
Attempts:
2 left
💡 Hint
Check the order and format of buffer size directives.
Troubleshoot
advanced
2:00remaining
Troubleshooting slow client response with proxy buffering enabled
A user complains that responses from your nginx proxy are slow to start arriving, although the backend server responds quickly. You suspect proxy buffering settings. Which configuration change is most likely to fix this?
ASet <code>proxy_buffering off;</code> to disable buffering and stream responses immediately.
BIncrease <code>proxy_buffers</code> to a larger number to hold more data before sending.
CEnable <code>proxy_cache</code> to cache responses and speed up delivery.
DReduce <code>proxy_buffer_size</code> to a smaller value to limit buffer memory.
Attempts:
2 left
💡 Hint
Think about how buffering affects the start of response delivery.
Best Practice
advanced
2:00remaining
Best practice for proxy buffering with slow backend and fast clients
For a backend server that produces data slowly but clients expect fast response start, what is the best proxy buffering setting in nginx?
AEnable proxy buffering with small buffers to reduce memory usage.
BEnable proxy buffering with large buffers to accumulate data before sending.
CDisable proxy buffering to stream data immediately to clients.
DDisable proxy buffering and enable caching to speed up responses.
Attempts:
2 left
💡 Hint
Consider the trade-off between buffering delay and client experience.
🧠 Conceptual
expert
2:00remaining
Understanding proxy buffering impact on memory and performance
Which statement correctly describes the impact of enabling proxy buffering in nginx on memory usage and client experience?
AEnabling proxy buffering decreases memory usage and always reduces latency for clients.
BDisabling proxy buffering increases memory usage and improves client experience by caching responses.
CDisabling proxy buffering reduces memory usage and causes nginx to reject large responses.
DEnabling proxy buffering increases memory usage but can improve throughput and reduce load on backend servers.
Attempts:
2 left
💡 Hint
Think about how buffering stores data temporarily and affects backend load.