Currently, there is no way to set up a max capacity on nodes. Accordingly to past experience about performance issues during events this is a need (during FW we were using the feature-flag switch to re-balance our nodes load when any of them had more than 350 users).
All we have now, regarding this, is a hardcoded value in unity-renderer repository which can be found here.
In the scope of enhancing the realm picking algorithm (check the draft ADR here) we are adding a new rule which will filter out those nodes that are overloaded. In this context, of realm picking, overloaded will mean: CPU/RAM above 90% or node is at max capacity (accordingly to this MAX_USERS variable). This will be analyzed on the BFF side to avoid exposing this information to the world, you can check the related PR here where currently the maxUsers is always undefined so we by-pass that limitation.
The MAX_USERS variable will be used to determine the value of acceptingUsers property coming in the /about endpoint, then this property will be consider by unity-renderer (check approach here).
Add MAX_USERS environment variable on BFF to start using it in the Realm Picking algorithm.
https://github.com/decentraland/catalyst/issues/1466
Context
acceptingUsers
property coming in the