Skip to content
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

Routing requests to all peers when they all down #51

Open
eglinux opened this issue Feb 16, 2018 · 3 comments
Open

Routing requests to all peers when they all down #51

eglinux opened this issue Feb 16, 2018 · 3 comments

Comments

@eglinux
Copy link

eglinux commented Feb 16, 2018

Sometimes it happens that healthcheckers configuration gets spoiled. For example, when the new version of application has been deployed on the backend servers without respecting healthchecks on the balancer. In this case all peers will be switched to 'DOWN' state and nginx will return 502 error message for incoming requests.
If balancer detects such issue it could just switch to default routing of all requests to all peers instead.
In theory if all peers are down there is no big reason who shows the error message in situation when we have real problems with all our backend servers.

It is kind of protection from the fool. However, for example AWS application balancer applies it by default.

I have already made a fork and added this feature. You can have a look here: https://github.com/eglinux/lua-resty-upstream-healthcheck
So, if you by chance find this way is ok - I can make a pull request.
Thanks!

@agentzh
Copy link
Member

agentzh commented Feb 26, 2018

@eglinux Yes, we should do it that way. Just be careful about performance :)

Pull requests welcome! And sorry for my late reply.

@eglinux
Copy link
Author

eglinux commented Feb 26, 2018

Pull request is in place #52

@agentzh
Copy link
Member

agentzh commented Feb 26, 2018

@eglinux Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants