Skip to content

Commit 44f24af

Browse files
authored
feat(s2n-quic-dc): Reuse handshakes across application processes (#2854)
1 parent ef5c6bc commit 44f24af

File tree

24 files changed

+3114
-1351
lines changed

24 files changed

+3114
-1351
lines changed

dc/s2n-quic-dc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ zerocopy = { version = "0.8", features = ["derive"] }
6161
zeroize = "1"
6262
parking_lot = "0.12"
6363
bitvec = { version = "1.0.1", default-features = false }
64-
nix = {version = "0.30.1", features = ["socket", "uio", "fs"] }
64+
nix = {version = "0.30.1", features = ["socket", "uio", "fs", "time"] }
6565

6666
[dev-dependencies]
6767
bach = { version = "0.1.0", features = ["net", "tokio-compat"] }

dc/s2n-quic-dc/events/acceptor.rs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,55 @@ struct AcceptorTcpIoError<'a> {
192192
error: &'a std::io::Error,
193193
}
194194

195+
/// Emitted when the TCP stream has been sent over a Unix domain socket
196+
#[event("acceptor:tcp:socket_sent")]
197+
#[subject(endpoint)]
198+
struct AcceptorTcpSocketSent<'a> {
199+
/// The credential ID of the stream
200+
#[snapshot("[HIDDEN]")]
201+
credential_id: &'a [u8],
202+
203+
/// The ID of the stream
204+
stream_id: u64,
205+
206+
/// The amount of time the TCP stream spent in the queue before being sent over Unix domain socket
207+
#[timer("sojourn_time")]
208+
sojourn_time: core::time::Duration,
209+
210+
/// The number of times the Unix domain socket was blocked on send
211+
#[counter("blocked_count_host")]
212+
#[measure("blocked_count_stream")]
213+
blocked_count: usize,
214+
215+
/// The len of the payload sent over the Unix domain socket
216+
#[measure("len", Bytes)]
217+
payload_len: usize,
218+
}
219+
220+
/// Emitted when a TCP stream has been received from a Unix domain socket
221+
#[event("acceptor:tcp:socket_received")]
222+
#[subject(endpoint)]
223+
struct AcceptorTcpSocketReceived<'a> {
224+
/// The address of the stream's peer
225+
#[builder(&'a s2n_quic_core::inet::SocketAddress)]
226+
remote_address: SocketAddress<'a>,
227+
228+
/// The credential ID of the stream
229+
#[snapshot("[HIDDEN]")]
230+
credential_id: &'a [u8],
231+
232+
/// The ID of the stream
233+
stream_id: u64,
234+
235+
/// The amount of time taken from socket send to socket receive, including waiting if the kernel queue is full
236+
#[timer("transfer_time")]
237+
transfer_time: core::time::Duration,
238+
239+
/// The len of the payload sent over the Unix domain socket
240+
#[measure("len", Bytes)]
241+
payload_len: usize,
242+
}
243+
195244
/// Emitted when a UDP acceptor is started
196245
#[event("acceptor:udp:started")]
197246
#[subject(endpoint)]

0 commit comments

Comments
 (0)