Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


what's the advantage of powerdns to BIND?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

what's the advantage of powerdns to BIND?

sorry I know only BIND, so what's the advantage of Powerdns comparing to BIND? thanks for sharing your experience on both.

Comments

  • PowerDNS is an advanced high performance authoritative nameserver with a host of backends. Besides plain BIND configuration files, PDNS reads information from MySQL, Oracle, PostgreSQL and many other databases.

    http://wiki.powerdns.com/trac

    PowerDNS consists of two parts: the Authoritative Server and the Recursor. Other nameservers fully combine these functions, PowerDNS offers them separately, but can mix both authoritative and recursive usage seamlessly.

    When the Authoritative Server answers a question, it comes out of the database, and can be trusted as being authoritative. There is no way to pollute the cache or to confuse the daemon.

    The Recursor, conversely, by default has no knowledge of domains itself, but will always consult other authoritative servers to answer questions given to it.

    http://doc.powerdns.com/html/powerdns.html#function-design

    Bottom line is that it is designed to be more secure and flexible.

    If you are looking for a low memory authoritative DNS server I recommend maradns:

    http://abdussamad.com/archives/470-Installing-MaraDNS-on-CentOS-Linux.html

    Thanked by 1NameStuff
  • PowerDNS can read zones directly from MySQL or PostgreSQL, which is sometimes handy for ease of administration (especially if you have multiple users).

  • @Daniel15 said:
    PowerDNS can read zones directly from MySQL or PostgreSQL, which is sometimes handy for ease of administration (especially if you have multiple users).

    BIND does this as well, though you do need a plugin for that.

  • @mpkossen said:
    BIND does this as well, though you do need a plugin for that.

    that's BIND DLZ which may slow the performance.

  • @NameStuff said:
    that's BIND DLZ which may slow the performance.

    Any database you use may slow down the performance compared to files opened directly from the filesystem. And depending on a single, non-redundant database only gives you more trouble in case of an outage. Unless, of course, the nameserver and its slaves caches its data locally (to files or something else).

  • What I dont get is why you need a database at all. Bind files are simple text files that can be easily parsed by a script with little effort. Unless you need to build some kind of administrative module on top of it, why should you use a database at all? I built an interface on top of bind which I'm tweaking currently.

  • gbshousegbshouse Member, Host Rep

    PowerDNS is more elastic, handles zone changes without reload and since you are using SQL in background you can tweak the queries :)

  • DroidzoneDroidzone Member
    edited July 2013

    @gbshouse said:
    PowerDNS is more elastic, handles zone changes without reload and since you are using SQL in background you can tweak the queries :)

    Reload of bind9 takes half a second. Not having an sql background service means you dont waste memory on an additional service. I'm not convinced. Once you write your changes to a zonefile and reload bind9, you dont need a database any more. So why keep it running?

  • danodano Member

    I don't think there is anything wrong with Bind, but after running it for years and years, it was nice to see a newer take on DNS servers(auth/recursive) with PowerDNS. For me, I like that I can run the auth service and not even wonder if it's able to recurse for anyone but localhost by default, as the auth and recursive servers are different packages. Coming from the Bind world, allowing recursion was always something you had to fine tune or lock down, so I like the simplicity of powerdns auth for that reason. As other said above, zone changes without a reload of the service is nice, and also the many backends that are supported - personally I use mysql and replicate the content to another couple of nodes, and do like to use SQL to handle the data and like that I can easily use the data for control panels or reporting tasks.

  • gbshousegbshouse Member, Host Rep

    @joelgm - for example stuff like GeoDNS or failover with large set of domains, with few hundred thousand domains you will have to reload BIND few times per second

  • @gbshouse said:
    joelgm - for example stuff like GeoDNS or failover with large set of domains, with few hundred thousand domains you will have to reload BIND few times per second

    You need to reload bind only while updating a zone file, right? Are we assuming the zone files are being edited all the time? Anyway, I wasnt thinking of the scale of a thousands of domains.

  • mpkossen Any database you use may slow down the performance compared to files opened directly from the filesystem.

    Use memcache, set your vm.swappiness low and cache everything in memory. If you have a large number of zones and records a database is a better solution than trying to deal with hundreds or thousands of flat files

    joelgm said Reload of bind9 takes half a second.

    Reload of bind only takes half a second if you have a very limited number of zones. Powerdns tends to scale better than bind when you have a large number of zones

    from a bind vs powerdns study:

    Flat files cause a startup time delay on the 
    server process
    – For BIND, this penalty is huge
     A single host, with 113K small zones took slightly over an 
    hour to start with flat files
     It then served data at about 30K qps
    
    – PowerDNS is “optimised” for this task
     It took over 6 minutes to parse 113K small zones and 
    start serving data
     This served data at about 26K qps

    http://www.sanog.org/resources/sanog14/sanog14-devdas-dns-scalability.pdf

    another study comparing the performance of bind vs powerdns when you scale to a large number of zones:
    https://mice.cs.columbia.edu/getTechreport.php?techreportID=412&format=pdf&;

    Not having an sql background service means you dont waste memory on an additional service

    The memory usage for pdns with a database is still fairly low even with mysql unless you have tens of thousands of zones. I use a 512MB (xen) VPS for the master and 256MB (a mixture of xen, kvm, and openvz) VPS's for the slaves but powerdns could easily be run on a 128MB VPS (assuming you only have a few hundred zones and a couple thousand records).

    VPS running PowerDNS master (140 zones, 2675 records), PowerAdmin. MYSQL, Nginx, PHP-FPM, Fail2ban, etc.

    free -m
                 total       used       free     shared    buffers     cached
    Mem:           500        468         32          0         41        341
    -/+ buffers/cache:         85        415
    Swap:          511          2        509

    VPS running PowerDNS slave, MYSQL, Nginx, PHP-FPM, Fail2ban, etc

    free -m
                 total       used       free     shared    buffers     cached
    Mem:           248        223         24          0         16        150
    -/+ buffers/cache:         56        192
    Swap:          255         23        232
    Thanked by 2Droidzone Daniel15
  • mmuyskensmmuyskens Member, Host Rep

    @joelgm said:
    Reload of bind9 takes half a second. Not having an sql background service means you dont waste memory on an additional service. I'm not convinced. Once you write your changes to a zonefile and reload bind9, you dont need a database any more. So why keep it running?

    Once you have a pretty large DNS cluster, you will see how easily everything gets botched up. Using a solution based on MySQL,etc. is definitely the way to go.

  • @gbshouse said:
    joelgm - for example stuff like GeoDNS or failover with large set of domains, with few hundred thousand domains you will have to reload BIND few times per second

    That's true. I have been running the free DNS hosting www.DNSbed.com for years, BIND is not that convenient for thousands of domains. BTW, if using powerdns the zone data is transfered by database's replication? if so that sounds not reliable.

  • The memory usage for pdns with a database is still fairly low even with mysql unless you have tens of thousands of zones. I use a 512MB (xen) VPS for the master and 256MB (a mixture of xen, kvm, and openvz) VPS's for the slaves but powerdns could easily be run on a 128MB VPS (assuming you only have a few hundred zones and a couple thousand records).

    I have 4K+ domains but most slaves running with 128MB OVZ. the BIND process takes about 40MB. So for memory usage BIND is pretty good.

  • A large portion of the root servers run BIND. So it can't be that bad. Not that it's a strong argument, but still.

    For smaller servers (less than 1K domains) you're really better of with BIND. You won't have the hassle of setting up database replication and won't have the overhead of the database on the server.

    @joelgm said:
    You need to reload bind only while updating a zone file, right? Are we assuming the zone files are being edited all the time? Anyway, I wasnt thinking of the scale of a thousands of domains.

    If you just batch you zone file updates, like to them every fifteen minutes (like Linode does) it'll prevent the constant reloading. Also prevents the SOA serial running out of bounds with a large number of updates.

  • Daniel15Daniel15 Veteran
    edited July 2013

    I used to run a free DNS subdomain service (like freedns.afraid.org but on a much smaller scale) and it was much easier to write a custom management panel for PowerDNS. CRUD operations with a database are much easier to code than juggling of plain text files, and there's less chance of totally messing up the file.

    I found one-way MySQL replication (one master, multiple read-only slaves) to be very easy to set up and used it for a few years. Seemed to be easier to set up compared to BIND replication. It was nice inserting a record on the master server and seeing it replicate near-instantly to all secondary DNS servers. Didn't have to worry about reloading the DNS server at all.

    I assume PowerDNS has some sort of caching mechanism. I never had any performance issues with it.

    @mpkossen said:
    And depending on a single, non-redundant database only gives you more trouble in case of an outage

    Who said anyone was using a non-redundant database? Having a single DNS server gives you the exact same trouble in case of an outage.

  • I assume PowerDNS has some sort of caching mechanism.

    Both packet cache and query cache
    http://doc.powerdns.com/html/performance-settings.html

  • @Daniel15 said:
    Who said anyone was using a non-redundant database? Having a single DNS server gives you the exact same trouble in case of an outage.

    That's just an assumption I made based on my experience. People often forget that.

    True, same with BIND, of course. But BIND master-slave is easier to set up than database replication, in my experience.

  • bdtechbdtech Member

    What's does cloudflare use?

  • @bdtech said:
    What's does cloudflare use?

    customized nameservers.

  • @NameStuff said:
    customized nameservers.

    Source?

  • @mpkossen said:
    But BIND master-slave is easier to set up than database replication, in my experience.

    Much much easier. Is rsyncing the folders acceptable?

  • @joelgm said:
    Much much easier. Is rsyncing the folders acceptable?

    Sure, but master-slave combined with rndc is better IMO but a bit harder to set up. I am going to write a guide for this on LEB soon, probably within the next month.

Sign In or Register to comment.