3 ms·
Thats not a computation problem, but an latency issue thanks to the extra round-trips being made (see above about edge cases). Its also only the initial connect
by belorn 14y ago
Thats not a computation problem, but an latency issue thanks to the extra round-trips being made (see above about edge cases). Its also only the initial connection, as keep-alive is used to eliminate that particular problem with http and https in equal style.
Latency issues are real (ie, non-trivial problems), but they are of the nature where context is everything. If you have a small javascript file, then http instead of https will be a multitude faster. If however, you are running a dynamic site, not on a CDN, and are using some kind of javascript goodies, then the experienced latency for users are going to be complex. Add in some banners with ads, and round-trip might not be that relevant at all in the experience of loading the first page. What i am saying is that if latency is an issue, https is not the first place to go the address it.
To compare with a real world example, if I load a local news site (round-trip ping of say 30ms), the extra packages of https won't have any direct affect on latency, and the ad-networks from a continent away will be the biggest crime to latency. That is, if I don't enable javascript, as then the load time of the first page will increase a second or so.
- jrochkind1 14y agoIn the app i'm working on now, I really want to get the page loading fast-fast-fast. I have all javascript combined into one file, minimized, gzipped, far-future cached. Same with CSS. (Rails does this for me, mostly). javascript file is also marked with 'async' attribute. All images are set up so loading images doesn't block initial page load. 300ms for https round trips remain. shrug. it is unfortunate, but I stick with https anyway. Making sure your web server is doing persistent http connections is about the only thing I know to do to ameliorate somewhat, but first connection is still slower than I'd like, due to https.
- xyzzy123 14y agoEDIT: You mentioned 300ms extra. Ideally, SSL should only require 2 extra RTT on first connection, so in theory you should only see 300ms extra latency if: a) Your ping is 150ms b) Something is wrong I found this to be useful: http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html http://www.imperialviolet.org/2010/06/25/overclocking-ssl.ht...
- jrochkind1 14y agothank you, useful link! something may very well be wrong, and it may be outside of my abilities or time to figure out what. :) I am looking into increasing the SSL Session keeping length on my apache, have any opinion about that? It does seem to eliminate the extra 'tax' for SSL in my from-slow-network experiments, for the duration of the session eliminating re-negotiation.
- xyzzy123 14y agoCool :) As ballpark figures for SSL session cache timeouts, Apache defaults to 5 minutes, F5 load balancers default to 1 hour and JBoss is 1 day. So it really seems like a wide range of values get used out in the world. Upping to an hour should cause no problems. With SHM cache that will use a bit more memory, should make no practical difference for DBM. The other thing to watch out for (mentioned at link) is that lots of cheap SSL certs have a cert chain like 4 or 5 items long, bloating startup. See, e.g: https://www.ssllabs.com/ssltest/analyze.html?d=zxc.mx&hideResults=on https://www.ssllabs.com/ssltest/analyze.html?d=zxc.mx&hi... That shows that 5983 bytes of intermediate certs are being sent over and above the actual server cert. That's going to eat a bunch of RTTs during SSL setup.