Comments (2)
I think easiest way would be to create a new status state INIT and assign that to jdomains that have variable defer
set.
Skip ngx_parse_url
part on those during configuration load and set them as up with dummy values.
When we hit ngx_http_upstream_init_jdomain_peer
, original init_peer
will sometime send as deferred ones since it thinks they are up. We can do the usual and start DNS resolution for all instances like we do now and return NGX_ERROR at very end if the peer sent to us had INIT set.
One of the these might happen after that (I think these are all?)
- If we have an upstream with backup variable, that might get called if there is nothing else or all others are down as well.
- Nothing is found and client gets server or upstream error.
from ngx_upstream_jdomain.
We ran into this. Worked around it with a local dns cache.
Doesnt help on first server start, but subsequent reloads (which were the problem) are significantly improved. Doesnt help however in the case of low ttl (i.e 1s) or some DNS failure codes.
An init state makes sense to me as long as configuration complete can continue to block on DNS lookup. This could allow for parallel lookup and the continuation of configuration parsing and loading. Not sure however if this is possible as the nginx event loop isnt available AFAIK during configuration startup.
from ngx_upstream_jdomain.
Related Issues (20)
- Build failed with openssl 1.1.1g
- Add blocking mode
- Evaluate script or complex values in domain HOT 2
- Make sure alternative server is up in logic for strict
- Test against newer health check module
- Potential issue with jdomain - keep seeing requests sending to old upstream after DNS update HOT 10
- Not able to resolve the VPC endpoint of AWS ES service HOT 4
- Use shared memory HOT 5
- Change DNS query trigger to timer event basis HOT 1
- When using the DOMAIN UPSTREAM module, the VTS Module UPSTREAM counter is all 0.
- num peerps does not match max_ips HOT 4
- Supported Nginx Versions HOT 1
- Support for additional LB options HOT 10
- error: missing initializer for field ‘sin_family’ of ‘struct sockaddr_in’ HOT 7
- DNS resolution state bug HOT 5
- Improve `least_conn` test case
- Jdomain support sockets? HOT 1
- Reporting a vulnerability HOT 1
- Stale DNS Lookup Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx_upstream_jdomain.