Skip to content

Commit 0ac6a19

Browse files
committed
Add concrete cardinalities on thread concurrency
1 parent 39ba526 commit 0ac6a19

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/leios-design/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,22 @@ The current primary responsibilities of a Cardano node are roughly:
5757

5858
Despite this apparent simplicity, this already results in a highly concurrent system once cardinalities of upstream and downstream network peers are considered. A `cardano-node` with the default configuration maintains 20 upstream hot peers, 10 upstream warm peers and can have up to a few hundred downstream connections, each of which may be simultaneously requesting or serving data. All of these operations share critical resources, including memory, CPU, and network bandwidth, requiring careful resource management to ensure timing requirements are met even under load.
5959

60+
Concretely, in the current system there are (including protocols for supporting features like peer sharing):
61+
62+
- 2 pipelined + 3 non-pipelined instances per upstream peers => 7 threads per upstream peer;
63+
- 1 pipelined + 4 non-pipelined instances per downstream peer => 6 threads per downstream peer
64+
6065
Leios significantly expands this concurrency model by introducing new responsibilities:
6166

6267
- Endorser block and closure diffusion: receiving, validating, and transmitting EBs and their transaction closures.
6368
- Voting and vote diffusion: receiving, validating, and transmitting own and foreign votes on EBs.
6469

65-
With these (at least) two additional functionalities, each across many peers, the node set of concurrent tasks only increases. The implementation must ensure that the increased data flows and processing demands do not interfere with each other, or priorization mechanisms ensure to meet the stringent timing constraints necessary for protocol security.
70+
Given the [proposed Leios mini-protocols](https://github.com/cardano-scaling/CIPs/blob/leios/CIP-0164/README.md#leios-mini-protocols), this would result in:
71+
72+
- 4 pipelined + 3 non-pipelined per upstream peers => 11 threads per upstream peer;
73+
- 1 pipelined + 6 non-pipelined per downstream peer => 8 threads per downstream peer
74+
75+
With these two additional functionalities, each across many peers, the node set of concurrent tasks strictly increases. The implementation must ensure that the increased data flows and processing demands do not interfere with each other, or priorization mechanisms ensure to meet the stringent timing constraints necessary for protocol security.
6676

6777
## Designing for the worst-case
6878

0 commit comments

Comments
 (0)