We’ve reached requests per second limit (AmazonGameLiftException: Rate exceeded) for SearchGameSessions call. We’re using GameLift C# SDK with unity. Yesterday we contacted the support team to increase the RPS limit in API Gateway category. Are we requesting an increase on the right limit type? Or should we request a limit increase on something else?
By default, GameLift uses token bucket rate limiting and throttles requests exceeding 5 TPS (Transactions Per Second) sustained and 10 TPS in burst. In other words, the bucket contains 10 tokens at max, and each request consumes 1 ticket, and GameLift fills up the bucket with 5 tokens per second.
Could you verify if there are any ways for you to optimize your call pattern to reduce the TPS, e.g. implementing a backend service to proxy between game client and GameLift, caching SearchGameSession results on the backend service, etc.
If that doesn’t help, then:
- Go to the GameLift console
- Service Limits
- Fill out the launch questionnaire and email it to firstname.lastname@example.org. This will help us understand your use case better and decide the best limits to provide to you, as well as determining if there are other limit increases that we should provide.
- Click on “Request Increase”
- Service Limit Increase
- Select GameLift
- Select Region
- Select any instance type
- In the use case description, specify that you are looking for limit increases to SearchGameSession, and your proposed new limit.
Ok, so we should probably look for realtime database to store game sessions. The same limit is for CreatePlayerSession, CreateGameSession, is it correct?
Please take a look at A Guide to Amazon GameLift & Game Servers | AWS Game Tech Blog, specifically sections on “Standalone Game Session Servers with a Serverless Backend” and “Standalone Game Session Servers with WebSockets-based Backend” to see our recommended architecture for the communication between game clients and GameLift.
CreateGameSession default is (10, 5), same as SearchGameSession. CreatePlayerSession and CreatePlayerSessions defaults are (50, 50). This is to accommodate game sessions with 10+ players. Use the batch API – CreatePlayerSessions to achieve higher throughput in terms of player session creation.