Advertisement

tcp, udp?

Started by March 05, 2005 04:11 PM
8 comments, last by hplus0603 19 years, 11 months ago
What protocol is better for a massive game (1000+ users)?
You'll probably end up wanting UDP... but it still depends on what kind of game you are talking about. Check the forum FAQ or post more information on the kind of game you are thinking about.
Advertisement
Most MMORPGs use TCP, because you get free stuff like throttling, and it's easier to deal with (Although I doubt that huge MMORPGs care about how easy the network protocol is).
That, and in MMO's being able to split off a new thread to deal with each income client may help?
Try the Forum FAQ.

Note: one thread per client in a massive system like a MMOG means absolute death. I also believe it's false that "most MMORPGS use TCP" -- there are a few that do, and several more that use UDP. The reason is that you need a socket per client with TCP, which limits how far you can scale your servers (as sockets demand kernel resources). With UDP, you only need a single socket for all clients.

In fact, I believe one of the problems they've been having with World of Warcraft is exactly that they use TCP.
enum Bool { True, False, FileNotFound };
Quote:
Original post by hplus0603
Try the Forum FAQ.

Note: one thread per client in a massive system like a MMOG means absolute death. I also believe it's false that "most MMORPGS use TCP" -- there are a few that do, and several more that use UDP. The reason is that you need a socket per client with TCP, which limits how far you can scale your servers (as sockets demand kernel resources). With UDP, you only need a single socket for all clients.

In fact, I believe one of the problems they've been having with World of Warcraft is exactly that they use TCP.


Actually, from what I've experienced (in the Open Beta), the problems are to do with their databases. Not quite sure if it's because there's too much data being transferred between the servers and the central database, or if it's because of the way they've designed the database, but that's where the problem apparantly lies. If you just ran around, and didn't touch anything, it ran fine (even for us poor 56kers). ;)
Advertisement
Either, or both. To be quite honest, deciding upon tcp vs udp is the absolute least of your worries if you're planning on having that many clients.

A lot of games (I don't know about MMORPGs) use TCP AND UDP for different purposes.

Mark
Quote:
A lot of games (I don't know about MMORPGs) use TCP AND UDP for different purposes.


And thus end up with the worst of both worlds!

We had to work EXTREMELY hard to make it so that TCP bulk transfer didn't cause excessive jitter for low-latency UDP traffic -- to the point of having to re-configure the kernel on our servers to not collapse packets on TCP re-transmit.

If you can get away with picking one transport only, you're better off in my opinion. TCP (which is somewhat easier) if you don't worry about one socket per client, and you don't worry about latency and re-transmitting stale data; UDP (and harder work) if you do worry about those things.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement