Skip to content
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

Merged
merged 5 commits into from Apr 4, 2024

Conversation

hhovsepy
Copy link
Contributor

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

@hhovsepy hhovsepy marked this pull request as ready for review March 26, 2024 17:37
@hhovsepy hhovsepy marked this pull request as draft March 26, 2024 19:33
@hhovsepy hhovsepy force-pushed the issue4832_services branch 2 times, most recently from 543cda2 to 3d22ef8 Compare March 27, 2024 10:40
@hhovsepy hhovsepy marked this pull request as ready for review March 27, 2024 11:40
@hhovsepy hhovsepy requested a review from nrfox March 27, 2024 11:49
@hhovsepy hhovsepy self-assigned this Mar 27, 2024
@hhovsepy hhovsepy added the test: back-end/integration PR adds/updates back-end tests (unit and/or integration) label Mar 27, 2024
@hhovsepy hhovsepy requested a review from ferhoyos March 27, 2024 14:15
@hhovsepy
Copy link
Contributor Author

hhovsepy commented Apr 2, 2024

Ready for review @nrfox

@hhovsepy
Copy link
Contributor Author

hhovsepy commented Apr 3, 2024

@nrfox this PR is rebased and ready for review.

Copy link
Contributor

@ferhoyos ferhoyos left a 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:

image

  • Now, it is simplified to just 1 request, which takes 180 ms:

image

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.

models/service.go Show resolved Hide resolved
@hhovsepy
Copy link
Contributor Author

hhovsepy commented Apr 4, 2024

Thanks for the review @ferhoyos , that No services found is from VirtualList.tsx by design, and yes a bit confusing. I would leave that for another UX improvements.

@hhovsepy hhovsepy merged commit 5551596 into kiali:master Apr 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test: back-end/integration PR adds/updates back-end tests (unit and/or integration)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants