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

services/jsonrpc: compress middleware #1092

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

jchappelow
Copy link
Member

No description provided.

@jchappelow jchappelow marked this pull request as draft November 25, 2024 18:39
@jchappelow
Copy link
Member Author

Without compression:

$  curl -s -o /dev/null -w "Bytes Transferred: %{size_download} bytes\n" -H "content-type: application/json" -d '{"jsonrpc":"2.0","method":"user.schema","params":{"dbid":"xc4503ccf15daada96e36cbbacf641f48ebc6226e28906c8757866b91"},"id":1}' http://127.0.0.1:8484/rpc/v1 Bytes Transferred: 4812 bytes

With compression:

$  curl -s --compressed -o /dev/null -w "Bytes Transferred: %{size_download} bytes\n" -H "content-type: application/json" -d '{"jsonrpc":"2.0","method":"user.schema","params":{"dbid":"xc4503ccf15daada96e36cbbacf641f48ebc6226e28906c8757866b91"},"id":1}' http://127.0.0.1:8484/rpc/v1 Bytes Transferred: 1039 bytes

@jchappelow jchappelow marked this pull request as ready for review November 25, 2024 19:08
@jchappelow
Copy link
Member Author

Ok, I verified that the kwil-cli http.Client did in fact decompress the response in the http.Transport. I think this is working.

Copy link
Contributor

@Yaiba Yaiba left a comment

Choose a reason for hiding this comment

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

LGTM. backport to v0.9?

@jchappelow jchappelow merged commit d892d2e into kwilteam:main Nov 25, 2024
2 checks passed
@jchappelow jchappelow deleted the rpc-compress branch November 25, 2024 23:30
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.

2 participants