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

Improve request throughput #895

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

Half-Shot
Copy link
Contributor

Larger deployments seem to struggle with many requests against the same host (i.e. the homeserver), so this change replaces the existing request function with a fetch-powered function. This also enables support for HTTP/2 / pipelining so in theory we should go a bit faster than at present.

@Half-Shot Half-Shot requested a review from a team as a code owner February 13, 2024 12:46
@Half-Shot
Copy link
Contributor Author

Half-Shot commented Feb 21, 2024

Testing this showed that the H2 client for fetch / undici was incomplete / buggy and we probably need to hold off for now. nodejs/undici#2704 was biting us.

@Half-Shot
Copy link
Contributor Author

Tested again on staging and it seems to work, but holding off until undici release the fix for #2704

Copy link
Contributor

@tadzik tadzik left a comment

Choose a reason for hiding this comment

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

Looks good to me – but since it relies very heavily on the internals on bot-sdk, I'd consider locking matrix-bot-sdk to the exact version this was developed/tested against, so that a patch release that assumes to do refactoring with no outside changes does not break it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants