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

Fast reload #1015

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open

Fast reload #1015

wants to merge 65 commits into from

Conversation

wcawijngaards
Copy link
Member

This implements fast_reload. It reloads the unbound server and does not stop the processing of queries. So that service of queries remains uninterrupted by the reload process.

It can be used with unbound-control fast_reload. This then reloads the server. Cache is kept from before the reload to after. Also existing queries are kept, and the state machines continue to work on them after the reload. Only some options are changed, global options from the config structure, and forwards, and stubs.

The fast_reload works by creating a thread that reads config, and allocates memory. Then it quickly halts the other threads, updates the config and swaps the trees of forwards and stubs in place, and continues the other threads. A test with thousands of forwards, has a reload time of 0.027s with 0.0003s spent in halting the other threads.

…tes and

  can continue byte by byte. Also it can continue after an interrupt.
  forward_add and forward_delete should be distributed to other processes,
  but when threaded, they should not be distributed to other threads because
  the structure is not thread specific any more.
@wcawijngaards wcawijngaards self-assigned this Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant