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

Pipeline architecture v2 (preview) #1913

Merged
merged 26 commits into from
Nov 7, 2024
Merged

Pipeline architecture v2 (preview) #1913

merged 26 commits into from
Nov 7, 2024

Conversation

lovromazgon
Copy link
Member

@lovromazgon lovromazgon commented Oct 15, 2024

Description

This PR adds a new internal pipeline architecture which in conjunction with the SDK changes (ConduitIO/conduit-connector-sdk#193) improves the pipeline throughput up to 5 times (from ~50k rec/s to ~250k rec/s). The new architecture uses a single worker per source connector which runs in its own goroutine and processes records in batches end-to-end. It lowers the overhead of passing records through channels between nodes, because the whole pipeline is executed in the same goroutine from start to end.

The improved pipeline architecture is disabled by default and can be enabled using the flag -preview.pipeline-arch-v2. Note that the new architecture currently supports only 1 source and 1 destination per pipeline.

Important

This is an isolated change, the functionality does not change unless the user supplies the flag -preview.pipeline-arch-v2.

Quick checks

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner October 15, 2024 14:26
pkg/connector/source.go Show resolved Hide resolved
pkg/foundation/metrics/metrics.go Show resolved Hide resolved
pkg/plugin/connector/builtin/sandbox.go Show resolved Hide resolved
@lovromazgon lovromazgon self-assigned this Oct 15, 2024
Copy link
Contributor

@hariso hariso left a comment

Choose a reason for hiding this comment

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

Nice work! Mostly questions in this review, so I can have a more meaningful review next time.:)

pkg/conduit/runtime.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/batch.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/worker.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/worker.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/worker.go Outdated Show resolved Hide resolved
pkg/lifecycle-poc/funnel/worker.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/destination.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/dlq.go Outdated Show resolved Hide resolved
pkg/lifecycle-poc/funnel/dlq.go Show resolved Hide resolved
pkg/lifecycle-poc/funnel/processor.go Show resolved Hide resolved
@lovromazgon lovromazgon requested a review from hariso October 25, 2024 15:12
Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

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

We're going to ship this as part of 0.12.2 behind a feature flag. We'll deal with the optimizations later.

@raulb
Copy link
Member

raulb commented Nov 7, 2024

For the record, I just resolved all open conversations so we could release this PR.

@raulb raulb merged commit 58284dc into main Nov 7, 2024
3 checks passed
@raulb raulb deleted the lovro/poc-funnel branch November 7, 2024 17:43
@raulb
Copy link
Member

raulb commented Nov 8, 2024

Created issue to address what was remaining #1951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants