bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

Legal API - Investigate performance issues seen in Dev #23959

Open argush3 opened 1 week ago

argush3 commented 1 week ago

It was brought up that legal api in Dev seems to be slow for GET /business/ and GET /business//tasks endpoints.

The timing coincides with some database versioning updates.

It was also brought up that it potentially has to do with namex api and auth api being slow to respond.

Investigation needs to be done to determine what is causing the slow response times for GET /business/ and GET /business//tasks endpoints in Dev legal api.

Reference this teams thread for more details: https://teams.microsoft.com/l/message/19:c447ed74b25b49d4b59cf0302037baab@thread.tacv2/1729535348596?tenantId=6fdb5200-3d0d-4a8a-b036-d3685e359adc&groupId=00bd6377-9feb-44be-bbc8-19c3752a67b2&parentMessageId=1729535348596&teamName=External%3A%20SBC%20REG%20Modernization&channelName=Entities%20Product%20Team&createdTime=1729535348596

chenhongjing commented 1 week ago

The involuntary dissolution filter function, which calls <auth-api>orgs/<org_id>/affiliations, has been slowing down the response. The latency of this auth-api call to fetch a certain number of affiliated entities is longer than expected. And we have the method to reproduce this issue at local environment.

To solve this performance issue, we have disabled this filter function via feature flag.

Note that this filter function used to enable only in dev/test. And the underlying issue is on the delays of auth-api. We can wait and look into it more later if we need to or this issue is brought up again.

vikas-gov commented 6 days ago

Concerns:

Next Steps

vikas-gov commented 5 days ago

Next Steps