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

Kafka Consumer Worker #320

Merged
merged 39 commits into from
Oct 18, 2023
Merged

Kafka Consumer Worker #320

merged 39 commits into from
Oct 18, 2023

Conversation

hekike
Copy link
Contributor

@hekike hekike commented Oct 16, 2023

What?

  • Kafka Consumer as Go Worker instead of Kafka Connect
  • Separate server and worker commands
  • Horizontally scalable consumers via Kafka's consumer rebalancing
  • Validating events against meters for better deadlettering

Why?

Motivation in order of importance:

  • Increase deduplication consistency by deduping in consumer
  • Reduce error blast radius when Redis is down by deduping after ingestion
  • Minimize the number of correct events sent to dead-letter when a single event is malformed in the batch through validating against meters
  • Enable autoscaling via Kafka consumer rebalancing
  • Being able to implement more advanced dead-letter logic, like sinking it to a separate clickhouse table per namespace

Tradeoff:

  • We are reimplementing some of Kafka Connect

Breaking Change

Operational breaking change. Replacing Kafka Connect with the sink-worker process.
There is no breaking change for the APIs.

config/ingest.go Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
cmd/server/main.go Outdated Show resolved Hide resolved
cmd/sink-worker/main.go Outdated Show resolved Hide resolved
cmd/sink-worker/main.go Outdated Show resolved Hide resolved
internal/sink/sink.go Outdated Show resolved Hide resolved
internal/sink/sink.go Show resolved Hide resolved
internal/sink/storage.go Outdated Show resolved Hide resolved
pkg/models/meter.go Outdated Show resolved Hide resolved
quickstart/docker-compose.ci.yaml Outdated Show resolved Hide resolved
@hekike hekike merged commit 11dd821 into main Oct 18, 2023
15 checks passed
@hekike hekike deleted the feat/go-consumer branch October 18, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dedupe area/processor release-note/breaking-change Release note: Breaking Changes release-note/feature Release note: Exciting New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants