0
0
Nginxdevops~10 mins

Why rate limiting prevents abuse in Nginx - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the rate limit zone name to 'mylimit'.

Nginx
limit_req_zone $binary_remote_addr zone=[1]:10m rate=1r/s;
Drag options to blanks, or click blank then click option'
Amylimit
Bzone1
Climit
Daddrlimit
Attempts:
3 left
💡 Hint
Common Mistakes
Using a reserved word like 'limit' as the zone name.
2fill in blank
medium

Complete the code to apply the rate limit using the zone 'mylimit'.

Nginx
limit_req zone=[1] burst=5 nodelay;
Drag options to blanks, or click blank then click option'
Amylimit
Bzone1
Climit
Daddrlimit
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different zone name than defined.
3fill in blank
hard

Fix the error in the rate limit directive to correctly limit requests to 10 per second.

Nginx
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=[1];
Drag options to blanks, or click blank then click option'
A10/s
B10r/s
C10rps
D10requests
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting 'r/s' or using incorrect units like '10/s'.
4fill in blank
hard

Fill both blanks to limit requests from the same IP to 5 per second with a burst of 10.

Nginx
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=[1];
limit_req zone=mylimit burst=[2] nodelay;
Drag options to blanks, or click blank then click option'
A5r/s
B10r/s
C5
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing rate and burst values or units.
5fill in blank
hard

Fill all three blanks to create a rate limit zone named 'limitzone' with 20MB memory, limit 15 requests per second, and apply it with burst 20.

Nginx
limit_req_zone $binary_remote_addr zone=[1]:[2] rate=[3];
limit_req zone=limitzone burst=20 nodelay;
Drag options to blanks, or click blank then click option'
Alimitzone
B15r/s
C20m
D10m
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong memory size units or wrong rate format.