Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Add rate limiting #81

Closed
ekryski opened this issue Feb 25, 2016 · 4 comments
Closed

Add rate limiting #81

ekryski opened this issue Feb 25, 2016 · 4 comments

Comments

@ekryski
Copy link
Member

ekryski commented Feb 25, 2016

It would be a good idea to have rate limiting on auth routes by default. Currently I'm using https://www.npmjs.com/package/express-rate-limit in https://github.com/feathersjs/feathers-demos.

@ekryski
Copy link
Member Author

ekryski commented Mar 12, 2016

Since infrastructure is pretty custom and there are various ways you can do rate limiting (a proxy like nginx, app level, feathers service level, etc.) i don't think this should be baked into the core plugin. It should be left up to the user to do outside of the plugin in order to maintain flexibility.

For example, you can add rate limiting to the auth service out side of the plugin.

const limiter = require('express-rate-limit');
// Set up rate limiting the individual services with independent options.
app.use('/auth/local', limiter());
app.use('/auth/token', limiter());

@ekryski ekryski closed this as completed Mar 12, 2016
@elfey
Copy link

elfey commented Mar 3, 2017

Does express-rate-limit cover sockets as well? I'd assume this is exposed only to REST calls.

@marshallswain
Copy link
Member

@elfey I'm interested in collaborating on a plugin based on https://www.npmjs.com/package/fast-ratelimit unless you have something better in mind.

@TimNZ
Copy link

TimNZ commented Feb 8, 2018

Someone had a stab, simple hook around fast-ratelimit

https://github.com/AZaviruha/feathers-hooks-ratelimit

Realistically any real world rate limiting solution needs to work across servers/instances, at the edge, with the load balancers.

This is where API gateways solutions are handy, with deep packet inspection and rules.

AWS and co will devour everything eventually.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants