There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Build instance rebalance logic
Given multiple instances of the app host, as the new tenants are added, or removed, we do a refresh, by deleting all of the config and redistribute all of the instances. Instead of doing that, devise an algorithm, where each time a tenant is deleted, we
check the balance of the tenants accross the instances, and move a tenant to a diffent instance as necessary. Example:
Add tenant t7
CURRENTLY, before adding, all of the config is deleted, and tenants are placed/deployed again
DESIRED: add to instance 1 (decide arbitrarily if tenants are equal)
Add tenant 8
DESIRED: add T8 to instance 2 directly, w/o deleting all 7 tenants.