Application : Random Video Calling Application
Architecture : NodeJs, MongoDb, Android
Current Flow : 1. We are making a TTL Database Collection for those user who are currently searching for a match.
Searching the TTL collection for other users and getting an filtered array
using Math.Random() for the match finding & connecting both usrs
Problem : Even when we have users on array, Matching is not happening sometimes (10%),. seems buggy.
Requirement : 1. What will be better for performance for matching- algorithm changes
Do we need to change to in-memory Database like Redis ??
Any other suggestions ?