Get Started with Login Queues #

This guide covers configuring players’ login queue experience.

Login queue configuration #

The login queue configuration is set with some initial values to get you started. You can view these values and tune them in the LoginQueueServiceConfig.

game:
  serviceConfigs:
    LoginQueueServiceConfig:
      targetLoginRatePerSecond: 50
      targetCcuLimit: 10000
      estimatedSecondsToLogin: 10
      maxCheckTicketPollTimeSeconds: 300

Login queue configurations apply to your entire deployed Pragma Engine instance. Review the following table to understand how to tune these values:

ConfigurationDescriptionRecommendation
targetLoginRatePerSecondThe target maximum number of users to log in per second.Set this value lower than the maximum number of requests your authentication server can handle per second.
targetCcuLimitThe target maximum number of concurrent users logged in.Set this to a value lower than your game servers maximum concurrent players that does not overload your game servers.
estimatedSecondsToLoginHow long you estimate it takes between a user login request and the user gaining access.Set this to the predicted average amount of time it takes your system to log in a user.
maxCheckTicketPollTimeSecondsAmount of time a client should wait before checking the status of their queue

Get started with login queues #

  1. Review the default values set in the LoginQueueServiceConfig and ensure they match your environment’s needs.
  2. [Optional] Set up your game client to listen for the OnLoginQueueUpdate broadcast event. OnLoginQueueUpdate broadcasts the QueueUpdateData structure. The QueueUpdateData structure contains the following details that your game client can use to provide your users more details about their login experience.
    • Eta: The estimated amount of time in milliseconds until the user is logged in.
    • PositionInQueue: The user’s place in the login queue.

The login queue functionality is built into the Pragma SDK for Unreal and Unity.

The following examples can be found in the Pragma SDK test examples for Unreal and Unity.

1
2
3
4
5
6
7
Player->OnLoginQueueUpdate.AddLambda([this, &NewEta, 
    &NewPositionInQueue, &UpdateCalled](const FPragma_QueueUpdateData UpdateData)
{
    NewEta = UpdateData.Eta;
    NewPositionInQueue = UpdateData.PositionInQueue;
    // Update game client UI to display ETA and position
});
1
2
3
4
5
6
_accountService.OnLoginQueueUpdate += queueUpdateComplete =>
{
    newEta = queueUpdateComplete.Eta;
    newPositionInQueue = queueUpdateComplete.PositionInQueue;
    // Update game client UI to display ETA and position
};

Testing and development #

During development and testing you can bypass the login queue ticket validation to reduce testing and development time. To bypass the login queue enable the devLoginQueueBypass in the SocialPlayerGatewayConfig.

social:
  serviceConfigs:
    SocialPlayerGatewayConfig:
      devLoginQueueBypass: true
This is not recommended for production and live games or services. In addition, this does not turn off the login queue for the SDK. This only disables the login queue if you are developing against authenticateOrCreate directly. To fully disable login queue you’ll also need to set the LoginServiceConfig values to high values for targetCCU and targetLoginsPerSecond.