Search Unity

Advice on server infrastructure/middleware?

Discussion in 'Multiplayer' started by SpyridonZ, Aug 6, 2011.

  1. SpyridonZ

    SpyridonZ

    Joined:
    Jun 7, 2009
    Posts:
    97
    I've currently got a RPG I've been working on (Stand-alone, not a mobile game) and I've reached a point where I want to start implementing multiplayer functionality, which is obviously going to require some design time on server structure. I've only had little experience with networking in the past so I need some advice. I would like to plan things out, at least loosely, that way I dont make more work for myself in the future by having to restructure everything.

    The ideal server structure I would like to have resembles something like how Diablo 2 works - seperate rooms with a fairly small max per room, with the ability to globally chat with any other player, friends list functionality, etc.

    Now to my questions...

    1) Most middleware has pricing based on user caps w/ an optional unlimited option, such as 1000 users, followed by unlimited, on each server. But most online game I've played have a cap on users anyway - Even if I get a unlimited license on one server, will I eventually run out of resources and need another server anyway? Would it be better off getting multiple 1000-cap servers rather than a single unlimited? Or with options such as Cloud servers, would you actually be able to support "unlimited" users?

    It's hard for me to decide on which pricing plan is appropriate when I'm not even sure if I'm going to need 1 unlimited license or multiple licenses regardless.

    2) I know that many online games use separate "servers" for various things, for example a "chat" server, a "game" server, and sometimes an "Monster/NPC AI" server, sometimes an "item" server or "auction house" server, etc. But again, since charges on a per-server basis. Is splitting up servers like this a requirement due to resources? Or (again) does a cloud server option make this unnecessary?

    3) I would like to take in to consideration pricing of servers... Depending on the answers to the first 2 questions, I'm wondering what the pricing situation is going to look like. If cloud servers are chosen I hear they can get to be pretty expensive. Is that the most reliable option for this type of game? For cloud servers, do you need to rent them out or is it possible to build your own cloud server? Would building my own even be worth it, considering I would have to invest in not just the hardware but a good enough ISP connection as well?

    Aside from that, any other insight you could add based on your answers would be appreciated. I'd like to know what would be ideal for this type of game, not just from an economic perspective (both server and middleware), but also from an architectural perspective, as I'm going to be working on the server very shortly and I can't get too serious with my server design without knowing the answers to these questions.

    Thanks.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1) per server licenses are per server, a cloud will not get you more with an unlimited as each machine in the cloud needs an own license.
    But if a 1000 cap multi license or a single unlimited is better is a thing you can only find out by load testing once you did it.

    2) If you create a diablo2 style game you don't need either of them. The only exception is perhaps the chat server but there you would buy the IRC addon on asset store for $5 and use a simple IRC server and done :) (the rest is stuff from MMOs and you aren't generating a such cause if you were, then you would have to restart the whole project now)
    With a diablo 2 alike game you do basically nothing on the server other than forwarding data to the other clients, if at all ... (technically a diablo 2 style game wouldn't even require a game server, only irc for chat and a master server + unity networking for the match making and nat punchthrough ... thats how the open games in Warcraft, starcraft and diablo work basically on a technical level as you can see with players you can't join due to nat punchthrough failing ;))

    3) Clouds are normally rented yeah, best option at the time is likely AirVM. Amazon is inacceptable for gaming purpose (hell expensive, unrealiable, very bad and instable pings)
    building your own cloud server is possible ... but we talk about costs and investments in the 10k++ range here + maintenance + running to the machine if something fails+ hardware replacements + xxxx ... questionable you are going to get away cheaper for a single realm that way unless you life next to a big stable data centre, especially if you don't even know if you will need a cluster.
     
  3. SpyridonZ

    SpyridonZ

    Joined:
    Jun 7, 2009
    Posts:
    97
    Thanks for the response!

    IRC for chat is great idea, thanks.

    On the topic of not requiring a game server... wouldnt that leave the game extremely insecure? I forgot to mention that I'd like to avoid issues like D2 had with item duping, etc. I would think I would need AI server-side to prevent security issues with the NPC's as well, no?
     
  4. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Even AirVM is pricey!

    $106.8/month to compete with my $30/month VPS (not taking into account the 750 less of bandwidth).

    You'd have to have really unpredictable usage before that before that becomes viable.

    If you need security in scalability, e.g. can't wait up to 72 hours(e.g. weekend) to get a new machine online then I'd go hybrid - possibly with different providers if your server allows for it. Dedicated servers with x, cloud with y.
     
    Last edited: Aug 7, 2011
  5. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    @NPSF3000: What are you getting for $30 per month and where?

    That $106 at AirVM would get a Windows dual-core 1ghz 2GB ram for a month (what I have been using for the past while).
     
  6. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Lost this twice, so here is a very short version. NFO = nfoservers.com

    Code (csharp):
    1.  
    2.     NFO AirVM  
    3. CPU:    2800    2500    12%
    4. RAM:    1024    1024    0%
    5. HDD:    100 25  300%
    6. BAND:   1000    250 300%
    7.            
    8. PRICE:  30  101.5   30%
    9.            
    10.     NFO AirVM  
    11. CPU:    11200   2500    348%
    12. RAM:    4096    1024    300%
    13. HDD:    400 25  1500%
    14. BAND:   4000    250 1500%
    15.            
    16. PRICE:  100 101.5   99%
    17.  
    There are all sorts of advantages to cloud based servers, but in the OP's case they are diminished. In your scenario, with a single server, you may appreciate some of the niceties.

    Edit: Now I've calmed down a bit, awesome game BTW - I played it a while back and have read a tad about it in the news/blogs.

    As you may know, this comparison is a tad simplistic, but I'd be happy to trade benchmarks if you wanted :p
     
    Last edited: Aug 7, 2011
  7. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
  8. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Here I am trying to NOT spam you...

    Anywho no idea if that still works, but lets give it a shot :p
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The point of a cloud offer is that you can scale.
    If you never intend to scale (which is the case with any non cloud hoster normally, only few offer you easy and performant scaling just like that) then naturally a normal hoster is good too :)