]> granicus.if.org Git - pdns/commitdiff
PacketHandler: Share UeberBackend with DNSSECKeeper
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 15 Feb 2015 13:08:32 +0000 (14:08 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 15 Feb 2015 13:08:32 +0000 (14:08 +0100)
Reduces number of backend instances by 50%, very relevant for setups
that have backends with huge startup/runtime cost.

pdns/packethandler.cc
pdns/packethandler.hh

index 7539dd085f893e89514532d1558167e51d37ebc0..de7ecabd720eef4899dbb342a43d58bf0987aa47 100644 (file)
@@ -58,7 +58,7 @@ enum root_referral {
     FULL_ROOT_REFERRAL
 };
 
-PacketHandler::PacketHandler():B(s_programname)
+PacketHandler::PacketHandler():B(s_programname), d_dk(&B)
 {
   ++s_count;
   d_doDNAME=::arg().mustDo("experimental-dname-processing");
index 0c7d34084db2f2fe9b7590e777cffb8aaca6e474..50f9b9ebef7e085105edb4d49e46b8c6a0a99769 100644 (file)
@@ -111,7 +111,7 @@ private:
   AuthLua* d_pdl;
 
   UeberBackend B; // every thread an own instance
-  DNSSECKeeper d_dk; // same, might even share B?
+  DNSSECKeeper d_dk; // B is shared with DNSSECKeeper
 };
 void emitNSEC3(DNSBackend& B, const NSEC3PARAMRecordContent& ns3prc, const SOAData& sd, const std::string& unhashed, const std::string& begin, const std::string& end, const std::string& toNSEC3, DNSPacket *r, int mode);
 bool getNSEC3Hashes(bool narrow, DNSBackend* db, int id, const std::string& hashed, bool decrement, string& unhashed, string& before, string& after, int mode=0);