Virtual servers in pdns-recursor

classic Classic list List threaded Threaded
7 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Virtual servers in pdns-recursor

Miguel Miranda-2
Hi, i want to run several instances of pdns-recursor, is there any support similar to pdns virtual hosting?
I have tried copying /etc/init.d/pdns-recursor to /etc/init.d/pdns-recursor-balancer1 and copying /etc/pdns-recursor/recursor.conf to /etc/pdns-recursor/recursor-balancer1.conf (in this file i changed port settings) but nothing happens when i run /etc/init.d/pdns-recursor-balancer1 start.

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

Pieter Lexis-2
Hi Miguel,

On Fri, 8 Jan 2016 09:16:32 -0600
Miguel Miranda <[hidden email]> wrote:

> Hi, i want to run several instances of pdns-recursor, is there any support
> similar to pdns virtual hosting?
> I have tried copying /etc/init.d/pdns-recursor to
> /etc/init.d/pdns-recursor-balancer1 and copying
> /etc/pdns-recursor/recursor.conf to
> /etc/pdns-recursor/recursor-balancer1.conf (in this file i changed port
> settings) but nothing happens when i run
> /etc/init.d/pdns-recursor-balancer1 start.

You'll need to add '--config-name'[1] to command line options pdns_recursor in the init-script. Virtual hosting as done by the authoritative server is not supported with the recursor init-script.

Best regards,

Pieter

1 - https://doc.powerdns.com/md/recursor/settings/#config-name

--
Pieter Lexis
PowerDNS.COM BV -- https://www.powerdns.com

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

Nick Williams
On Jan 8, 2016, at 9:46 AM, Pieter Lexis <[hidden email]> wrote:

>
> Hi Miguel,
>
> On Fri, 8 Jan 2016 09:16:32 -0600
> Miguel Miranda <[hidden email]> wrote:
>
>> Hi, i want to run several instances of pdns-recursor, is there any support
>> similar to pdns virtual hosting?
>> I have tried copying /etc/init.d/pdns-recursor to
>> /etc/init.d/pdns-recursor-balancer1 and copying
>> /etc/pdns-recursor/recursor.conf to
>> /etc/pdns-recursor/recursor-balancer1.conf (in this file i changed port
>> settings) but nothing happens when i run
>> /etc/init.d/pdns-recursor-balancer1 start.
>
> You'll need to add '--config-name'[1] to command line options pdns_recursor in the init-script. Virtual hosting as done by the authoritative server is not supported with the recursor init-script.
FWIW, this would be a good application for containers, such as Docker containers.

Nick
_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

smime.p7s (5K) Download Attachment
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

Thomas Mieslinger-4
Am 08.01.2016 um 17:56 schrieb Nick Williams:
> On Jan 8, 2016, at 9:46 AM, Pieter Lexis <[hidden email]> wrote:
>>
>>> [..]
>>> /etc/init.d/pdns-recursor-balancer1 start.
>>
>> You'll need to add '--config-name'[1] to command line options pdns_recursor in the init-script. Virtual hosting as done by the authoritative server is not supported with the recursor init-script.
>
> FWIW, this would be a good application for containers, such as Docker containers.

I run 10 pdns_recoursor instances on each of my recursive server boxes.
I'm (still) using a distro with upstart so I just need a short
/etc/init/pdns-recursor.conf

--snip--
description "pdns instance $INSTANCE"

stop on runlevel [016]

respawn

instance $INSTANCE

exec /usr/sbin/pdns_recursor --daemon=no
--config-dir=/etc/pdns-recursor/$INSTANCE --config-name=$INSTANCE
--socket-dir=/var/run/pdns-recursor/$INSTANCE
--snap--

and can as many instances as I have CPU and ram. initctl list nicely
lists all running instances... restarts failed processes etc.

Copying sysV initscripts around is not elegant, but with well written
upstart/systemd/svcadm configuration there is absolutely no reason to
wrap docker around pdns_recursor or pdns.

Sorry

Thomas


_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

Miguel Miranda-2
10 instances ??
Im experimenting with 4 recursor instances because I have plenty of cpu and ram:

top - 16:20:08 up 8 days,  7:36,  3 users,  load average: 0.06, 0.05, 0.05
Tasks: 383 total,   1 running, 382 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.5%us,  2.5%sy,  0.0%ni, 91.4%id,  0.1%wa,  0.0%hi,  0.6%si,  0.0%st
Mem:  32867864k total,  4847800k used, 28020064k free,   149300k buffers
Swap: 16506872k total,        0k used, 16506872k free,  1395864k cached

 
dnsdist is reporting around 1200 qps at peak hours, should i benefit with more simultaneous instances? if so, how many? Im starting to beleive this server is oversized for the dns traffic our customers are demanding, what do you think?

On Fri, Jan 8, 2016 at 3:54 PM, Thomas Mieslinger <[hidden email]> wrote:
Am 08.01.2016 um 17:56 schrieb Nick Williams:
On Jan 8, 2016, at 9:46 AM, Pieter Lexis <[hidden email]> wrote:

[..]
/etc/init.d/pdns-recursor-balancer1 start.

You'll need to add '--config-name'[1] to command line options pdns_recursor in the init-script. Virtual hosting as done by the authoritative server is not supported with the recursor init-script.

FWIW, this would be a good application for containers, such as Docker containers.

I run 10 pdns_recoursor instances on each of my recursive server boxes. I'm (still) using a distro with upstart so I just need a short /etc/init/pdns-recursor.conf

--snip--
description "pdns instance $INSTANCE"

stop on runlevel [016]

respawn

instance $INSTANCE

exec /usr/sbin/pdns_recursor --daemon=no --config-dir=/etc/pdns-recursor/$INSTANCE --config-name=$INSTANCE --socket-dir=/var/run/pdns-recursor/$INSTANCE
--snap--

and can as many instances as I have CPU and ram. initctl list nicely lists all running instances... restarts failed processes etc.

Copying sysV initscripts around is not elegant, but with well written upstart/systemd/svcadm configuration there is absolutely no reason to wrap docker around pdns_recursor or pdns.

Sorry

Thomas



_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users


_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

Miguel Miranda-2
Well, after several hours of sending dnsdist stats i see embarrassing numbers, considering the load and memory usage and still i got a lot 200 ms response time (dnsdist.dns1j4s0n.main), what could be the cause of this, network latency or am i totally messed up the recursor config? Each instance has the same configuration:

setuid=pdns-recursor
setgid=pdns-recursor
daemon=yes
dont-query=127.0.0.0/8
local-address=127.0.0.1
local-port=5454
log-common-errors=no
max-cache-entries=1000000
max-negative-ttl=30
max-packetcache-entries=1000000
packetcache-servfail-ttl=30
quiet=yes
threads=4
trace=on






On Fri, Jan 8, 2016 at 4:26 PM, Miguel Miranda <[hidden email]> wrote:
10 instances ??
Im experimenting with 4 recursor instances because I have plenty of cpu and ram:

top - 16:20:08 up 8 days,  7:36,  3 users,  load average: 0.06, 0.05, 0.05
Tasks: 383 total,   1 running, 382 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.5%us,  2.5%sy,  0.0%ni, 91.4%id,  0.1%wa,  0.0%hi,  0.6%si,  0.0%st
Mem:  32867864k total,  4847800k used, 28020064k free,   149300k buffers
Swap: 16506872k total,        0k used, 16506872k free,  1395864k cached

 
dnsdist is reporting around 1200 qps at peak hours, should i benefit with more simultaneous instances? if so, how many? Im starting to beleive this server is oversized for the dns traffic our customers are demanding, what do you think?

On Fri, Jan 8, 2016 at 3:54 PM, Thomas Mieslinger <[hidden email]> wrote:
Am 08.01.2016 um 17:56 schrieb Nick Williams:
On Jan 8, 2016, at 9:46 AM, Pieter Lexis <[hidden email]> wrote:

[..]
/etc/init.d/pdns-recursor-balancer1 start.

You'll need to add '--config-name'[1] to command line options pdns_recursor in the init-script. Virtual hosting as done by the authoritative server is not supported with the recursor init-script.

FWIW, this would be a good application for containers, such as Docker containers.

I run 10 pdns_recoursor instances on each of my recursive server boxes. I'm (still) using a distro with upstart so I just need a short /etc/init/pdns-recursor.conf

--snip--
description "pdns instance $INSTANCE"

stop on runlevel [016]

respawn

instance $INSTANCE

exec /usr/sbin/pdns_recursor --daemon=no --config-dir=/etc/pdns-recursor/$INSTANCE --config-name=$INSTANCE --socket-dir=/var/run/pdns-recursor/$INSTANCE
--snap--

and can as many instances as I have CPU and ram. initctl list nicely lists all running instances... restarts failed processes etc.

Copying sysV initscripts around is not elegant, but with well written upstart/systemd/svcadm configuration there is absolutely no reason to wrap docker around pdns_recursor or pdns.

Sorry

Thomas



_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users



_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Virtual servers in pdns-recursor

sthaug
In reply to this post by Miguel Miranda-2
> 10 instances ??
> Im experimenting with 4 recursor instances because I have plenty of cpu and
> ram:
>
> top - 16:20:08 up 8 days,  7:36,  3 users,  load average: 0.06, 0.05, 0.05
> Tasks: 383 total,   1 running, 382 sleeping,   0 stopped,   0 zombie
> Cpu(s):  5.5%us,  2.5%sy,  0.0%ni, 91.4%id,  0.1%wa,  0.0%hi,  0.6%si,
>  0.0%st
> Mem:  32867864k total,  4847800k used, 28020064k free,   149300k buffers
> Swap: 16506872k total,        0k used, 16506872k free,  1395864k cached
>
>
> dnsdist is reporting around 1200 qps at peak hours, should i benefit with
> more simultaneous instances? if so, how many? Im starting to beleive this
> server is oversized for the dns traffic our customers are demanding, what
> do you think?

Quite possibly - you can do *much* higher numbers with only one pdns
recursor instance.

Steinar Haug, AS 2116

_______________________________________________
Pdns-users mailing list
[hidden email]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Loading...