Certainly the DNS usage could be made better.

As of my last serious work on it, the rule was that each sipX server must have 
a caching DNS server on it, and each sipX server must only reference that DNS 
server.  That is a reasonably good compromise, as it means that the sipX 
processes themselves don't need to hassle with caching DNS, and yet traffic 
only goes on the network if the local DNS server needs to refresh its cache.  
If someone is running a sipX server without a local caching DNS server, I don't 
expect performance to be very good -- off-host DNS requests are going to hold 
things up.

The obvious place to improve performance is to put a bit of caching in the sipX 
server libraries.  You could cache based either on the TTL received from the 
DNS server or have a fixed, short cache lifetime.  What would really help is to 
have an autonomous thread refreshing the cache -- if a cache entry is about to 
time out and it has been referenced recently, the thread would do a DNS request 
in hope of extending the entry's lifetime.  In most cases, sipX only translates 
a handful of DNS names, the same names over and over, and if the working 
threads never had to make DNS requests (because the refreshing thread would 
keep all the translations in-cache), it would avoid blocking.

Dale
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/

Reply via email to