-1
\$\begingroup\$

I'm working with some people who have a prototype game in Unity and may need to scale it up to address a larger user base. The potential application has the following characteristics:

  1. Sessions are multiplayer (e.g., multiple users in a game world)
  2. Sessions are independent (e.g., each session knows everything it needs to know)
  3. Sessions will log some stats to a centralized server (sessions write here, but do not read from there)
  4. Session use is likely to be highly uneven (high peak loads of #users and users/session, with long periods of low usage)
  5. Users will interact with the system using a browser

Based on these characteristics, a cloud-based service like EC2 seems like an obvious choice. You only pay for what you use, so you can store an instance of a game server and spin up copies of it when needed, then cut them off when usage bottoms out. However, doing this requires a server dedicated to managing the # of instances online and helping users get properly allocated to a running server. From the end-user, I would imagine a system where a user logs into a web portal and requests a list of sessions that they can join. In the background, the manager would spin up a new session if the number of users waiting in the lobby exceeds the slots available.

In principle, this is a simple concept: you have a lobby, you have a count of users waiting, and you have a count of your servers (and #sessions/server and #users/session). If your ratio of #waiting/#slots available gets too high, you spin up another VM. If the ratio gets low, you start shutting some VM's down. However, in practice this is not likely to be as trivial (lag times to spin up servers are non-trivial, connecting users in browser-based apps to a dynamically-allocated server could have failures, etc). However, this seems like a fairly general use-case. Has anyone already made such a lobby controller? Or even a general load-balancing controller that has similar characteristics? (Preferably one that would work with EC2)

Or, short question: Does anyone know of a library or server application that would be suitable to balance creating servers and sessions on servers, to dynamically spin up servers for Unity games (on EC2)? Alternatively, for those who have attempted to home-brew such a system, what were the primary hurdles? (Beyond the obvious fact that it is almost impossible to simulate load meaningfully)

\$\endgroup\$
  • \$\begingroup\$ The best resource I've seen is this on the topic: gamasutra.com/blogs/AshkanSaeediMazdeh/20130524/192975/… However, it doesn't give a ton of insight into the actual features of specific approaches. Ideally, I'd be looking for something that is generic (not Unity-specific) since the Unity instances are just one thing that will be running on each VM (and the Unity sessions are all independent anyway). \$\endgroup\$ – Namey Aug 10 '13 at 19:26
  • \$\begingroup\$ Questions that are about "which tech to use" are outside the scope of the site. For more information, see this meta post. \$\endgroup\$ – MichaelHouse Aug 10 '13 at 20:13
  • \$\begingroup\$ I read through that post. It seems to apply to things that constitute "opinion polls." This is not an "opinion poll." This is questioning the existence of such libraries and their maturity for a fairly well-specified application. If you honestly think that this doesn't belong here, I can withdraw the question. However, I would think that the answers to this question would be fairly constructive to people looking to scale up an existing application. \$\endgroup\$ – Namey Aug 10 '13 at 22:05
  • \$\begingroup\$ Or, alternatively, which of these do you feel that my question is violating? 1. "They're too localized" (Is load-balancing sessions across cloud computing that localized of an issue?) 2. "They may be biased, depending on who gets its hands first on it." (Is there a religious war about cloud-compute middleware for games? If so, could you just post me a few links and let me go review it?) 3. "Additionally, the questions are ambiguous and vague." (This is definitely not vague nor ambiguous, IMO. If you feel it is, I'll add more detail.) \$\endgroup\$ – Namey Aug 10 '13 at 22:10
  • \$\begingroup\$ Altered question title to better reflect general utility of what I am asking for. I'm happy to revise the question to fit guidelines better, if you can specify them a bit more explicitly. \$\endgroup\$ – Namey Aug 10 '13 at 22:14
1
\$\begingroup\$

The general problem you are describing (Cloud deployment, auto scale-in/scale-out based on certain metrics) is usually handled by a PaaS - Platform as a Service.

In general, a PaaS allows you to upload your 'application', which could be a VM image or executable files, depending on the PaaS. It is the responsibility of the PaaS to deploy the application to a cloud instance, monitor the application and scale in/out as required.

I don't know of any PaaS that has explicit support for Unity, but the principles hold regardless of what your code does. There is a comparison of PaaS options here: PaaS Providers

Disclaimer: I work for GigaSpaces, developer of the Cloudify open source PaaS stack.

\$\endgroup\$
  • \$\begingroup\$ Thanks for at least the pointer in the right direction. I will admit I was hoping for some additional insight about how it intersected with games, but maybe this just isn't the forum for it. \$\endgroup\$ – Namey Aug 21 '13 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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