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

Potential issue with jdomain - keep seeing requests sending to old upstream after DNS update #60

Closed
kongdewen opened this issue Jan 6, 2021 · 10 comments · Fixed by #75
Labels
help wanted Extra attention is needed

Comments

@kongdewen
Copy link

kongdewen commented Jan 6, 2021

Hey Folks,

We are seeing some weird issue after we upgrade jdomain to the latest release.

We have a very dynamic upstream which DNS updated quite often. We have been using jdomain to help with the upstream IP resolving. After upgrade, we are starting to see the issue that request keeps sending to old upstream after DNS update. We have no idea what could be wrong.

Any help will be appreciated,

Our upstream nginx config setup is pretty simple:

upstream upstream-upstream {
    jdomain xxx.xxx.xxx.xxx port=xx;
    keepalive 256;
  }

we are using openresty with version 1.19.3.1

@nicholaschiasson
Copy link
Owner

Thanks for raising this, I'll be looking into it.

@nicholaschiasson
Copy link
Owner

Could you provide some additional details please?
How many workers do you have configured?
After a DNS update, for how long does nginx continue forwarded requests to the old upstreams? Does it self correct after a long period or require an nginx reload?

@kongdewen
Copy link
Author

hey @nicholaschiasson, we have 64 worker process configured, we didn't some test, after a DNS update, we didn't see self correct even after a long period time and nginx reload resolve this issue.

@nicholaschiasson nicholaschiasson added the help wanted Extra attention is needed label Jan 29, 2021
@zdm
Copy link

zdm commented Mar 7, 2021

Seems, that module not works woth the nginx 1.19.7.
Peers ip addresses resolved at startup and cached forever.

@InvisibleFunction
Copy link

I believe I've experienced this issue with nginx 1.16.1 on centos7. My upstream is an s3 bucket which returns 1 ip with a ttl of 5s but I would see my connections stick with the same backend even if I explicitly defined a short interval.

@AljoschaDembowsky2909
Copy link

@nicholaschiasson any updates on this issue? We are looking forward to use this module in combination with AWS ALB upstreams but we have to make sure that the DNS resolving is working as expected. AWS ALB's will return up to 3 IP addresses and they update alot if the traffic scales in or out and if one or more ip's are cached indefintely this will cause more harm than good. In our current setup with the default proxy pass resolving workaround using variables we experience timeouts once in a while but we want to reduce this to a bare minimum.
Unfortunately we dont have an C developer in our team who could support you but any feedback/update would be greatly appreciated.

Setup:
Nginx 1.19.X
50+ AWS ALB upstreams

@nicholaschiasson
Copy link
Owner

Hi @AljoschaDembowsky2909,
Thanks for the detailed description. Sorry, no update on this issue just yet. I am hoping to make the time to tackle it very soon.

@Hacksign
Copy link

Same issue here.
Alpine Linux with docker, nginx 1.18.0, nginx-mod-http-upstream-jdomain-1.18.0-r13.

@atomsnc
Copy link

atomsnc commented May 11, 2022

@kongdewen @zdm @InvisibleFunction @AljoschaDembowsky2909 @Hacksign can you please try jdomain version 0.9.11 and see if you still get the issue?

@nicholaschiasson
Copy link
Owner

Hi all, @kongdewen @zdm @InvisibleFunction @AljoschaDembowsky2909 @Hacksign,

This issue has been accidentally closed as it was referenced in #75 . Thanks for that fix @atomsnc !

I am hopeful now with this bugfix, but I don't want to disregard this issue in case people are still facing it. I realize this is years old for some of you now, but if you would have some time to test your setup with the latest version of this module and try validating if this is fixed now, then that would be very appreciated.

I will keep this issue closed for now, and if it seems to continue being a problem, I will reopen it.

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants