Also included in the PDNS distribution is the PipeBackend. The PipeBackend is primarily meant for allowing rapid development of new backends without tight integration with PowerDNS. It allows end-users to write PDNS backends in any language. A perl sample is provided. The PipeBackend is also very well suited for dynamic resolution of queries. Example applications include DNS based loadbalancing, geo-direction, DNS based failover with low TTLs.
The Pipe Backend also has a separate chapter in the backends appendix, see Section A.1.
![]() | The Pipe Backend currently does not function under FreeBSD 4.x and 5.x, probably due to unfavorable interactions between its threading implementation and the fork system call. Interestingly, the Linux PowerDNS binary running under the Linuxulator on FreeBSD does work. |
Included with the PDNS distribution is the example.pl backend which has knowledge of the example.com zone, just like the BindBackend. To install both, add the following to your pdns.conf:
launch=pipe,bind bind-example-zones pipe-command=location/of/backend.plPlease adjust the pipe-command statement to the location of the unpacked PDNS distribution. If your backend is slow, raise pipe-timeout from its default of 2000ms. Now launch PDNS in monitor mode, and perform some queries. Note the difference with the earlier experiment where only the BindBackend was loaded. The PipeBackend is launched first and thus gets queried first. The sample backend.pl script knows about:
webserver.example.com A records pointing to 1.2.3.4, 1.2.3.5, 1.2.3.6
www.example.com CNAME pointing to webserver.example.com
MBOXFW (mailbox forward) records pointing to powerdns@example.com. See the smtpredir documentation for information about MBOXFW.