Overview
PlayFab Lobbies are temporary groupings of players. Every lobby has a time to live (TTL) that determines when it will be automatically deleted if left idle. The TTL is reset whenever there’s activity on the lobby, such as a member joining, leaving, or updating lobby data. The two most important factors that determine how long a lobby lives are:- Lobby type: Whether the lobby is client-owned or server-owned.
- Connection state: Whether members (and servers) are connected through real-time notifications.
Default lobby lifetime
When a lobby is created, it’s assigned a default TTL of 1 hour. Each time the lobby is updated—through member joins, data updates, or other operations—the TTL is refreshed back to its full duration. For lobbies that use real-time notifications (connections), the TTL is extended to 4 hours when a member connects. This longer TTL accounts for the fact that connected lobbies are actively monitored through the connection system and don’t need to expire as quickly.The lobby TTL resets on every lobby operation. A lobby that is actively being used will not expire due to TTL alone.
How connections affect lobby lifetime
Lobbies that use real-time notifications track member connections. The connection state of members directly impacts the lobby’s lifetime and search visibility.Connected lobbies
When at least one member is connected to a client-owned lobby, the lobby remains searchable and has a maximum idle TTL of 4 hours. As long as the lobby continues to receive updates or connection activity, the TTL continues to reset.Disconnected lobbies
When all members disconnect from a client-owned lobby, two things happen:- The lobby is hidden from search. This prevents other players from discovering a lobby that may be abandoned.
- The lobby TTL is reduced to 1 minute. The lobby enters a brief grace period before deletion.
Lifetime behavior by lobby type
Client-owned and server-owned lobbies have different expiration behaviors.Client-owned lobbies
For more information on what happens when an owner disconnects, see Ownership changes.
Server-owned lobbies
Server-owned lobbies are not deleted when all player members leave. Only the server owner can delete a server-owned lobby, or it will expire after the TTL runs out.
Extending lobby lifetime beyond the default TTL
The 4-hour idle TTL is intended to be the maximum ordinary expected time a lobby would be left unattended. However, some scenarios—such as server-owned lobbies waiting for players to arrive—may require longer-lived lobbies. To keep a lobby alive beyond the default TTL, periodically update the lobby before the TTL expires. Any update operation resets the TTL. For example, a game server can update a lobby property at a regular interval to prevent the lobby from expiring.Any lobby operation resets the TTL, including updating lobby properties, member properties, or search properties.
Search visibility and expiration
Lobby expiration and search visibility are closely related but distinct concepts.- Hidden from search means the lobby won’t appear in FindLobbies results, but it still exists and can be joined using the connection string.
- Deleted means the lobby no longer exists and can’t be accessed.
