3939. [func] Improve UPDATE forwarding performance by allowing TCP

connections to be shared. [RT #37039]
This commit is contained in:
Mark Andrews
2014-09-04 10:37:45 +10:00
parent 2548678376
commit 74717eef53
12 changed files with 227 additions and 24 deletions

View File

@@ -36,3 +36,5 @@ rm -f dig.out.*
rm -f jp.out.ns3.*
rm -f Kxxx.*
rm -f typelist.out.*
rm -f ns1/many.test.db ns3/many.test.db.jnl
rm -f ns3/many.test.bk ns3/many.test.bk.jnl

View File

@@ -0,0 +1,25 @@
; Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
;
; Permission to use, copy, modify, and/or distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
$ORIGIN .
$TTL 300 ; 5 minutes
many.test IN SOA ns1.example.nil. hostmaster.example.nil. (
1 ; serial
2000 ; refresh (2000 seconds)
2000 ; retry (2000 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
many.test NS ns1.example.nil.
many.test NS ns2.example.nil.

View File

@@ -127,3 +127,9 @@ zone "keytests.nil" {
grant sha512-key name sha512.keytests.nil. ANY;
};
};
zone "many.test" {
type master;
allow-update { any; };
file "many.test.db";
};

View File

@@ -16,7 +16,7 @@
/* $Id: named.conf,v 1.5 2011/02/03 12:18:11 tbox Exp $ */
// NS1
// NS3
controls { /* empty */ };
@@ -60,3 +60,10 @@ zone "dnskey.test" {
allow-update { any; };
file "dnskey.test.db.signed";
};
zone "many.test" {
type slave;
masters { 10.53.0.1; };
allow-update-forwarding { any; };
file "many.test.bk";
};

View File

@@ -62,3 +62,6 @@ $DDNSCONFGEN -q -r $RANDFILE -a hmac-sha384 -k sha384-key -z keytests.nil > ns1/
$DDNSCONFGEN -q -r $RANDFILE -a hmac-sha512 -k sha512-key -z keytests.nil > ns1/sha512.key
(cd ns3; $SHELL -e sign.sh)
cp -f ns1/many.test.db.in ns1/many.test.db
rm -f ns1/many.test.db.jnl

View File

@@ -597,5 +597,31 @@ serial=`$DIG +short yyyymmddvv.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` |
[ "$serial" -eq "$now" ] || ret=1
[ $ret = 0 ] || { echo I:failed; status=1; }
n=`expr $n + 1`
echo "I:send many simultaneous updates via a update forwarder ($n)"
ret=0
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
(
for j in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
(
$NSUPDATE << EOF
server 10.53.0.3 5300
zone many.test
update add $i-$j.many.test 0 IN A 1.2.3.4
send
EOF
) &
done
wait
) &
done
wait
dig axfr many.test @10.53.0.1 -p 5300 > dig.out.test$n
lines=`awk '$4 == "A" { l++ } END { print l }' dig.out.test$n`
test ${lines:-0} -eq 289 || ret=1
[ $ret = 0 ] || { echo I:failed; status=1; }
echo "I:exit status: $status"
exit $status