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

Batch retrieval of pipeline connections count on streams page. #21057

Merged
merged 10 commits into from
Nov 28, 2024

Conversation

dennisoelkers
Copy link
Member

@dennisoelkers dennisoelkers commented Nov 26, 2024

Description

Motivation and Context

Prior to this PR, the streams page called an endpoint for each stream to retrieve the number of connected pipelines. This leads to running into the limit for concurrent requests quite fast. Also, it returns a 404 when no pipelines are connected, leading to retries and further delays.

This PR is speeding up the page by:

  • Creating an API endpoint that returns a Map of stream ids -> pipelines for a given list of stream ids
  • Uses a batcher in the frontend to bundle up individual requests to fetch connected pipelines, so only a single request is fired

/nocl No user-facing change.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@dennisoelkers dennisoelkers force-pushed the fix/batching-pipeline-counts-retrieval branch from f313978 to 3678c98 Compare November 26, 2024 13:06
@dennisoelkers dennisoelkers force-pushed the fix/batching-pipeline-counts-retrieval branch from 3678c98 to e040b2e Compare November 26, 2024 13:13
Copy link
Contributor

@ousmaneo ousmaneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kodjo-anipah kodjo-anipah self-requested a review November 28, 2024 07:14
Copy link
Contributor

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dennisoelkers dennisoelkers merged commit 0a1106e into master Nov 28, 2024
7 checks passed
@dennisoelkers dennisoelkers deleted the fix/batching-pipeline-counts-retrieval branch November 28, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants