News for hackers. Stuff that matters.
Re:UDP for games – encryption and DDoS protection by zamalek on Thursday April 28, 2016 @05:12AM (#11587402)
TCP and UDP occurring over the same route on a WAN can wreak havoc with UDP packet loss.[1] Using both is only a good idea up until you dig deep into socket performance. A network is not a piece of software where you can isolate things and expect them to behave in an isolated way, everything you push over it interacts with everything else that you are pushing over it. This "use UDP and TCP" is a dangerous anti-pattern because it seems to be an obvious solution from a software perspective, but is in reality a problem from the electron perspective. To paraphrase a famous quote:

> Some game developers, when confronted with a TCP problem, think "I know, I'll add UDP." Now they have two problems.

Games that implement their own protocol over UDP typically have packet modes (frequently a "channel" akin to WebSocket channels): reliable, ordered delivery or neither or either. There is almost always the notion of a connection, where appropriate. This is the correct way to do things, and with Raknet now being free you really have no excuse to do it any other way.

For authentication you could just use the reliable/ordered channel and carry on as though you were using TCP - which somewhat defeats the purpose of this article.

[1]: https://www.isoc.org/inet97/proceedings/F3/F3_1.HTM

Re:UDP for games – encryption and DDoS protection by supernintendo on Thursday April 28, 2016 @12:05PM (#11589853)
With my example for login, my assumption was that one would use short-lived TCP connections (i.e. server receives login packet, sends success/fail and finally closes the connection), not a simultaneous, persistent connection where TCP congestion (and thus UDP packet loss) becomes an issue. But maybe I'm wrong on this one.

Thanks for sharing by the way, great article (although as an aside, some of those graphs are really hard to read).

Re:UDP for games – encryption and DDoS protection by zamalek on Thursday April 28, 2016 @01:16PM (#11590427)
> some of those graphs are really hard to read

I have to admit that I had to squint a bit while reading it myself.