Why are HTTPS connections not slow anymore?

0

1

When the web was young, HTTP connections were relatively fast, and HTTPS connections were painfully slow.

In the last several years, the speed of HTTPS connections are often very similar to that of HTTP connections. Sometimes, there is no noticeable difference.

What has changed that has allowed the speed of HTTPS connections to rival that of HTTP connections?

RockPaperLizard

Posted 2016-05-02T10:55:00.600

Reputation: 5 415

2More CPU, more memory, more bandwidth, more cowbell and and some polished versions of SSL libraries do the trick. – Gombai Sándor – 2016-05-02T11:00:39.570

It hasn't changed... The https is still "slower", or more accurately uses more data due to encryption overhead. The difference is today we have exponentially higher speeds, at 100kbps the difference is quite noticeable do to more data being transferred, at speeds measured in Megabits or Gigabit per second, the difference is still there, it's just so minimal you can't tell unless you measure it milliseconds or tenths of a millisecond. – acejavelin – 2016-05-02T11:04:35.040

Answers

1

There are varius reasons for that improvement

  • Initial connection setup time An HTTPS connection needs an additional handshake after the initial HTTP connection is established. Over time the connection latency decreased (from ~100-200 ms with modems to 10-100 ms with DSL and even lower for fiber-to-the-home or other new technologies). With the decreased latency, the additional handshake is less noticeable.

  • prefetching / pre-connection Modern browser use different kinds of prefetching and pre-connection methods to make browsing faster. Since the connection is already established, the mentioned handshake might not be noticeable at all.

    Other things like SPDY also help here and use the same idea.

  • more computation power HTTPS needs more computational resources because of the encryption. Faster CPUs (on server AND client side) help to make HTTPS faster. Also, some servers use special encryption hardware to boost performance.

  • policy change There is a policy deciding on how much resources are spent for HTTP and HTTPS. For a simple single server setup this policy is implicitly defined by the OS scheduler. For multi-server or multi-interface setups it might also be implicit and just depend on the bandwidth and CPU of each server.

    In the past HTTPS was considered exotic and costly and was therefore not well supported (e.g. run on slower machines).

    But today, especially when you think of big websites, you can be sure they have an explicit policy about how to handle and prioritize each service. And since more and more companies like HTTPS (e.g., Google) they also express this by their policy.

masgo

Posted 2016-05-02T10:55:00.600

Reputation: 1 541