Skip to content

Allow configuring the Rust HTTP client to use HTTP/2 only#19457

Merged
sandhose merged 1 commit intodevelopfrom
quenting/rust-http2
Feb 17, 2026
Merged

Allow configuring the Rust HTTP client to use HTTP/2 only#19457
sandhose merged 1 commit intodevelopfrom
quenting/rust-http2

Conversation

@sandhose
Copy link
Member

@sandhose sandhose commented Feb 12, 2026

This allows the Rust HTTP client to be configured to force HTTP/2 even on plaintext connections. This is useful in contexts where the remote server is known to server HTTP/2 over plain text.

Added because we use the Synapse Rust HTTP client with the Synapse Pro event-cache module. We use this because it's independent from the Python reactor which makes things slower than expected.

Currently, the Synapse Rust HTTP client uses HTTP/1 which means a new connection for every request. With HTTP/2, we can share the connection across requests.

We want to see if this will make a performance difference and less stress on the database connection situation, see https://github.com/element-hq/synapse-rust-apps/issues/452#issuecomment-3897717599

Here is the sibling PR for using HTTP/2 on the Synapse Pro event-cache module side: https://github.com/element-hq/synapse-pro-modules/pull/35

@sandhose sandhose force-pushed the quenting/rust-http2 branch 2 times, most recently from 81d7de1 to 2ac62de Compare February 12, 2026 14:11
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks sound, and I can see that we already enable the http2 feature flag.

@sandhose sandhose force-pushed the quenting/rust-http2 branch from 3234774 to 9e98606 Compare February 12, 2026 15:18
@sandhose sandhose marked this pull request as ready for review February 12, 2026 15:19
@sandhose sandhose requested a review from a team as a code owner February 12, 2026 15:19
@@ -0,0 +1 @@
Allow configuring the Rust HTTP client to use HTTP/2 only.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document the context for this in the PR description

Added because we use the Synapse Rust HTTP client with the Synapse Pro event-cache module. We use this because it's independent from the Python reactor which makes things slower than expected.

Currently, the Synapse Rust HTTP client uses HTTP/1 which means a new connection for every request. With HTTP/2, we can share the connection across requests.

We want to see if this will make a performance difference and less stress on the database connection situation, see https://github.com/element-hq/synapse-rust-apps/issues/452#issuecomment-3897717599

Here is the sibling PR for using HTTP/2 on the Synapse Pro event-cache module side: https://github.com/element-hq/synapse-pro-modules/pull/35

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, borrowed that for the PR comment

@sandhose sandhose merged commit 5be475f into develop Feb 17, 2026
45 of 46 checks passed
@sandhose sandhose deleted the quenting/rust-http2 branch February 17, 2026 12:57
alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Feb 24, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [element-hq/synapse](https://github.com/element-hq/synapse) | minor | `v1.147.1` → `v1.148.0` |

---

### Release Notes

<details>
<summary>element-hq/synapse (element-hq/synapse)</summary>

### [`v1.148.0`](https://github.com/element-hq/synapse/releases/tag/v1.148.0)

[Compare Source](element-hq/synapse@v1.147.1...v1.148.0)

### Synapse 1.148.0 (2026-02-24)

No significant changes since 1.148.0rc1.

### Synapse 1.148.0rc1 (2026-02-17)

#### Features

- Support sending and receiving [MSC4354 Sticky Event](matrix-org/matrix-spec-proposals#4354) metadata. ([#&#8203;19365](element-hq/synapse#19365))

#### Improved Documentation

- Fix reference to the `experimental_features` section of the configuration manual documentation. ([#&#8203;19435](element-hq/synapse#19435))

#### Deprecations and Removals

- Remove support for [MSC3244: Room version capabilities](matrix-org/matrix-spec-proposals#3244) as the MSC was rejected. ([#&#8203;19429](element-hq/synapse#19429))

#### Internal Changes

- Add in-repo Complement tests so we can test Synapse specific behavior at an end-to-end level. ([#&#8203;19406](element-hq/synapse#19406))
- Push Synapse docker images to Element OCI Registry. ([#&#8203;19420](element-hq/synapse#19420))
- Allow configuring the Rust HTTP client to use HTTP/2 only. ([#&#8203;19457](element-hq/synapse#19457))
- Correctly refuse to start if the Rust workspace config has changed and the Rust library has not been rebuilt. ([#&#8203;19470](element-hq/synapse#19470))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNS44IiwidXBkYXRlZEluVmVyIjoiNDMuMjUuOCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4203
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants