Adding DNS Caching to Zend_Http_Client

In a recent post on my blog, I benchmarked various mainstream PHP HTTP client extensions and libraries. In doing so, I noticed that extensions based on libcurl (specifically the cURL and pecl_http) use an internal DNS cache and glean a significant performance gain from it.

While it is possible for PHP-based libraries to implement their own cache, none that I examined actually do. With a little curiosity egging me on, I decided to spend a bit of time digging into their code to see how difficult it would be to modify them to include a cache so I could compare the results for performance.

Syndicate content