|
|
|
|
|
by agallego
2021 days ago
|
|
so redpanda partitions 'raft' groups per kafka partition. so in the `topic/partition` model every partition is it's own raft group (similar to multi raft in cockroachdb). So it is in fact even more important due to the replication cost and therefore the additional work of checksumming, compression, etc. Last, a coordinator core for the one of the TCP connections from a client will likely make requests to remote cores (say you receive a request on core 44, but the destination is core 66), so having a thread per core with explicit message passing is pretty fundamental. ss::future<std::vector<append_entries_reply>>
dispatch_hbeats_to_core(ss::shard_id shard, hbeats_ptr requests) {
return with_scheduling_group(
get_scheduling_group(),
[this, shard, r = std::move(requests)]() mutable {
return _group_manager.invoke_on(
shard,
get_smp_service_group(),
[this, r = std::move(r)](ConsensusManager& m) mutable {
return dispatch_hbeats_to_groups(m, std::move(r));
});
});
}
Here is some code that shows importance of accounting the x-core comms explicitly |
|
ps. redpanda link from article is broken, goes to https://vectorized.io/blog/tpc-buffers/vectorized.io/redpand... 404