Skip to content

dekaf(migrations): Support for automatically redirecting consumers to the correct instance #2261

@jshearer

Description

@jshearer

By design, an instance of Dekaf can only serve materializations hosted in the same dataplane that it's running in. This poses the question: what happens when we migrate a Dekaf materialization to a new dataplane? Currently, it breaks. The solution I've come up with is to (hopefully) seamlessly "redirect" those consumers to the correct broker address.

When a Kafka consumer connects to a broker, one of the first things it does is asks for the list of known broker addresses. Currently Dekaf just advertises itself as the only known broker and moves on with its day. What it could do is instead look up the host dataplane of the task in question (which it fortunately will know at this point in the connection process), and if it's different than the current instance's dataplane, respond with that instance's hostname as the only available broker.

Ideally then, the consumer would know to start up a connection to that broker instead. It remains to be seen how this plays out in practice -- should the original broker immediately close the connection? Leave it open but error on other messages? Something else?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions