question

brendan avatar image
brendan asked

Running a Unity/Bolt server in PlayFab

Question from a developer:

We've developed a headless server for our game using Unity and Photon Bolt, and would like to find out if we can use it in PlayFab's server hosting. It is designed for multiple instances to run on the host machine.

Some specific questions would be:

  1. What are the requirements for building a server application so that it can be instantiated through your API (OS, command line arguments, etc.)?
  2. Is there a limit to how long a server instance can be active?
  3. How many instances can we run at a time?
  4. How many players can be active (playing on a server instance) at the same time? Is there a limit to how many players can connect to a single server instance?
  5. Can we have a sandbox/development server while there is a live server active?
  6. Are the servers limited to regions? If so, is there an option to remove this limit?
  7. What are the costs for server hosting?
Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Yes, you shouldn't have any issues running your server in our hosting. Here's a doc that walks through all the essentials of hosting game servers (and using our matchmaker) in PlayFab: https://api.playfab.com/docs/tutorials/landing-tournaments/custom-game-servers

In terms of your specific questions:

  1. Our servers run Windows Server 2K12 R2. The doc linked above has specifics on command line arguments, but you don't need to use our defaults - feel free to name your parameters however you like. The important thing is using the angle-bracket elements that use our terms for things like IP Address and Port, as we automatically populate those with the correct info.
  2. No, but we recommend cycling servers out periodically, so that no one server is running for weeks at a time. For one thing, any issues in the server code that accumulate over time (like a memory leak) could cause you problems, but also we can only grab the log file for you when the server stops - that's valuable information you'll want to have access to, particularly if players are saying something went wrong in their game session.
  3. As many as you like - we can work with you on getting you set with the max number of servers (and max server hours) you want to have as your limit.
  4. That's not something we can predict, as it's dependent upon what your server is actually doing. A Texas Hold-em poker server and a Counterstrike server have vastly different resource requirements. We impose no arbitrary limits on the number of players you can connect to a server, so I'd recommend selecting a server model and doing thorough testing to determine resource usage per player, to make that calculation.
  5. Yes, just use a separate Title ID for your sandbox environment.
  6. There's no restriction on players being able to connect to servers in regions they're not in, if that's what you mean. So, you can run a single set of servers in EUWest, for example, and have all players connect to it (though users outside that region will have relatively high latencies).
  7. It's basically pass-through. We charge the actual EC2 cost, plus 10% to cover our costs. You can find the CPU/hour costs for EC2 servers here: https://aws.amazon.com/ec2/pricing/on-demand/ (the Windows tab). EC2 also charges for bandwidth, but for most games the CPU cost is the overwhelming majority of the EC2 cost.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.