Challenge - 5 Problems
Brotli Compression Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Check if Brotli module is enabled in nginx
You run the command
nginx -V 2>&1 | grep brotli on your server. What output indicates that the Brotli module is enabled?Nginx
nginx -V 2>&1 | grep brotli
Attempts:
2 left
💡 Hint
Look for the phrase '--with-http_brotli_module' in the output.
✗ Incorrect
The presence of '--with-http_brotli_module' in the nginx version configuration output means the Brotli module is compiled and enabled.
❓ Configuration
intermediate1:30remaining
Enable Brotli compression in nginx config
Which nginx configuration snippet correctly enables Brotli compression for text and JSON files?
Attempts:
2 left
💡 Hint
The directive to enable Brotli is 'brotli on;' and you specify file types with 'brotli_types'.
✗ Incorrect
Option D correctly uses 'brotli on;' to enable compression and sets 'brotli_types' to compress text/plain and application/json files.
❓ Troubleshoot
advanced2:00remaining
Why is Brotli compression not working for CSS files?
You enabled Brotli compression in nginx but CSS files are not compressed. Which is the most likely cause?
Attempts:
2 left
💡 Hint
Check which MIME types are listed in 'brotli_types'.
✗ Incorrect
If 'text/css' is not included in 'brotli_types', nginx will not compress CSS files with Brotli.
🔀 Workflow
advanced2:30remaining
Order the steps to enable Brotli compression in nginx
Put these steps in the correct order to enable Brotli compression on an nginx server.
Attempts:
2 left
💡 Hint
You must install the module before configuring it, then test and reload.
✗ Incorrect
First install the module, then configure nginx, test the config, and finally reload nginx to apply changes.
✅ Best Practice
expert2:00remaining
Best practice for Brotli compression level in nginx
Which Brotli compression level setting balances good compression and server performance in nginx?
Attempts:
2 left
💡 Hint
Higher levels compress better but use more CPU time.
✗ Incorrect
Level 5 is a good balance between compression ratio and CPU usage; level 11 is slow, level 1 is fast but less compressed.