1. Help Center
  2. Getting Started

Room Message Latency And Server Stress

Diarkis Room has a way for developers to control message latency and server stress when sending messages.

When creating a room, there is an optional parameter called "interval". This parameter tells a room how to combine multiple messages before sending.

The default value of "interval" is 200 milliseconds. This means that if more than one message is sent between this 200 milliseconds window, those messages will be combined into a single message.

When combining multiple messages into a single message, it will create a "delay", but fewer packets are being sent, so the stress on the server is lighter.

This is the trade-off of the "interval" parameter. If your application can tolerate some latency when sending and receiving messages via rooms, we recommend utilizing the "interval" parameter. 

By setting the value of the "interval" parameter to zero, you will disable the message combining function, so there will be no delay.