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

Use compression for transfer of JSON #100

Open
ties opened this issue May 2, 2023 · 2 comments
Open

Use compression for transfer of JSON #100

ties opened this issue May 2, 2023 · 2 comments

Comments

@ties
Copy link
Collaborator

ties commented May 2, 2023

The file with validated objects is growing and starting. Depending on the output style, I see 43MB (current rpki-client output), 57MB (jq or new rpki-client builds, one attribute per line, no colour, indented), while compact JSON is ~37M (jq -c).

It compresses pretty well.

Because the client trusts the server (w.r.t. content) I do not think gzip bombs are an issue. So, as a user, I want the HTTP client should use HTTP compression when loading the prefixes.

@benjojo
Copy link
Collaborator

benjojo commented May 2, 2023 via email

@ties
Copy link
Collaborator Author

ties commented May 3, 2023

Nice feature. Did not have time to check this at the time. I've validated that the content is compressed (request to default console.rpki-client.org URL on Fastly):
Screenshot 2023-05-03 at 07 55 02

Adding a metric for the underlying length is a bit hard because chunked responses have fhttp.ContentLength == -1 and the decompression is transparent. I will skip that one.

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

No branches or pull requests

2 participants