Skip to content
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

Handshake resource exhaustion limit #143

Closed
rday opened this issue Oct 13, 2020 · 1 comment · Fixed by #163
Closed

Handshake resource exhaustion limit #143

rday opened this issue Oct 13, 2020 · 1 comment · Fixed by #163
Labels
address_validation limits Anything pertaining to limits (connection, endpoint, etc) MVP provider

Comments

@rday
Copy link
Contributor

rday commented Oct 13, 2020

Problem:
There is a limit provider which customers can use to set limits in the system. We should have a way to set a limit that indicates handshakes should be deferred. This would be used as an indicator that QUIC should send Retry Tokens to clients.

Possible Solutions:
Update the limit provider to allow customers to set a max_concurrent_handshake limit.

@rday rday added address_validation limits Anything pertaining to limits (connection, endpoint, etc) provider MVP labels Oct 13, 2020
@rday rday mentioned this issue Oct 14, 2020
3 tasks
@rday rday self-assigned this Oct 14, 2020
@rday
Copy link
Contributor Author

rday commented Oct 14, 2020

The Limits provider is not the right place for this specific functionality. The current "Limits" will refer to limits on a Connection (max streams, flow control, etc). This issue introduces a way to manage resources at the Endpoint level.

When accepting new connections, an Endpoint can make a decision about how to proceed. This decision is returned as an enum to the library. This enum will tell the library what to do with the connection.

#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Outcome {
    Allow,
    Retry { delay: Duration },
    Drop,
    Close { delay: Duration },
}

#[non_exhaustive]
pub struct ConnectionInfo<'a> {
    current_handshakes: usize,
    source_address: &'a SocketAddress,
}

pub trait Format {
    fn on_connection_attempt(&mut self, info: &ConnectionInfo) -> Outcome;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
address_validation limits Anything pertaining to limits (connection, endpoint, etc) MVP provider
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant