9

I have a old bind dns server (linux centos5.5 with bind 9.3.6) with 2000+ zone files. Whenever any change is done in any file the dns is restarted. I guess a reload must be sufficient though.

Problem is that a restart takes a long time 50s-60s and dns requests fail during that time.

This must be a very common issue , What is the correct way of restarting bind

Ram
  • 227
  • 1
  • 3
  • 5

2 Answers2

18

You could reload just the specific zone that was changed:

rndc reload zonename

rather than restarting the whole server. That's the simplest way. I actually do something different on my production DNS:

  • Keep all my masters on one separate server (a tiny VM) that services NO user queries
  • Use 2 slave servers to service all queries that get all their zones replicated from the master
  • All changes get made on master, if a reload is needed only the affected zones get retransferred to the slaves.
  • If a reconfig is required (ie changing named.conf to add/delete zones or whatever) schedule that for a maintenance window.
Brandon Xavier
  • 2,022
  • 13
  • 15
  • 1
    I've always preferred to have the master copy of your zones on a different server than the one serving your clients. Additionally, and especially on a serving master, you should be checking any changes with named-checkconf and named-checkzone before you reload the zone. – Rick Buford Sep 05 '15 at 16:28
  • Skip the filename, i.e. `rndc reload`, to reload the whole thing. – Ethan Furman Aug 17 '18 at 22:35
  • 1
    For dynamic zones, you can `freeze`, `reload` and then `thaw`: `rndc freeze `, `rndc reload ` and finally `rndc thaw `. If you try to reload without freezing, you will get `rndc: 'reload' failed: dynamic zone` (https://unix.stackexchange.com/a/132834/293952). – Lucas Basquerotto May 24 '21 at 20:13
3

service named reload should also reload and not restart bind. I agree with others for maximum availability have separate slave bind servers which can serve dns requests if you do need to do maintenance on your master dns server.

BabyRage
  • 31
  • 3