Current time: 08-19-2017, 11:32 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gap Between DNS Lookup and Initial Connection
06-25-2013, 03:53 AM
Post: #1
Gap Between DNS Lookup and Initial Connection
See this test: http://www.webpagetest.org/result/130624...1/details/

The first request is reporting a start offset of 1.847 seconds. The DNS lookup is occurring immediately at time 0 and only lasts 0.03 seconds. Also note that the CPU utilization is very high during this time.

What could be causing this gap between DNS lookup and initial connection?


I began to notice this pattern in other tests of HTTPS sites.

Rick Viscomi
Author, Using WebPageTest
http://usingwpt.com
Visit this user's website Find all posts by this user
Quote this message in a reply
06-26-2013, 04:40 AM
Post: #2
RE: Gap Between DNS Lookup and Initial Connection
That's pretty bizarre. My initial guess would have been around OCSP or CRL checks but it looks like it is being done before the actual socket is connected.

I grabbed a tcpdump: http://cloudshark.org/captures/4fd796228748 and it does look like it is all OCSP related. It's possible that it remembers that it is going to need to verify since I no longer clear out the cert caches and it is trying to do it as soon as possible. Strange because it used to not bother verifying if it had done it recently.

Could be something specific to EV certs.
Visit this user's website Find all posts by this user
Quote this message in a reply
09-30-2014, 04:33 AM
Post: #3
RE: Gap Between DNS Lookup and Initial Connection
We switched our site to be HTTPS only, and have been plagued by this problem since then. On IE and on Safari we are seeing a reportedly slow performance from some of our user. None of us can reproduce it locally, but it is 100% reproducible using webpagetest.org. The problem manifests as gap in waterfall.

Here is an example:
http://www.webpagetest.org/result/140929...1/details/

Note that the gap exists on every single connection (us, Google Maps, CDN, etc). What can be causing this gap?
Find all posts by this user
Quote this message in a reply
09-30-2014, 07:55 AM
Post: #4
RE: Gap Between DNS Lookup and Initial Connection
Any insight into this would be much appreciated - even suggestions on how to narrow it down. We have used WPT to significantly improve our overall performance but, same as above, we have a large gap between the DNS Lookup and the Initial Connection. This is so big as a % of overall that there seems little point in continuing to improve other areas of performance until this is fixed.

Example here:
http://www.webpagetest.org/result/140929...1/details/

I'm out of ideas on how to take this forward...
Find all posts by this user
Quote this message in a reply
10-01-2014, 10:55 PM
Post: #5
RE: Gap Between DNS Lookup and Initial Connection
@lbutler, Firefox is the easiest way to see what is going on with OCSP validation checks since the requests show up in the waterfall: http://www.webpagetest.org/result/141001...1/details/

The gap looks to be from cert revocation checks so the only way to get rid of it is to enable OCSP stapling on your server (or use a CDN that supports stapling).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-02-2014, 02:36 AM
Post: #6
RE: Gap Between DNS Lookup and Initial Connection
Thanks for the Firefox tip, Patrick. It is amazing how much time is spent on OSCP checks given all the third party requests our site is making.
Find all posts by this user
Quote this message in a reply
07-22-2017, 02:04 AM
Post: #7
RE: Gap Between DNS Lookup and Initial Connection
I was curious if there's any more insight in terms of how to prevent this. Are there any new techniques?

Suddenly started happening on my measurements on private instance of WPT, but we don't see it on the public instance. This has me scratching my head.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)