login about faq

Got a question relating to the CKHTTP module for you.

We've had issues (formerly using Qt to do network requests) on computers with both IPv6 and IPv4 addresses, when we have a server on the IPv4 port. Qt's component takes over a second per request, presumably because it's trying to resolve the IPv6 address first. We found we could avoid this by replacing the domain name with a direct IP address (i.e. use "" instead of "localhost" -- or similar for whatever domain name was used.)

With chilkat, this is already faster (presumably because set_PreferIpv6 already defaults to false), clocking in at around 168ms per request on a connection that has both IPv4 and IPv6 addresses (and we want IPv4). But this is still slower than the 48ms or so it takes for requests when we use a direct IP address instead.

Since we make many requests when our application first starts up, I was wondering if we could do this domain name -> IP address resolve just once, and then re-use that value for faster performance on all subsequent requests. Does Chilkat have something built in to allow this?

asked Jul 04 '14 at 12:31

chilkat's gravatar image

chilkat ♦♦

Chilkat will automatically cache (in-memory) DNS lookups so that only the 1st one results in an actual DNS query. Subsequent DNS name queries (for the same domain) will use the cache automatically. There are DnsCacheClear methods in a few Chilkat objects to clear the Chilkat-wide internal memory cache ( see the DnsCacheClear method in Chilkat.Socket here: http://www.chilkatsoft.com/refdoc/csSocketRef.html also see the same method in Chilkat.Http: http://www.chilkatsoft.com/refdoc/csHttpRef.html )


answered Jul 04 '14 at 12:32

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jul 04 '14 at 12:31

Seen: 2,509 times

Last updated: Jul 04 '14 at 12:32

powered by OSQA