New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service list backend request per cluster #7229
Conversation
543cda2
to
3d22ef8
Compare
079ba5f
to
f089557
Compare
Ready for review @nrfox |
@nrfox this PR is rebased and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more great optimization, @hhovsepy!
In my environment with 200 namespaces:
- Previously, loading the service list required 200 requests, which took around 600 ms:
- Now, it is simplified to just 1 request, which takes 180 ms:
As a nice to have, in case the user has numerous services and namespaces, I think it would be better to initially display a Loading services
message instead of No services found
. Despite the optimization, if the request takes a couple of seconds, the user can think there is an issue with Kiali.
Thanks for the review @ferhoyos , that |
Describe the change
In Service list page, there was sending a REST API request to retrieve services per namespace, which was causing to filter per cluster which contains the provided namespace.
Now Optimized to send Service list request to REST API per cluster with providing selected namespaces list.
Steps to test the PR
Create a set of namespaces:
for i in {1..200}; do kubectl create ns test-$i; done
Open the Service list page and select all services.
Compare the loading time between before and now.
Check if Health and Configuration fields are loading correctly: There was a bug here which was mirroring one cluster's Configuration to another one when two Services with same name/namespace.
Automation testing
Added unit tests. Added integration tests.
Issue reference
#4832