Live data from Hacker News

Tollbooth: HTTP rate limiter middleware in Go

didipkerabat.com

1–10 of 21 posts

Re: Tollbooth: HTTP rate limiter middleware in Go

#3

This is neat. What's the best way to do rate limiting in from of Apache for wordpress/drupal sites these days? everytime I go looking for something new I'm dissapointed.

You could use the OP's project and point everything that makes it through the limiter at Apache with a reverse proxy http://golang.org/pkg/net/http/httputil/#ReverseProxy

Re: Tollbooth: HTTP rate limiter middleware in Go

#7
post #6

Serious question: why would you not use HAProxy, nginx or similar software which arguably are more battle tested in this domain?

You can do that when the HTTP call is simple, when you need some logic in the rate limitation ( auth, login ect... ) it's impossible.

Re: Tollbooth: HTTP rate limiter middleware in Go

#8
post #6

Serious question: why would you not use HAProxy, nginx or similar software which arguably are more battle tested in this domain?

For general rate limiting, yes HAProxy or Nginx make more sense.

Having different rate limits for different endpoints becomes unmanageable in HAProxy/Nginx; and having different rate limits say across different plans or users is all but impossible.

Re: Tollbooth: HTTP rate limiter middleware in Go

#9

This is neat. What's the best way to do rate limiting in from of Apache for wordpress/drupal sites these days? everytime I go looking for something new I'm dissapointed.

Use mod_security as most Apache installs already have it enabled and it achieves the same thing.

Re: Tollbooth: HTTP rate limiter middleware in Go

#10
post #6

Serious question: why would you not use HAProxy, nginx or similar software which arguably are more battle tested in this domain?

Four startups ago, I did a simpler one in Nginx using embedded Lua and Redis. It can definitely be done, but writing it in Go is easier, and funner :D
Post reply on HN