I've been trying to speed up the booting of one of our DNS & monitoring servers, as it takes an exceptionally long time. Looking at it while it boots, it seems to hang for a long time when starting smokeping. Looking even closer, I noticed unbound starts, then smokeping, and then nsd. The problem here (I suspect) is that as it boots, smokeping is trying to resolve the couple hundred hostnames of all the hosts its monitoring, and it first queries itself--running unbound, but not yet nsd. Unbound has no way to query the stub zone since nsd isn't running, so eventually it falls back to the backup DNS server, that's already up and running. However, this takes a long time, and thus, it takes a very long time for smokeping to start.
I'm sure there are other ways a similar situation can develop with other daemons/services, but what I'm wondering is, what's the pedantic way to deal with this sort of situation? Or failing that, what way do you recommend? I just need some way to have daemon 'x' (smokeping, in this instance) require the other daemons 'y' and 'z' (unbound and nsd) to be started first. While I can think of several ways to do this, I'd like to do it in the most appropriate manner.
I'm sure there are other ways a similar situation can develop with other daemons/services, but what I'm wondering is, what's the pedantic way to deal with this sort of situation? Or failing that, what way do you recommend? I just need some way to have daemon 'x' (smokeping, in this instance) require the other daemons 'y' and 'z' (unbound and nsd) to be started first. While I can think of several ways to do this, I'd like to do it in the most appropriate manner.