'SCIM2 Get Users Slow response time

I'm working on a project where regular users and wso2is super admin are on one and only tenant. Our WSO2IS deals with around 5,000 users and has somwhere around 10,000 applications (service providers). Now the issue is that when we make an api call to get all users (even with filters), we have a response time of more than 30 seconds (often triggering off our client timeout of 1min).

This was obviously not the case when there were less users and applications. And we still don't have the issue on other, "lighter", environments.

When we started having long response times, I noticed that applying a filter for which the wso2is super admin was not part of, made response time more acceptable. From that I noticed that when applications are created a role for each of them is automatically assigned to the super admin. When pulling the super admin by api, it is apparently making wso2is go through all of its roles (thus taking time given the amount).

So I was wondering if, by any chance (if this is the root cause of the slow response times), there would be a configuration or a way to avoid pulling the super admin when requesting the scim2 get users api without customizing wso2is api code.

My first thoughts on this issue were that the super admin is the one causing it, so to prevent the slow response I had to whether not pull him when requesting api or make him "lighter". So I thought about two possibilities :

  • having users and super admin on different tenants
  • removing the applications roles from the super admin

Though I have no idea about their impacts and complexities.

TL;DR: Requesting users is now being too slow, I suspect wso2is super admin to be the cause of that although I might be wrong. So, for now, I'm looking for a way to avoid getting him when calling api.

Thanks a lot for your help and do not hesitate to ask questions if some points are not clear enough.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source