DEV Community

Discussion on: I built a popular open source API project, Ask Me Anything!

Collapse
 
ayyappa99 profile image
Ayyappa

I was totally amazed to see the volume its handling currently! Great work!
I would like to know what measures you usually take to stop abuse or any sort of DDoS attacks as the API seems to be public.

Collapse
 
phalt profile image
Paul Hallett

Cloudflare provides a free tier that blocks a tonne of malicious traffic for us. I guess there is not much to exploit so we're quite lucky when it comes to DDOSing, it's almost always innocent young developers accidentally spamming the server.

Collapse
 
ayyappa99 profile image
Ayyappa

Thanks for the details. Do you have any recommendations on protecting a public api from DDoS attacks? I haven't found a direct way with Cloud Flare to protect a REST API, where as I see they have good details for protecting a website though.

Thread Thread
 
phalt profile image
Paul Hallett

Set your DNS up with Cloudflare, it'll deal with 90% of issues. You can also set up rate limiting in your project. We used to do rate limiting by IP address.