Skip to content

feat(network): Prioritise ws connections in layer2#2726

Merged
harbu merged 2 commits intomainfrom
prioritise-ws-connections-in-layer2
Aug 23, 2024
Merged

feat(network): Prioritise ws connections in layer2#2726
harbu merged 2 commits intomainfrom
prioritise-ws-connections-in-layer2

Conversation

@juslesan
Copy link
Copy Markdown
Contributor

Summary

If a node has 0 neighbors in a stream prioritize picking up one WS server node as a neighbor to improve time to data.

@github-actions github-actions Bot added the network Related to Network Package label Aug 22, 2024
@juslesan
Copy link
Copy Markdown
Contributor Author

juslesan commented Aug 22, 2024

Still hitting some sad paths with neighbor discovery but the mean and median have gone down (1000 runs):

-------------------------------
Time to start network stack
mean: 413.013
median: 311
max: 3873
min: 141
std: 521.7751056068122
-------------------------------
Time to fetch stream entry points
mean: 160.98901098901098
median: 102
max: 10002
min: 11
std: 409.78094935302715
-------------------------------
Time to first neighbor
mean: 1144.8512562814071
median: 579
max: 33513
min: 108
std: 2148.615397557
-------------------------------
Time to first message in network
mean: 1209.987
median: 623.5
max: 33571
min: 164
std: 2192.8854873957735
-------------------------------
Time to validate
mean: 959.806
median: 603.5
max: 13033
min: 443
std: 1238.903815622504
-------------------------------
Time to first message
mean: 2839.313
median: 1932
max: 35263
min: 1206
std: 2581.5059320154583

Some of these bad cases are could be caused by older versions passing stale contacts in the network

@juslesan juslesan requested a review from harbu August 22, 2024 13:07
@harbu harbu merged commit 1159bd9 into main Aug 23, 2024
@harbu harbu deleted the prioritise-ws-connections-in-layer2 branch August 23, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network Related to Network Package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants