Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adds conditional to hanlde if redis becomes unavailable #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
michaelerobertsjr wants to merge 5 commits into ded:master
base: master
Choose a base branch
Loading
from michaelerobertsjr:master

Conversation

@michaelerobertsjr
Copy link

@michaelerobertsjr michaelerobertsjr commented Dec 8, 2015

Nice package!!

However using this in production (even with a highly available Redis cluster), means that the developer needs to handle if Redis becomes unavailable.

This is highly unlikely, but we would not want our rate limiter to kill our route if Redis has any issue(s).

It's pretty hard to swap out middleware in a running express app when it is setup like this:

app.post('/api/endpoint', limiter(limitOptions),
 function (req, res) { ... }
);

I this was the simplest workaround I could think of. I will write some tests if you would like but, this patch is pretty easy to manually test...

vincentkwok reacted with thumbs up emoji
Copy link
Owner

ded commented Dec 9, 2015

Hi @michaelerobertsjr thanks for your contribution!
This is a good and viable patch. Would you mind sticking to the existing style of the code. run make lint and be sure to remove the double quotes and add a whitespace after keywords like function and if. Also, please remove the version bump. I'll take care of that myself.
When finished push it back and I'll merge it.

michaelerobertsjr reacted with thumbs up emoji

Copy link

jpennal commented Mar 23, 2016

Any update on merging this change in? Its definitely a feature that I need. Thanks.

michaelerobertsjr reacted with thumbs up emoji

Copy link
Author

@ded Can you have a look now? Removed the double quotes, added white space, and removed the version bump. Thx.

Copy link

Any word on this getting merged? This is something I also need. @ded

Copy link

vincentkwok commented Sep 27, 2017
edited
Loading

any follow up ? @ded

Copy link
Author

@ded bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /