Redistribute users over (chat)rooms
Here is one simple algorithm.  Pick one room that has too many people in it, and one room that has too few people in it, and move one person from the first room to the second room.  Repeat until convergence.