-
Notifications
You must be signed in to change notification settings - Fork 56
Performance
What if your game is being broadcast to 1000+ viewers? Will it handle the load? In this article, we will talk about scale considerations and how to deal with them.
As with any performance problem, make sure it is a problem before investing in fixing it. The expensive parts will be JSON parsing by the SDK so the more messages, the more CPU used. For AAA console games that are using 100% of the CPU, performance at scale may be an issue.
You can use the setBandwidthThrottle message using the interactive_send_method API. This message will allow you to specify which messages to throttle. You can use the special value of '0' which will tell the service to stop all messages of that type.
A good set of messages to throttle are participantJoin, participantLeave and giveInput.
For more information, refer to the protocol spec
You can throttle button input disabling the button, setting a cooldown or assigning a spark cost to the button. Each of these techniques will limit the amount of input from the audience.
In Interactive Studio, you can change the sampling rate of the joystick. This will limit the rate of joystick messages sent to the client.