-
Notifications
You must be signed in to change notification settings - Fork 303
integrate authentication #2544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
dshulyak
wants to merge
23
commits into
master
Choose a base branch
from
dmitry/wireauth-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
integrate authentication #2544
+13,441
−857
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6d6b9a5 to
a6a9ce8
Compare
fe8542d to
adedbe9
Compare
6682a37 to
5365aec
Compare
5365aec to
30bff0c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dependencies: #2417 #2458 #2538
test plan
auth overhead is 32 bytes per datagram and 200ns per encrypt/decrypt operation.
the expected latency degradation should be ~2%.
the goal is to verify that protocol doesn't enter broken state and can recover after
expected disruptions (one sided restarts/crashes, prolonged connectivity loss, packet loss)
i will use the same same workload as in the previous test and automate those disruptions with https://github.com/chaos-mesh/chaos-mesh
running this setup https://github.com/dshulyak/monad-testing/ , everything as expected so far
worst case dos attacks on authentication protocol
handshake spamming should hit rate limits and not cause raptorcast thread starvation
smallest (32bytes) unauthenticated messages with sub-1Gbps rate should not be able to cause raptorcast thread starvation
upgrades sanity testing on stressnet
it is possible to run auth/non-auth nodes at the same time, and should not cause any disruptions to normal operations.
performance evaluation
i am using latency.rs 100 nodes cluster with simulation toolkit on an aws c6a.48xlarge instance with 192vcpus.
for latency simulatation nodes are divided into 10 buckets, with 20ms incremental latency.
workload sends 2MB raptorcast payload every 1s, latency captures time for encoding, decoding and network propagation
p99 is somewhat around 2% and in lower percentiles auth overhead is less noticeable.
dos attacks
i tested handshake spamming at 2000-3000-4000 handshakes per second and after 2000 they don't increase cpu/memory usage. the limits in place are affective, at the peak such spam utilizes 60% and can't starve raptorcast thread.
cpu usage in raptorcast threads peak at ~20% with 60MB of working set size.
with 500mbps and 1000mbps dataplane thread gets completely starved, raptorcast peaks at 60%.