[Pdns-users] fallback to next backend in case of backend failure?
Marc Haber
mh+pdns-users at zugschlus.de
Wed Aug 31 10:35:15 UTC 2011
Hi,
from what I understand from the docs, PowerDNS always iterates through
all backends to answer a query, taking the first answer it gets from a
backend.
What is not documented is PowerDNS's behavior in case of a
non-answering backend. Experiments with the MySQL backend say that it
kind of infinetely waits for the backend to answer, until eventually
the query itself times out. This means, that the complete PowerDNS
server becomes unresponsive if the first configured backend goes down.
It seems to be a common misconception that PowerDNS falls back to the
next backend in case of an unresponsive backend. I have seen
installations with two MySQL backends pointing to two different
replication slaves of the same master, and a similiar setup with
multiple LDAP backends was presented on this mailing list a few months
ago. All of these setups don't work as intended, as I currently see
things.
Is this really the case, and are there intentions to change this?
A possible fix could be a new setting "backend-instance-timeout", for
example, gmysql-timeout, with a numeric value:
launch=gmysql:local,gmysql:remote
gmysql-local-socket=/var/run/mysqld/mysqld.sock
gmysql-local-user=root
gmysql-local-password=1234
gmysql-local-dbname=pdns
gmysql-local-timeout=5
gmysql-remote-host=dbserver.example.com
gmysql-remote-port=3306
gmysql-remote-user=root
gmysql-remote-password=1234
gmysql-remote-dbname=pdns
gmysql-remote-timeout=5
The semantics of the new option would be to give the backend n seconds
to deliver an answer, and to iterate over to the next backend (as if
the backend returned an empty answer) after this timeout has passed.
To keep current behavior, the timeout would be 0 by default, meaning
"wait indefinetely".
Optionally, there could be a "backend-instance-retryinterval" so that
a backend that timed out once would not be considered again for m
seconds after its first failure, causing subsequent queries not to be
delayed by the backend-instance-timeout for a given period of time.
Am I missing something? Any comments?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
More information about the Pdns-users
mailing list