Welcome! Log In Create A New Profile

Advanced

Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

Vladimir Kokshenev via nginx-devel
July 20, 2022 03:10PM
Hello!

This is the two-part proposal to open-source periodic upstream server resolution
and implement a dedicated service worker for nginx. The purpose of this e-mail
is to describe the WHY and solicit feedback.

Nginx supports domain names in the upstream server configuration.
Currently, domain names are resolved at configuration time only,
and there are no subsequent name resolutions.

There are plans to open-source re-resolvable upstream servers.
This will allow applying DNS updates to upstream configurations in runtime.
So, there is a need to support periodic asynchronous operations.
And a dedicated service worker is a possible architectural way to address this.

The master process reads and parses configuration and creates the service worker
when needed (in a similar way to cache-related processes).

The service worker manages periodic name resolutions and updates corresponding
upstream configurations. The name resolution relies on the existing nginx
resolver and upstream zone functionality.

The service worker will be responsible solely for periodic background tasks
and wouldn't accept client connections.

The service worker should be the last worker process to shut down
to maintain the actual state of upstreams when there are active workers.

Alternative architecture considered was about choosing one of the regular
workers (e.g., worker zero) to take care of periodic upstream server resolution,
but it creates asymmetry in responsibilities and load for this dedicated worker.

--
Vladimir Kokshenev

_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

Vladimir Kokshenev via nginx-devel 245 July 20, 2022 03:10PM

Re: Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

Maxim Dounin 29 July 20, 2022 04:38PM

Re: Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

Neil Craig 25 July 21, 2022 09:02AM

Re: Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

itpp2012 28 July 21, 2022 01:05PM

Re: Open-sourcing periodic upstream server resolution and implementing a dedicated service worker.

Vladimir Kokshenev via nginx-devel 39 July 21, 2022 08:44PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready