Live data from Hacker News

Why is the Internet so Slow?

blog.apnic.net

1–10 of 164 posts

Re: Why is the Internet so Slow?

#5
post #3

TL;DR: TCP and DNS, which is what you would expect. If you want light-speed internet, send UDP packets with a laser.

Or any form of electromagnetic wave passing media with low dielectric constant. Like microwave communication in athmosphere.

Speed of propagation in typical cable is around 66% of c. That is not too bad. More latency is probably caused by buffering.

Speed of light is just too low. We should get a lobby-group working on it and the limiting laws of physics.

Re: Why is the Internet so Slow?

#7
If you want an easy speed up and you use a modern version of nginx, which you should for many reasons but chiefly performance and security.

Add these lines to your nginx config file:

    # Only support HTTPS and enable http2 
    # which will allow you to multiplex requests.
    # In a separate config do a 301 from normal HTTP
    # for all paths / subdomains.
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    # Make TCP send multiple buffers as individual packets.                                                                                   
    tcp_nodelay on;

    # Send half empty (or half full) packets.                                                                                                 
    tcp_nopush  on;
It reduced our page load time by around 75%, and more for people accessing the site from the other side of the world.

Re: Why is the Internet so Slow?

#8
Did I read this correctly? Is it saying that a general internet connection, without specialist low latency connectivity, is only 37x slower than its theoretical minimum?

That's astonishingly good. It's great that they think they can do better but bloody hell.

It's indistinguishable from magic.

Re: Why is the Internet so Slow?

#10
post #7

If you want an easy speed up and you use a modern version of nginx, which you should for many reasons but chiefly performance and security. Add these lines to your nginx config file: # Only support HTTPS and enable http2 # which will allow you to multiplex requests. # In a separate config do a 301 from normal HTTP # for all paths / subdomains. listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_ser…

I'm not very experienced with these nginx settings. Could you explain how this improves speed so much for you?

It seems that you've followed [1] by the similarity of what that suggests to what you've suggested. tcp_nodelay seems to force it to not wait 0.2 seconds, which nginx does so that it doesn't send lots of really small packets. I can see this increasing speed by 200ms (a lot) but increases network traffic as a cost.

tcp_nopush seems to be about optimising each packet sent, reducing the total size of them.

Interesting stuff though!

[1] https://t37.net/nginx-optimization-understanding-sendfile-tc...

Post reply on HN