Skip to content

Commit c2b4f97

Browse files
committed
http2
1 parent 2c04a39 commit c2b4f97

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ anymap = "0.12"
158158
arrayvec = "0.7.2"
159159
async-stream = "0.3.6"
160160
async-trait = "0.1.68"
161-
axum = { version = "0.7", features = ["tracing"] }
161+
axum = { version = "0.7", features = ["tracing", "http2"] }
162162
axum-extra = { version = "0.9", features = ["typed-header"] }
163163
backtrace = "0.3.66"
164164
base64 = "0.21.2"

crates/core/src/replica_context.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ pub struct ReplicaContext {
6868

6969
impl ReplicaContext {
7070
/// Build a warmed `reqwest::Client` from `config`.
71+
///
72+
/// Uses HTTP/2 prior knowledge (h2c) for all connections.
73+
/// The server must be configured to accept h2c (HTTP/2 cleartext) connections.
7174
pub fn new_call_reducer_client(config: &CallReducerOnDbConfig) -> reqwest::Client {
7275
reqwest::Client::builder()
7376
.tcp_keepalive(config.tcp_keepalive)
7477
.pool_idle_timeout(config.pool_idle_timeout)
7578
.pool_max_idle_per_host(config.pool_max_idle_per_host)
7679
.timeout(config.request_timeout)
80+
.http2_prior_knowledge()
7781
.build()
7882
.expect("failed to build call_reducer_on_db HTTP client")
7983
}

0 commit comments

Comments
 (0)