How can I manage to place an overflow of participants in optimally created dynamic Rooms?
As a follow up to my other question regarding random pairings, I've hit another interesting engineering problem. At the moment, I have my group room set to the max limit of 50 participants. However, I expect to have 1000+ participants arrive when this campaign launches. It is not important that all 1000 of these participants are placed in the same room but it is important that there is a room available for them. And it would be best, if this room had several other participants in it. So, can you recommend a way of placing users into rooms at scale?
In the past, I've handled this in a rather hacky way based on thrown join errors. If the user was not allowed in Room 1, I'd try to place them in Room 2. And so on, or err.. as many errors as it took. Using this sad logic, if the first 10 rooms were full, the user would have to wait through 10 errors in order to get placed accordingly.
I thought about using the REST API to check how many participants were in each room in order to recommend an available room but I suspect this will still cause issues if multiple users were all recommended the same room at once.
Another idea is to estimate the amount of participants we might receive, create X number of rooms, and place those visitors into a random room rather than placing them in a linear fashion. A more distributed approach but would need to finesse room quantity manually.
I realize this is less of a Twilio question and more of an engineering problem but I was wondering how you would approach it. Any help is much appreciated!
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups