Fabio: Rate limiting

Created on 20 Jun 2016  路  6Comments  路  Source: fabiolb/fabio

Hi,

Do you think its possible/makes sense to add an optional ability to rate limit services via fabio?

Cheers

enhancement

Most helpful comment

This is picking up some more steam so I'd like to state where the issues are IMO. For this, I'd like to have the discussion on how to implement this first before we jump into pull requests.

IMO, there are two main issues:

  • There is currently no way to express a rate limit in fabio. For this the config language needs to change and the route tags (see #111) need to change as well. This would pave the way for a whole lot of other things as well so this might end up in a separate ticket or as a subtask of #111.
  • The implementation should be pluggable to test different approaches just like with the route matcher. Ideally, we start out with a stateless approach where each fabio instance decides by itself whether or not to block a given client. It can then inform the others (e.g. via consul) that a certain client has been blocked and until when. This eliminates the need for a shared state which would have to be hit on every request.

Lets use this as a starting point for the discussion and see where this leads us.

All 6 comments

It is on the list of things to do. I'll poke the colleagues who are working on this.

Cool - has there been work pushed on this already?

No not yet. The discussion is around how to implement that without having shared state between multiple fabio instances. I think this would also require #111 to be able to express what the limits are per route and how to react to them.

This is picking up some more steam so I'd like to state where the issues are IMO. For this, I'd like to have the discussion on how to implement this first before we jump into pull requests.

IMO, there are two main issues:

  • There is currently no way to express a rate limit in fabio. For this the config language needs to change and the route tags (see #111) need to change as well. This would pave the way for a whole lot of other things as well so this might end up in a separate ticket or as a subtask of #111.
  • The implementation should be pluggable to test different approaches just like with the route matcher. Ideally, we start out with a stateless approach where each fabio instance decides by itself whether or not to block a given client. It can then inform the others (e.g. via consul) that a certain client has been blocked and until when. This eliminates the need for a shared state which would have to be hit on every request.

Lets use this as a starting point for the discussion and see where this leads us.

@magiconair Hi, it is possible/makes sense to add an optional ability to rate limit services via fabio now?

has there been work pushed on this already?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandruast picture alexandruast  路  4Comments

drawks picture drawks  路  12Comments

stevehorsfield picture stevehorsfield  路  11Comments

EvertMDC picture EvertMDC  路  3Comments

axingblog picture axingblog  路  3Comments