Ask HN: Why doesn't Uber use UDP instead of TCP?

4 points by anizan ↗ HN
India has very bad mobile cell coverage and mobile tower/data congestion.

I remember playing Subspace (one of the first multiplayer internet games and now called Continuum) in mid 90's with a 14.4kbps modem and my ISP used a satellite link which delivered 850ms to server. It felt 10x more usable then Uber.

It's pretty easy to make your own error/sequence checking for UDP.

So what's the drawback of not using UDP?

3 comments

[ 53.4 ms ] story [ 849 ms ] thread
> It's pretty easy to make your own error/sequence checking for UDP.

At which point you've just re-invented TCP - and likely without the 30 years of weird/odd edge condition handling that TCP currently contains.

The problem with TCP is that it abstracts data delivery as a reliable ordered stream. Because of this, if a packet is lost, TCP has to stop and wait for that packet to be resent. This interrupts the steady stream of packets because more recent packets must wait in a queue until the resent packet arrives, so the packets may be presented in order.

Found something interesting here http://gafferongames.com/networking-for-game-programmers/rel...

How do you plan for your magic "easy" error/sequence checking for UDP system to be able to avoid this TCP issue?

In order to "error check" it will need to ask for retransmits of packets with errors (which will interrupt the steady flow).

In order to sequence check it will also have to request retransmits of missing packets (which will interrupt the steady flow, and here you'll get the same queue wait incurred by more recent packets while the retransmit occurs so you can reassemble the original sequence).