How to prevent DDoS Attack from HTTP server written in Go?

Could you please list some strategies or even approaches you have already applied to prevent/protect/minimize DDOS attacks upon Restful Web Services?

thanks in advance.

1 Like

Run your Go code behind a reverse proxy like NGINX. It can help you to prevent a DDOS attack.


Not strictly DoS related (and I’m not sure how to do what you ask), but “So you want to expose Go on the Internet” has a few good pointers. It’s a bit over a year old though so may not be fully up to date.


Rate limiting seems to be one approach that helps and is easily implemented in middleware. Alex Edwards has a post on How to Rate Limit HTTP Requests which I found useful and of course OWASP is always a great resource for security information.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.