Giter Club home page Giter Club logo

Comments (2)

atomsnc avatar atomsnc commented on May 31, 2024 1

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?)

  1. If we have an upstream with backup variable, that might get called if there is nothing else or all others are down as well.
  2. Nothing is found and client gets server or upstream error.

from ngx_upstream_jdomain.

splitice avatar splitice commented on May 31, 2024 1

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.