SlideShare a Scribd company logo
1 of 21
Download to read offline
Scaling
DNS
Requirements
●   Large domain registrar
●   A few hundred thousand domains using our
    DNS.
    –   Nearly a million domains
●   Still growing
●   Need fast updates on the authoritative servers
    –   Especially when a new domain is added
    –   Or removed
●   Why use a database?
●   Choosing an option
    –   Stability
    –   Performance
    –   Support
●   Options considered
    –   BIND
    –   BIND-DLZ
    –   PowerDNS
    –   MyDNS
Flat files don't always rock
●   Flat files rock for system administrators
    –   DNS administrators may not have root access
    –   Editing flat files from the web is ... insane
●   Delegating single zone management is difficult
●   Edits and reloads have to be batched
●   Startup times for nameserver processes
Flat files don't always rock
●   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
BIND
●   Native BIND has “some” support.
    –   One connection to the backend for each domain
    –   Low performance
BIND-DLZ
●   Patch to BIND
    –   See http://bind-dlz.sourceforge.net/
●   One/Two connections to the backend for all
    domains
●   User defined queries, including stored
    procedures
●   Supports MySQL, PostgreSQL, OpenLDAP,
    BDB
BIND-DLZ architecture




BIND   DLZ    DBMS
DLZ schema
●   BENEFITS
    –   Single connection to database
    –   Single table needed to store all records
         ●   Keeps it simple
●   DISADVANTAGES
    –   No caching
    –   Bad performance
    –   Third party patch to BIND
PowerDNS
●   DNS server written in C++
●   Separate authoritative and recursive servers
●   Strong focus on security
PowerDNS architecture


             Cache




PowerDNS
 frontend                 Database




             Database
            abstraction
               layer
PowerDNS
●   BENEFITS
    –   One or more connections to the database
    –   Two tables needed
    –   Internal in-memory cache makes responses fast
    –   Low memory footprint
●   DISADVANTAGES
    –   Cache management
    –   DNSSEC (partial support, WIP) and views (no
        support)
    –   http://www.powerdnssec.org/
MyDNS
●   Not maintained – last update was 2006
●   Hardcoded schema
    –   We have our own.
Lies, damn lies and statistics
●   Actually, performance benchmarks
●   Native BIND wasn't going to be very useful to
    us. We didn't test it at all, except as a baseline
    statistic.
Testing
●   Test infrastructure was a single host with two
    dual core Xeon CPUs at 2.something GHz and
    16 GB of RAM with one disk, running the
    nameserver and the database
●   The clients were three pentium boxes with 1 GB
    of RAM connected over a 100 Mbps network.
●   We used the commandline queryperf tool to
    run queries.
    –   queryperf -q 20 -s <IP> -d <FILE>
Results
BIND-DLZ with BDBHPT, 2 queryperf clients, transaction
mode                                                     4000
BIND-DLZ with BDBHPT, 2 queryperf clients, transaction
mode, RAMDisk                                             5600
BIND-DLZ with PostgreSQL, raw queries                     1800
BIND-DLZ with PostgreSQL, Stored procedures               2000
BIND-DLZ with PostgreSQL, SP, 8 DLZ threads               4800
Nominum ANS, default cache size                          25200
Nominum ANS, cache size 512 MB                           30000
Raw BIND                                                 21700
PowerDNS, hash as cache, 115K domains                    20000
PowerDNS, hash as cache, 3M domains                       7000
PowerDNS, RBT with single threaded cache, 3M domains     21000
PowerDNS, RBT w/ single threaded cache, 10M domains      23000
PowerDNS, RBT w/ multi-threaded cache, 10M domains,
2.9.22                                                   46000
Same numbers, as a graph
50000



45000



40000



35000



30000



25000                              qps



20000



15000



10000



 5000



    0
Operational architecture
  PowerDNS
                     Slony
             Slave            Master
  PowerDNS   DC1               DC1



             Slave
  PowerDNS   DC2                   Web UI


             Slave
             DC3
  PowerDNS                   Management
                             Script
Software
●   Master database is PostgreSQL 8.2.x
●   Read-only slaves have some tables replicated
    from the master database via Slony.
●   Cache maintainance is a homegrown script.
In Practice
●   Maximum database replication lag is 10
    seconds.
●   PowerDNS has peaked at ~ 10000 qps during a
    DdoS
    –   This would have brought down the previous BIND-
        DLZ installations
    –   We didn't notice the blip
         ●   Yes, monitoring needs improvement ;)
Questions?

More Related Content

What's hot

What's hot (20)

DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
Optimizing your Database Import!
Optimizing your Database Import! Optimizing your Database Import!
Optimizing your Database Import!
 
OVS v OVS-DPDK
OVS v OVS-DPDKOVS v OVS-DPDK
OVS v OVS-DPDK
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
Greenplum User Case
Greenplum User Case Greenplum User Case
Greenplum User Case
 
PowerDNS-Admin vs DNS-UI
PowerDNS-Admin vs DNS-UIPowerDNS-Admin vs DNS-UI
PowerDNS-Admin vs DNS-UI
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
Tuning Autovacuum in Postgresql
Tuning Autovacuum in PostgresqlTuning Autovacuum in Postgresql
Tuning Autovacuum in Postgresql
 
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
 
Linuxの基本コマンド
Linuxの基本コマンドLinuxの基本コマンド
Linuxの基本コマンド
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstats
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
 
Ibm informix security functionality overview
Ibm informix security functionality overviewIbm informix security functionality overview
Ibm informix security functionality overview
 
DNSTap Webinar
DNSTap WebinarDNSTap Webinar
DNSTap Webinar
 

Similar to Scaling DNS

What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBD
ShapeBlue
 

Similar to Scaling DNS (20)

Red Hat Gluster Storage Performance
Red Hat Gluster Storage PerformanceRed Hat Gluster Storage Performance
Red Hat Gluster Storage Performance
 
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix BarbeiraBackup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
 
Ceph as storage for CloudStack
Ceph as storage for CloudStack Ceph as storage for CloudStack
Ceph as storage for CloudStack
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBD
 
MySQL Cluster (NDB) - Best Practices Percona Live 2017
MySQL Cluster (NDB) - Best Practices Percona Live 2017MySQL Cluster (NDB) - Best Practices Percona Live 2017
MySQL Cluster (NDB) - Best Practices Percona Live 2017
 
Dnscluster @ DevOps Krakow 2013
Dnscluster @ DevOps Krakow 2013Dnscluster @ DevOps Krakow 2013
Dnscluster @ DevOps Krakow 2013
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
TechNet Live spor 1 sesjon 6 - more vdi
TechNet Live spor 1   sesjon 6 - more vdiTechNet Live spor 1   sesjon 6 - more vdi
TechNet Live spor 1 sesjon 6 - more vdi
 
Workshop actualización SVG CESGA 2012
Workshop actualización SVG CESGA 2012 Workshop actualización SVG CESGA 2012
Workshop actualización SVG CESGA 2012
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Modern network servers
Modern network serversModern network servers
Modern network servers
 
SQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinarSQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinar
 
Scylla on Kubernetes: Introducing the Scylla Operator
Scylla on Kubernetes: Introducing the Scylla OperatorScylla on Kubernetes: Introducing the Scylla Operator
Scylla on Kubernetes: Introducing the Scylla Operator
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cache
 
Seattle Scalability Meetup - Ted Dunning - MapR
Seattle Scalability Meetup - Ted Dunning - MapRSeattle Scalability Meetup - Ted Dunning - MapR
Seattle Scalability Meetup - Ted Dunning - MapR
 

More from elliando dias

Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
elliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
elliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
elliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
elliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
elliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
elliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
elliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
elliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
elliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
elliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Scaling DNS

  • 2. Requirements ● Large domain registrar ● A few hundred thousand domains using our DNS. – Nearly a million domains ● Still growing ● Need fast updates on the authoritative servers – Especially when a new domain is added – Or removed
  • 3. Why use a database? ● Choosing an option – Stability – Performance – Support ● Options considered – BIND – BIND-DLZ – PowerDNS – MyDNS
  • 4. Flat files don't always rock ● Flat files rock for system administrators – DNS administrators may not have root access – Editing flat files from the web is ... insane ● Delegating single zone management is difficult ● Edits and reloads have to be batched ● Startup times for nameserver processes
  • 5. Flat files don't always rock ● 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
  • 6. BIND ● Native BIND has “some” support. – One connection to the backend for each domain – Low performance
  • 7. BIND-DLZ ● Patch to BIND – See http://bind-dlz.sourceforge.net/ ● One/Two connections to the backend for all domains ● User defined queries, including stored procedures ● Supports MySQL, PostgreSQL, OpenLDAP, BDB
  • 9. DLZ schema ● BENEFITS – Single connection to database – Single table needed to store all records ● Keeps it simple ● DISADVANTAGES – No caching – Bad performance – Third party patch to BIND
  • 10. PowerDNS ● DNS server written in C++ ● Separate authoritative and recursive servers ● Strong focus on security
  • 11. PowerDNS architecture Cache PowerDNS frontend Database Database abstraction layer
  • 12. PowerDNS ● BENEFITS – One or more connections to the database – Two tables needed – Internal in-memory cache makes responses fast – Low memory footprint ● DISADVANTAGES – Cache management – DNSSEC (partial support, WIP) and views (no support) – http://www.powerdnssec.org/
  • 13. MyDNS ● Not maintained – last update was 2006 ● Hardcoded schema – We have our own.
  • 14. Lies, damn lies and statistics ● Actually, performance benchmarks ● Native BIND wasn't going to be very useful to us. We didn't test it at all, except as a baseline statistic.
  • 15. Testing ● Test infrastructure was a single host with two dual core Xeon CPUs at 2.something GHz and 16 GB of RAM with one disk, running the nameserver and the database ● The clients were three pentium boxes with 1 GB of RAM connected over a 100 Mbps network. ● We used the commandline queryperf tool to run queries. – queryperf -q 20 -s <IP> -d <FILE>
  • 16. Results BIND-DLZ with BDBHPT, 2 queryperf clients, transaction mode 4000 BIND-DLZ with BDBHPT, 2 queryperf clients, transaction mode, RAMDisk 5600 BIND-DLZ with PostgreSQL, raw queries 1800 BIND-DLZ with PostgreSQL, Stored procedures 2000 BIND-DLZ with PostgreSQL, SP, 8 DLZ threads 4800 Nominum ANS, default cache size 25200 Nominum ANS, cache size 512 MB 30000 Raw BIND 21700 PowerDNS, hash as cache, 115K domains 20000 PowerDNS, hash as cache, 3M domains 7000 PowerDNS, RBT with single threaded cache, 3M domains 21000 PowerDNS, RBT w/ single threaded cache, 10M domains 23000 PowerDNS, RBT w/ multi-threaded cache, 10M domains, 2.9.22 46000
  • 17. Same numbers, as a graph 50000 45000 40000 35000 30000 25000 qps 20000 15000 10000 5000 0
  • 18. Operational architecture PowerDNS Slony Slave Master PowerDNS DC1 DC1 Slave PowerDNS DC2 Web UI Slave DC3 PowerDNS Management Script
  • 19. Software ● Master database is PostgreSQL 8.2.x ● Read-only slaves have some tables replicated from the master database via Slony. ● Cache maintainance is a homegrown script.
  • 20. In Practice ● Maximum database replication lag is 10 seconds. ● PowerDNS has peaked at ~ 10000 qps during a DdoS – This would have brought down the previous BIND- DLZ installations – We didn't notice the blip ● Yes, monitoring needs improvement ;)