Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Run Hosted Server on Unity Multiplay automatically or run it 24hours

Discussion in 'Game Server Hosting' started by Sulaiman12, Nov 19, 2022.

  1. Sulaiman12

    Sulaiman12

    Joined:
    May 28, 2020
    Posts:
    5
    Hi! I'm new to Multiplay, I have made a server and hosted it on multiplay where I only need to host a dedicated server now the server is working fine. so the issue is it stopped after some time. so I want to know How to keep it running for 24 hours or How should I start it when a player tries to Join and it's off.

    Thanks
     
  2. lamorna

    lamorna

    Joined:
    Oct 2, 2019
    Posts:
    9
  3. Alexis_UGS

    Alexis_UGS

    Unity Technologies

    Joined:
    Mar 2, 2022
    Posts:
    30
    Hi @Sulaiman12 ,

    Our default TTL for a server is 1 hour. If you're using our Allocation service (or our matchmaker service who will call our allocation API), Multiplay will automatically start a server to host a player, and shut it down if it doe not receive a new allocation request. That is the usual flow when using our product!

    We will eventually offer customizable TTL (ie: keep servers alive for 24 hours). In the meantime, if you need to set a custom TTL for a given Fleet, I would kindly ask you to send us a support ticket, so we can keep track of this.

    Let me know if you have any further question,
    alexis
     
  4. Sulaiman12

    Sulaiman12

    Joined:
    May 28, 2020
    Posts:
    5
    Thanks, I figured out that I can use API to allocate API.
     
  5. Alexis_UGS

    Alexis_UGS

    Unity Technologies

    Joined:
    Mar 2, 2022
    Posts:
    30
    Now worries, glad it helped!
     
  6. tony040209_unity

    tony040209_unity

    Joined:
    Mar 21, 2021
    Posts:
    25

    I would like to ask, I want to distribute through MatchMaker, and then connect through PhotonFusion, so in order for
    FusionServer and Client to continue the game, UGS Server must also be kept open until the player's game ends.

    Wondering what does "support ticket" mean?
     
  7. Alexis_UGS

    Alexis_UGS

    Unity Technologies

    Joined:
    Mar 2, 2022
    Posts:
    30
    I am not sure I fully understand your question, but there goes: in your context, you would matchmake your players together, then allocate a game server, and ensure the connection between client and server with Photon. The complete flow is described here, in the context of the BR200 sample we've developed with Photon

    Support ticket refers here to Unity support team, as we currently do not expose customizable TTL.
     
  8. tony040209_unity

    tony040209_unity

    Joined:
    Mar 21, 2021
    Posts:
    25
    Hi @ADB_Unity_UGS

    I also tested the FusIonBr200 myself,
    So Br200 also has custom TTL through Unity support team?
    After matching players through MatchMaker,
    The server will not be disconnected.


    Is there an extra charge for custom TTL?
     
  9. Alexis_UGS

    Alexis_UGS

    Unity Technologies

    Joined:
    Mar 2, 2022
    Posts:
    30
    No need for a custom TTL with the BR200 sample: our default TTL for a server without allocation is 1 hour. You don't need to contact our support.

    If you are only testing, I would recommend to set your min server to 0 in order to save costs.
     
  10. tony040209_unity

    tony040209_unity

    Joined:
    Mar 21, 2021
    Posts:
    25

    So if a player After pairing is complete through the matchmaker, will the server exist until the end of the game?
    The situation on my side is,
    After the server pairing is completed, the Allocated status will still be displayed.

    And if a player is disconnected, will the server wait for an hour?

    This is very important to me because the game I am currently working on is a 1v1 card battle game.
    Technology expected to be used: UGS + MatchMaker + PhotonFusion


    1.I need the matchmaker to be paired, the server can continue to run until the end of the game
    2.If the player is disconnected, there will be a mechanism for reconnecting
    Is there a recommended way to do this?
     
    Last edited: Dec 6, 2022
  11. Alexis_UGS

    Alexis_UGS

    Unity Technologies

    Joined:
    Mar 2, 2022
    Posts:
    30
    That is correct, the server will be kept alive for an hour if it does not receive a new allocation. Of course, once it receives one, the countdown is reset.

    We don't have a mechanism to handle reconnection, this is something your game client and your netcode should do. As long the server is allocated and return an IP, your game client can connect to it