Question:
We would like to inquire whether Chilkat does any DNS querying.
In our client production site, we encountered an issue wherein the port was “exhausted” by SFTP (a lot of DNS querying). Upon further investigation, it was found out that the setting in SFTP Tectia SSH server, “resolve client hostname”, setting is enabled. After turning off this setting, we were able to solve the issue (no more DNS querying at SFTP Tectia SSH Server).
However there are still traces of DNS querying. They looked into every module and analysed the traffic. After further investigation (including inquiries made to SFTP Tectia provider), it boils down to every time our application (using Chilkat) makes a connection to SFTP, a DNS query is sent out. We use the IP address of the SFTP Server as part of the connection string so we do not know whether there is still DNS query needed by Chilkat. As our application periodically makes a connection to the SFTP server, this is became an alarming issue on our client’s production site.
Please let us know if there could be any DNS query using Chilkat for some of the SFTP tasks such as using the OpenFile method?
Does it do any local hostname resolving on its own?
If a domain name is provided for any connection method in any Chilkat class (IMAP, FTP, SFTP, SSH, HTTP, etc.), then of course the domain name (also known as hostname) must be resolved to an IP address to establish the socket connection. Chilkat will keep an in-memory cache of DNS hostname-->IP address resolutions so that if the same lookup is needed again, then no DNS lookup is initiated. Of course, this doesn't apply if you re-run your application because it's only an in-memory cache. However, your local system is also likely to be caching DNS requests.
In any case, when an IP address is provided directly, there is no need for a DNS lookup, and Chilkat will not do it.