question

Duncan Davis avatar image
Duncan Davis asked

How to handle persistent lobbies in multiplayer servers

Engine: UE5
Our game has the concept of lobbies in towns & outposts where many players (~100) outside of a party will be running around doing town related tasks, crafting etc
I am trying to plan out playfab server deployment and scaling.

I am looking for feedback on the approaches below.

game scenario 2 towns that can hold 100 players in a instance. An instance is a UE5 dedicated server

Hosting & Scaling Specific Towns
I am thinking that having a build with params configured to make the dedicated server run x town. This would allow me to poll the deployed servers in a build/region to determine if the player count allows for scaling up or down via programmatic scaling api

So the scenario would look like 2 builds each with town specific config to allow for scaling each town separately.

Players joining persistent towns

Players joining from an outside server/map would run through the town entrance and perform a travel operation to town a. What I am thinking to figure out what town instance to join would be executing a cloud function to poll relevant region town specific build servers to figure out which session id/info should be returned to direct the client to connect to proper session.

Other option
I had thought it might be worth using the matchmaking/queue but I am not thinking the response time will be quick enough.

I understand this may be a more unique setup and am very much open to feedback on the approach.

CloudScriptmultiplayer
1 comment
10 |1200

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

Duncan Davis avatar image Duncan Davis commented ·

Adding a diagram on what I am thinking. I hope there is a more simple way.

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

According to your description, I think you need a constantly running server instance to host your "town", but since PlayFab multiplayer server is designed for session based games, it's not suitable for long running. Please feel free to let me know if there is any misunderstanding.

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.

Duncan Davis avatar image Duncan Davis commented ·

Yea, I agree with the constantly running. The question was more around efficient architecture to support players connecting.

What are the limits on leaving a multiplayer server up? I am not seeing anything hard in the docs.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Duncan Davis commented ·

The reason why it is not recommended to keep the server running continuously is that doing so consumes a lot of resources and incurs huge costs. Also, since MPS is designed for session-based games, running it continuously may cause unknown issues. For more information about multiplayer scenarios, you can refer to Multiplayer with PlayFab - PlayFab | Microsoft Learn.

0 Likes 0 ·
Duncan Davis avatar image Duncan Davis Xiao Zha commented ·

Ill be honest @Xiao Zha are not explaining why your just repeating "designed for session-based."

"running it continuously may cause unknown issues" this does not help anything if you don't know just say it.


To anyone else curious on the same path as me the only thing I have heard is a hard limit is servers have a max 10 day lifespan.

I will give this a shot for a while and see if I can give more solid info than the above.

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.