Openvidu api calls takes a long time to complete

Hi, We are developing a multi room application based on openvidu. Each room can have up to 12 members. Sometimes we observe that api calls take a long time to complete. We are setting 7 seconds timeouts and some of the requests does not respond in that time. Cpu usage is around 40%. Could you please provide any insight about what might cause these long api calls?
By the way we are deploying multiple openvidu instances that share a common kurento server. Does this have a negative effect?

best regards

Hello @mjrafiei,

It is difficult to see what is the issue of long api calls. If you could provide us a way to reproduce it, we could take a look.

Regarding to sharing the same KMS with several OpenVidu servers, it is a very unusual architecture. I do not why it can be useful. I don’t remember any reason why it can be problematic with the current OpenVidu version, but maybe in the feature we implement some feature in which OpenVidu Server scans sessions in KMS (considering it is the only server) and things starts to work incorrectly. So I do not recommend deviating from the stantadard way to deploy OpenVidu.


Thanks Micael. Actually we didn’t know what conditions cause the long responses , so I hoped to get some suggestions that might cause this problem.
After some days We are observing some scenarios that produce this condition. If we try to request many tokens from a given session at the same time (for instance 40 or more tokens), or create multiple sessions and request tokens from them at the same time, the CPU usage rise to 100 and response times increases. The second scenario is a more realistic one. Do you think this is an expected behavior?
Openvidu version is 2.18.0 and kurento version is 6.16.

@micael.gallego , @cruizba Any ideas?