Artica Wiki

Apply rules without restarting

DNS Firewall rules are reloaded into the running service, with no DNS outage and a warm cache.

Back to the DNS Firewall service

Change a rule in the middle of the day and nobody notices.
Apply rules loads the new DNS Firewall rules into the running service.
Answers never stop, and the DNS cache keeps every record it learned.

Benefits

Use cases

How it works

DNS ACLs page with the Apply rules button

Artica builds the new configuration and compares it with the one the service runs.
When only the rules differ, Artica sends the new rule set to the service console.
The service swaps the whole set in one step.
A query is checked either by the old rules or by the new ones, never by a mix of both.

What still restarts the service

Some settings are read by the service only when it starts.
A change to one of them restarts the service once, for a few seconds:

The service also restarts when it is not running, or when the rule reload does not confirm success.

Check what happened

Artica writes one line per apply in /var/log/articarest.log:

Line Meaning
DNS Firewall rules applied without restarting dnsdist (ARTICA-HOT-OK 8) The rules were reloaded.
The number is the count of rules loaded.
DNS Firewall: dnsdist restart required: listeners, backends, caches or startup settings changed A setting read at startup changed.
The service restarted once.
DNS Firewall hot reload failed, restarting dnsdist The reload did not confirm success.
Artica restarted the service instead.
grep "DNS Firewall" /var/log/articarest.log | tail -5

The process number of the service stays the same after a reload without restart:

pidof dnsdist

Good to know