Describe the bug
The current Tenant implementation loads in memory all tenants in the shared tenant DB.
There is a watch that reloads ALL tenants to DB upon any tenant update.
Our current manager creates tenant logs and usage statistics which is triggering this update in sequence for all tenants, creating a large network bottleneck that is not scalable as more tenants and more backend servers would eventually bring back the problem of memory run that was fixed by only fetching the required data.
We need to improve on this implementation to just update the updated tenants or not rely on tenants-in-memory at all.
Describe the bug The current Tenant implementation loads in memory all tenants in the shared tenant DB.
There is a watch that reloads ALL tenants to DB upon any tenant update.
Our current manager creates tenant logs and usage statistics which is triggering this update in sequence for all tenants, creating a large network bottleneck that is not scalable as more tenants and more backend servers would eventually bring back the problem of memory run that was fixed by only fetching the required data.
We need to improve on this implementation to just update the updated tenants or not rely on tenants-in-memory at all.