Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
1  
The question "How is load balancing achieved in MMOs?" may be interesting: gamedev.stackexchange.com/q/5956/450 –  Hendrik Brummermann Mar 10 '11 at 22:09

3 Answers 3

up vote 13 down vote accepted

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 as well run 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 a 'is logged in' flag for each user.

share|improve this answer
    
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. –  daemonfire300 Mar 11 '11 at 9:29

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.

share|improve this answer
    
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. –  Hendrik Brummermann Mar 12 '11 at 14:47
    
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. –  Hendrik Brummermann Mar 12 '11 at 14:50

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.