15
\$\begingroup\$

I'm thinking of making a MMO server, and I've been looking at how other games structure their network. One of the things I've noticed is that there's always a Login server and then the game server(s).

I'm still deciding if I should do this, but I would like to hear some opinions first. What are the advantages of this, and how does the login server communicates with game server to handle logins?

\$\endgroup\$
1

3 Answers 3

15
\$\begingroup\$

I believe this is mostly caused by the fact that login and game handling are logically more or less independent, so they're typically kept separate for better decoupling, easier maintenance and scalability. They needn't necessarily reside on different physical servers, they can run just as well as independent services on the same machine. If the traffic grows too large, the login server can easily be moved to another machine.

Also, login servers are a likely attack vector so it's good to have them separate from a security point of view.

Internally, different server-side services can use regular sockets to communicate with each other, be they on the same machine or on another machine in the cluster. Alternatively, a database server could be used to maintain an 'is logged in' flag for each user.

\$\endgroup\$
1
  • \$\begingroup\$ Most of the time I see such a flag in the gameserver db and inside the loginserver db, so the login server can check against each other and if logindb!=gamerserverdb the user gets logged out. \$\endgroup\$ Mar 11, 2011 at 9:29
10
\$\begingroup\$

One very important aspect in MMOs development is achieving scalability and allowing for load balancing.

Authentication users by checking credentials, ban status, counting recent failed logins, etc. is a task that can be done without knowing anything of the game logic or game data. So it is very easy to move that to its own server cluster.

Furthermore the login servers are a well known "entrance" for the client to contact. After successful authentication they can dispatch the client to the appropriate server in the game server cluster. This dispatching can be done by forwarding the network connection to the right game server or telling the client to open a new connection to a right game server.

You should think about cuts of your system for distribution early on. It is very easy to run several pieces on one server. But it is quite difficult to split things that have been developed as one unit.

\$\endgroup\$
3
\$\begingroup\$

As a former WoW player, my experience was that the login server was always the weakest link in the chain.

The world servers were usually impressively stable, even handling exceptional load (e.g. new expansion pack releases) quite well.

But the login server(s) just never seemed to cope so well, and would frequently be down whilst the world servers were fine. (meaning that if you lose connection in a raid/dungeon, you can't get back in, but the other players are waiting for you!)

And now that the WoW login system is merged into Battle.Net, Starcraft 2 can become unavailable when WoW is under heavy load (as happened for a couple of hours when Cataclysm launched)

So if you're building a game that will have very large numbers of users, scalability and performance of the login system is very important, too.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I guess the login servers are the primary target for brute force attacks on passwords, so they have to be able to handle quite a bit of load. Especially if the game is so popular that attackers start to use botnets (to prevent rate limiting per ip-address) in addition to the normal random guessing of usernames. \$\endgroup\$ Mar 12, 2011 at 14:47
  • \$\begingroup\$ Failing to login and placing a player into the world can have multiple reasons. It may be the login servers/account database. But it may although be caused by a failure to load the player information from the database. Or by a failure of the system that does the dispatching of players to world servers, chat servers, ... An internal firewall may still be able to handle known connections but might not be able to apply the ruleset to decide about new connections. Playing a player into the world is a lot more complex than interacting once you are inside. \$\endgroup\$ Mar 12, 2011 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .