Skip to content

Routing series/post4 topic weaving - #298

Merged
SamBarker merged 21 commits into
kroxylicious:mainfrom
SamBarker:routing-series/post4-topic-weaving
Nov 3, 2026
Merged

SamBarker merged 21 commits into
kroxylicious:mainfrom
SamBarker:routing-series/post4-topic-weaving

Conversation

@SamBarker

Copy link
Copy Markdown
Member

Summary

Post 4 of the routing series: Topic Weaving: One client, many clusters. It is a work in progress, but the first half is written and I'd like feedback on it now rather than at the end.

What's ready for feedback

  • Introduction and refresher
  • Who sees what: the topic map, and how admin operations (create, delete, alter) have to agree with it
  • Broker ID collision, and why the runtime rather than the router does the translation
  • What a weaving router has to do
  • Transactions and KIP-939

Where I'd most like input

  • Technical accuracy of the framing: reads are aggregation (the clusters are the source of truth), admin writes are disaggregation (no source of truth, so the answer is policy).
  • Admin operation options (default cluster, rule on the name, catalogue, every cluster, refuse): are the trade-offs fair, and is anything missing?
  • Voice and length: does it hold together as a standalone read after posts 1 to 3?

Still to write

Producing (why PID translation is hard), Consuming, proxy placement, weaving vs replication vs connection switching, and the closing section. The working notes and HTML comment placeholders at the bottom of the file will be removed before publishing.

The filename is dated 2026-11-03, so the date needs revisiting if it slips.

@SamBarker
SamBarker force-pushed the routing-series/post4-topic-weaving branch from 3e0790a to 0ed04a9 Compare November 2, 2026 05:34
Point to make: KIP-939 (two-phase commit support) still does not fix this. If we went anywhere near it we would be in full distributed consensus pain. Not read or verified yet. Summarise from the doc before quoting, and check its claims against the KIP.

## Topic ID is also temporal
1. Topic IDs / UUIDs (KIP-516)At first glance, a Topic ID looks spatial (it’s just a coordinate for a topic). But it is actually a temporal lifecycle marker generated by the KRaft controller.The Semantics: If you delete a topic and recreate it with the same name, it gets a new UUID to prevent zombie delayed fetches from corrupting the new log.Why it breaks stateless math: You can mathematically fake a Node ID using $V = id + S \times t$ because Node IDs are predictable integers. You cannot mathematically derive a random backend UUID from a frontend virtual UUID.The Proxy Seam: To support API versions v13+ (where Produce and Fetch requests use UUIDs instead of strings), the proxy must maintain a stateful [Virtual Topic UUID -> Physical Topic UUID] mapping table in memory. If a proxy replica restarts and loses that map, it cannot route the frame. This is exactly why a proxy might intentionally cap PRODUCE API versions to v12—forcing clients to use string names—just to avoid handling cluster-specific Topic IDs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: fetches don't mutate the transaction log in anyway.

@k-wall k-wall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @SamBarker, another very thorough piece of work.

@SamBarker
SamBarker marked this pull request as ready for review November 2, 2026 17:22
@SamBarker
SamBarker requested a review from a team as a code owner November 2, 2026 17:22
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
…sactions and KIP-939

Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Move 'What a weaving router has to do' ahead of the broker ID section and 'Picking a boss' after KIP-939. Use the sorting office counter to explain per-identity maps, rename 'Who sees what' to 'When names collide', clarify the node ID example and add a note on epoch bumps.

Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Cover the classic group protocol with a boss for membership and offsets
split by topic, ahead of transactions as the contrasting case. Replace
the store/participant test in 'Picking a boss' with local versus remote
content, state the design-level status once in the intro, and trim the
repeated 'not built' caveats.

Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
@SamBarker
SamBarker force-pushed the routing-series/post4-topic-weaving branch from 6da746f to 7a53446 Compare November 3, 2026 02:06
@SamBarker
SamBarker enabled auto-merge November 3, 2026 02:07
@SamBarker
SamBarker disabled auto-merge November 3, 2026 02:08
@SamBarker
SamBarker merged commit e4fe6eb into kroxylicious:main Nov 3, 2026
2 checks passed
@SamBarker
SamBarker deleted the routing-series/post4-topic-weaving branch November 3, 2026 02:08
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.

2 participants