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

Better-behaved HBONE pooling #931

Merged
merged 46 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c7ec54e
Attempt at smarter HBONE pooling between ztunnels
bleggett Apr 9, 2024
af0d232
Lints
bleggett Apr 16, 2024
58e7ab9
lints 2
bleggett Apr 16, 2024
5f8e182
Hmm
bleggett Apr 16, 2024
a585659
Fixup
bleggett Apr 16, 2024
05e3401
Fixup
bleggett Apr 16, 2024
2a2fa32
More comments
bleggett Apr 16, 2024
add0dce
cleanup
bleggett Apr 16, 2024
b290040
fixup
bleggett Apr 16, 2024
17de2be
Clean
bleggett Apr 16, 2024
6ebfc30
Fix jemalloc
bleggett Apr 16, 2024
ed2a284
WIP: move out of proxyinfo
bleggett Apr 16, 2024
5abf00f
Evict pooled conns after $INTERVAL
bleggett Apr 17, 2024
86d458c
Update src/proxy/pool.rs
bleggett Apr 17, 2024
417ee87
Evict pooled conns after $INTERVAL
bleggett Apr 17, 2024
996ac4b
For now, just do the foolproof collision check
bleggett Apr 17, 2024
c413650
Don't be silly
bleggett Apr 17, 2024
cf6b7c1
Naming, review comments
bleggett Apr 17, 2024
036a2e6
Tidy Arcs+drains
bleggett Apr 18, 2024
b04e5e9
Cleanups
bleggett Apr 18, 2024
53e790a
Format
bleggett Apr 18, 2024
6be0b55
Use the fancy lockless outer map, drop realm-io
bleggett Apr 18, 2024
b461cf3
Cleanup comments
bleggett Apr 18, 2024
d4b4d30
Fix outdent (review comment)
bleggett Apr 18, 2024
fe5ea2c
Fixups/review comments
bleggett Apr 19, 2024
6ff22cc
resync
bleggett Apr 22, 2024
2025a0f
Droptests
bleggett Apr 22, 2024
4a0dc47
fix testhang
bleggett Apr 22, 2024
852100c
add smarter evict test
bleggett Apr 22, 2024
45f23ac
Interesting failure
bleggett Apr 22, 2024
9ec19b2
No, it's not
bleggett Apr 22, 2024
c2f9015
Make this a bit simpler
bleggett Apr 22, 2024
bde5b45
Separate out the connspawner
bleggett Apr 22, 2024
22840ae
Tidy logging a bit
bleggett Apr 22, 2024
f1b102a
Add serverside keepalive
bleggett Apr 23, 2024
795b4ae
fixup
bleggett Apr 23, 2024
e16368a
Just for kicks
bleggett Apr 24, 2024
969b99a
D'oh - use mthread runtime for tests
bleggett Apr 25, 2024
bdb1c86
Fix none race
bleggett Apr 25, 2024
bd2ca75
Propagate connection establish errors
bleggett Apr 25, 2024
fb872fd
Cleanup
bleggett Apr 25, 2024
3105377
Work around local test server getting overloaded
bleggett Apr 26, 2024
e713b17
Move the rest to multi_thread, chill out on iterations, work around test
bleggett Apr 26, 2024
4495fc2
Tidy comments
bleggett Apr 26, 2024
7e794b6
lints
bleggett Apr 26, 2024
8737cd7
Clarify comment
bleggett Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ url = "2.2"
x509-parser = { version = "0.16", default-features = false }
tracing-log = "0.2"
backoff = "0.4.0"
pin-project-lite = "0.2"
pingora-pool = "0.1.0"
flurry = "0.5.0"

[target.'cfg(target_os = "linux")'.dependencies]
netns-rs = "0.1"
Expand Down
102 changes: 102 additions & 0 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,11 @@ fn change_log_level(reset: bool, level: &str) -> Response<Full<Bytes>> {
async fn handle_jemalloc_pprof_heapgen(
_req: Request<Incoming>,
) -> anyhow::Result<Response<Full<Bytes>>> {
let mut prof_ctl = jemalloc_pprof::PROF_CTL.as_ref()?.lock().await;
let mut prof_ctl = jemalloc_pprof::PROF_CTL
.as_ref()
.expect("should init")
.lock()
.await;
if !prof_ctl.activated() {
return Ok(Response::builder()
.status(hyper::StatusCode::INTERNAL_SERVER_ERROR)
Expand All @@ -405,7 +409,7 @@ async fn handle_jemalloc_pprof_heapgen(
let pprof = prof_ctl.dump_pprof()?;
Ok(Response::builder()
.status(hyper::StatusCode::OK)
.body(Bytes::from(pprof?).into())
.body(Bytes::from(pprof).into())
.expect("builder with known status code should not fail"))
}

Expand Down
Loading