Live data from Hacker News

Https hurts users far away from the server

antoine.finkelstein.fr

101–110 of 128 posts

Re: Https hurts users far away from the server

#101
Funny coincidence, I was running into this exact issue earlier today. Had a customer complain about high response times from even our /time endpoint (which doesn't do anything except return server time) as measured by curl, and turns out it was just the TLS handshake:

    $ curl -o /dev/null -s -w "@time-format.txt" http://rest.ably.io/time
    time_namelookup:  0.012
       time_connect:  0.031
    time_appconnect:  0.000
    time_pretransfer: 0.031
         time_total:  0.053

    $ curl -o /dev/null -s -w "@time-format.txt" https://rest.ably.io/time
    time_namelookup:  0.012
       time_connect:  0.031
    time_appconnect:  0.216
    time_pretransfer: 0.216
         time_total:  0.237
(as measured from my home computer, in the UK, so connecting to the aws eu-west region)

Luckily not that much of an issue for us as when using an actual client library (unlike with curl) you get HTTP keep-alive, so at least the TCP connection doesn't need to be renewed for every request. And most customers who care about low latency are using a realtime library anyway, which just keeps a websocket, so sidesteps the whole issue. Certainly not enough to make us reconsider using TLS by default.

Still, a bit annoying when you get someone who thinks they've discovered with curl that latency from them to us is 4x slower than to Pubnub, just because the Pubnub docs show the http versions of their endpoints, wheras ours show https, even though we're basically both using the same set of AWS regions...

Re: Https hurts users far away from the server

#102
post #45

Presumably, cloudflare is up to its ears in NSL's, illegal wiretaps, etc. If you care at all about mass surveillance, censorship, oppressive governments (in the US, or the location of the cloudflare proxy) you probably should look elsewhere. It's probably controversial, but I'd love to see a yellow security icon in browsers when sites are using well known https relays that can see plaintext (or are doing other obviou…

The entire internet is built upon thousands of layers. There are so many vectors of entry that no "default warning" would ever suffice.

If your risk profile is outside the boundaries of normal internet use then you likely already know what to do - and we now have a multitude of tools for more private communications.

Re: Https hurts users far away from the server

#103

Earlier quoted context omitted.

A 'counterpoint', such as it is. What makes you think that isn't happening to any 3rd party host you can name? Why single out Cloudflare as adding risk to sites that are hosted on AWS already? The risk here is real, but it's much more pervasive than one data handler.

You seem to mis-understand how cloudflare works. They allow an insecure host to pose as a secure one and the traffic between cloudflare and the insecure host is not encrypted. That problem would not exist on 'any 3rd party host'.

CF is the same as any other CDN with TLS termination. Every host that provides a load balancer, or a server, or some other internal network connection like a VPN, can be compromised. Cloudflare is nothing special in this regard.

Re: Https hurts users far away from the server

#104

Yup, and that's why for thereg we started using Cloudflare's Railgun… with it, the connection to the servers (hosted in the UK) is "bearable"… without, it's abysmal: From a VPS in Sydney, with a Good Enough bandwidth: root@sydney:~# speedtest-cli 2>&1 | grep -e Download: -e Upload: Download: 721.20 Mbits/s Upload: 117.89 Mbits/s … doing the request through Railgun is "quite bearable": root@sydney:~# ./rg-diag -json h…

Did you try CloudFlare without Railgun?

That would be interesting.

Re: Https hurts users far away from the server

#105
post #2

If you're worried about a proprietary solution, you could host your own cache server in Australia or wherever your customers are having trouble.

Yeah, at a $200/mo cost, you could spin up a few VMs on DigitalOcean, Vultr or LightSail which have decent bandwidth and cache from there. Nice part about cloudflare though is that they can use anycast to determine location and then send the closest server IPs. For sub-$200/mo, you're not able to do that, you'd have to find a provider that could do it for you, I'm not sure anyone offers country-based anycast DNS alon…

> anycast to determine location and then send the closest server IPs

Anycast doesn't determine location or send the closet IPs, it's all the same IP address announced using BGP (border gateway protocol) to automatically route to the closest (in network travel) server.

Re: Https hurts users far away from the server

#106

Earlier quoted context omitted.

If you migrate to HTTP2 or move to a host that already supports it then cutting down on "round trips" is an obsolete concern altogether.

HTTP2 does not magically bundle all connections to one. It still very much depends on how you build up your page.

It does not magically split one connections into many. One domain == one connection. Sure it won't undo your "domain sharding" hacks and merge your CDNs, yeah :)

Re: Https hurts users far away from the server

#107

Earlier quoted context omitted.

The "Railgun" feature mentioned in the article is only available in some paid plans. Using the free plan wouldn't keep an open connection between your servers and Cloudflare's. It does improve the situation by terminating users' handshakes early, using better links, warm DNS cache, etc. among servers. But the latency hard limit is still present between your server and CF. Skipping https between your server and CL is…

Ah, I see. I did not realize that. Accordingly, I edited my comment to be less inflammatory. :) I understand that by using the generic CF free cert, https terminates at CF and the connection CF->Origin is over unencrypted HTTP. Is this why there is latency overhead? Because CF cannot connect to origin via https so it cannot open a persistent tunnel? Or is it because the overhead of keeping an open https tunnel per or…

Maybe the cost is not completely prohibitively expensive but they do consider it a premium feature. Have to earn money :D

Re: Https hurts users far away from the server

#108
post #65

Earlier quoted context omitted.

> FWIW, my personal website uses let's encrypt, so it would be yellow or worse. This shouldn't effect your security stance. There's a common misconception that you trust your private keys with your CA and they can somehow transparently MITM you. But they only have your public key, not your private keys, so they can't do that. The security threat from trusted CAs is that they can MITM anyone, regardless of if you use…

The attack is definitely transparent if you trust the CA that issued the MITM cert.

If you use cert pinning, like the DigiNotar/Iran/Gmail, you're still protected against a trusted CA, assuming you've communicated in the past, which is realistic for a real world attack.

It's an attack that's difficult to deploy because it's easy to detect if you're looking in the right places, and as soon as it's detected, you know the CA has been compromised, and the attacker loses a large investment.

Re: Https hurts users far away from the server

#109

Earlier quoted context omitted.

Number of connections isn't that relevant with HTTP2

Yes it is. The number of connections to one host isn't relevant in HTTP2. As ublock is blocking some ~20 connections these are going to different hosts. Connecting to a different host in HTTP2 is no different then HTTP1.1 If your HTTP2 is terminating at MANY boxes within your infrastructure you are failing to understand how HTTP2 works. Connections within a single TLS/TCP/IP connection are free, new TLS/TCP/IP connec…

Come to think of it, it's pretty ironic. For years, admins have been told to move static content to a different domain to trim down the request size (since browsers won't include the cookies for the main site). Now that might reverse, and it might be best to send all HTTP requests to the same server (for large sites: most likely some load balancer or haproxy or whatever) in order to benefit from HTTP/2 multiplexing.

Re: Https hurts users far away from the server

#110
> In our case at Hunter, users were waiting on average 270ms for the handshake to be finished. Considering requests are handled in about 60ms on average, this was clearly too much.

Why? Did it hurt user engagement? Were people complaining the site was slow?

Post reply on HN