feature: add CoDel for backpressure queue drops
emaxerrno opened this issue · comments
https://queue.acm.org/detail.cfm?id=2209336
we have an implicit fifo queue w/ the future impl.
We need to timestamp the requests at time of accept() w/ the low precision timer (10ms steps) and then drop fast before processing requests.
we have memory backpressure already & timeout already - we need to expose them via the IDL definition.
we will block the processing up to memory limits & also start a timeout on connection parsing.
we need 1 more limits.
- accept queue length - implicit at the moment by not processing futures. currently we do
seastar::keep_doing([this] {
return listener_->accept().then(
[this, stats = stats_, limits = limits_](
seastar::connected_socket fd, seastar::socket_address addr) mutable {
auto conn = seastar::make_lw_shared<rpc_server_connection>(
std::move(fd), limits, addr, stats, ++connection_idx_);
open_connections_.insert({connection_idx_, conn});
// DO NOT return the future. Need to execute in parallel
handle_client_connection(conn);
});
})
- we need to drop at
handle_client_connection(conn)
given a timestamp of the connection such that it looks up the metadata defined on the idl. i.e.:
rpc_service foo {
foo (InputType): OutputType (codel_2000ms);
}
and we would parse the backpressure strategy as codel & the timeout for foo
would be 2 secs after header.