0
0
Rest APIprogramming~5 mins

Per-user vs per-IP limits in Rest API - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What is a per-user limit in API rate limiting?
A per-user limit restricts the number of API requests a single user can make within a certain time frame, regardless of their IP address.
Click to reveal answer
beginner
What does a per-IP limit control in API usage?
A per-IP limit restricts the number of API requests coming from a single IP address within a set time, regardless of how many users share that IP.
Click to reveal answer
intermediate
Why might per-user limits be better for APIs with logged-in users?
Because they track individual users, per-user limits prevent one user from overusing the API even if they switch IPs, ensuring fair use among users.
Click to reveal answer
intermediate
What is a downside of using only per-IP limits?
If many users share the same IP (like in offices or public Wi-Fi), they might hit the limit quickly, blocking legitimate users unfairly.
Click to reveal answer
advanced
How can combining per-user and per-IP limits improve API security?
Combining both limits helps stop abuse from single users and from many requests coming from one IP, balancing fairness and protection.
Click to reveal answer
What does a per-user limit track in API rate limiting?
ATotal requests from all users
BRequests from a single IP address
CIndividual user requests regardless of IP
DRequests from a specific device type
Which scenario is a disadvantage of per-IP limits?
AUsers sharing the same IP get blocked too soon
BUsers can switch IPs to bypass limits
CLimits are too strict for individual users
DLimits do not apply to logged-in users
Why might an API use per-user limits instead of per-IP limits?
ATo block all requests from an IP
BTo track individual user activity accurately
CTo allow unlimited requests from users
DTo ignore user authentication
What is a benefit of combining per-user and per-IP limits?
ABetter protection against abuse from users and IPs
BAllows unlimited requests from all users
CBlocks all users from the same IP
DRemoves the need for authentication
If a user changes their IP address, which limit still controls their API usage?
ANeither limit
BPer-IP limit
CBoth limits stop working
DPer-user limit
Explain the difference between per-user and per-IP limits in API rate limiting.
Think about who or what is being tracked for limiting requests.
You got /4 concepts.
    Describe why combining per-user and per-IP limits can be more effective than using just one.
    Consider different ways users and IPs can be abused.
    You got /3 concepts.