logoalt Hacker News

alightsoultoday at 5:18 AM4 repliesview on HN

In my experience the main driver of latency is not ping time, but how long the server takes to process the request.


Replies

andersmurphytoday at 5:46 AM

I think a lot of the time when people say the network is slow. They really mean their backend is slow.

With a fast backend ~1-5ms response times (not even that fast). Streaming compression over something like SSE to keep your response sub 1kb packet (roughly an ethernet MTU).

With a push based model, pushing data to a user is half their RTT latency. They will only experience their full RTT on actions they trigger.

Now the network to you is distance to the server (not your rail/nextjs backend taking 400ms). Things like 4G and 3G are fine. The real problem is when you have such bad signal you effectively have no down or up.

show 3 replies
thbb123today at 8:38 AM

More to the point it's that the server has to retrieve and massage data from several docker services to retrieve the full context needed to process the request

TylerEtoday at 9:26 AM

A lot of that is ultimately ping time, too though. Like making a naive number of round trips to a database not on the same machine.

NoMoreNicksLefttoday at 7:33 AM

How long the server takes to process the 42 requests ahead of you in line, or possibly how long the 318 poorly architected microservices take.