"If you provide an API client that doesn't include...
# water-cooler
j
"If you provide an API client that doesn't include rate limiting, you don't really have an API client. You've got an exception generator with a remote timer." – Richard Schneeman
👏🏼 1
😂 1
s
This probably applies to the other side as well.... something like: "If you publish an API, but do not implement rate limits, you haven't published an API. You have published an invitation for DOS attacks/ API clients to crash your server."
👍🏼 1
b
ok, so, if someone had such an API... This might be a good tutorial on the why and how of implementing a rate limit in an api... 😉
s
Probably a lot of it depends on the type of API methods you are implementing and how big of a target your API might be, but it is certainly something you should consider when publishing an API. I have published APIs that had no rate limiting because I didn't think they needed it, or only put limits certain methods where I thought clients might be tempted to hit repeatedly for some reason.
m
It also helps if you have a security layer like Cloudflare that can handle rate limiting across the board (granted, not cheap).