question

Daniel Beauchamp avatar image
Daniel Beauchamp asked

Can the minimum number of servers available be zero?,

Hello! I noticed that in the docs on custom servers it says “an enabled build will always have at least one server available”. I understand that is so a player doesn’t need to wait for a server to spin up.

But is it possible to have an enabled build that has no servers running by default and to let the client wait while it spins up? I am building a very smallmultiplayer UE4 project where there will only ever need to be one server, but I don’t want that server to be running if no one is online. I am fine with having to wait for a server to spin up when I want to run the app.

Ideally the flow would be:

- I start up the app and call the Playfab API to see if the server is available

- If it is not, Playfab spins up the server

- The app connects to the server when it is available

- I use the app for a bit then disconnect

- The server notices that no one is connected anymore, so it shuts down and I stop being billed for hours

Is this a possibility? Thanks!

,

apisCustom 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

·
Seth Du avatar image
Seth Du answered

Basically, what you have described is the functionality of stand-by servers. But whenever there is no one playing, it will always closes all active servers. Stand-by servers is for improving players' game experiences(3 seconds is expected on PlayFab server). Yes, you are able to set 0 stand-by server but initiating a server will take long. Meanwhile stand-by session costs differently from normal compute-hours.

Just let you know that you are able to select different type of VM and overhead for stand-by servers and VM fragmentation will increase the required compute-hours by 20%. You can find more detailed documentation on: Billing for PlayFab Multiplayer Servers 2.0 and Multiplayer servers - detailed price sheet. You can also directly contact our sales team for any further information via sales@playfab.com

3 comments
10 |1200

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

Daniel Beauchamp avatar image Daniel Beauchamp commented ·

Thanks for the reply! That sounds just like what I want.

When you say initiating a server will take long, do you have a ballpark of how long?

Like is it 1-2 min? 5 min? 10min +?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Daniel Beauchamp commented ·

Sorry, I have tested it again on my own title, the whole process is too complicated to maintain. I think it may take 10~20 mins. I am not sure if you are able to enable Multiplayer 2.0 but if so you may try on your own.

If the number of stand-by server is 0, you cannot call API like RequestMultiplayerServer (I think it is by design), you have to call UpdateBuildRegions to add some. You are not able to do any multiplayer things unless the server is ready and one way to get server state is keeping sending requests until success callback is received, which sounds like a bad idea because starting a server takes so long.

I will discuss with our team about your question to see if there is other solution.

0 Likes 0 ·
Daniel Beauchamp avatar image Daniel Beauchamp Seth Du ♦ commented ·

Ooo yeah that doesn’t sound ideal.

Im gonna try seeing if an A1V2 instance is good enough for a single always-on UE4 dedicated server. If so, I could just pay to leave that running all month since it wouldn’t be too pricey. Maybe even have an external script shut down the server overnight since it will only ever be used during the day.

This is for a small personal project between a few friends and that’s why I’m trying to keep costs pretty low. I’m fine paying ~$50 a month for it, but I’d hate for this project to be $100+.

Thanks for all your help!

0 Likes 0 ·

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.