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 brotli compression for some KP assets #64367

Merged
merged 3 commits into from May 4, 2020

Conversation

joshdover
Copy link
Member

@joshdover joshdover commented Apr 23, 2020

Summary

This adds new compressed outputs to @kbn/optimizer and @kbn/shared-ui-deps along with code in our bundle serving logic to select the best/correct compression based on the client's preferences specified in the Accept-Encoding header. Brotli compression decreases bytes sent across the network by ~30%.

Note that browsers will only include br in the Accept-Encoding header when connecting over HTTPS.

I have spoken to the Cloud Networking team and they do not anticipate any problems with their load balancers processing brotli-compressed responses. Unfortunately we won't be able to test this until this makes into a nightly snapshot which we can easily deploy to Cloud staging. There are integration tests ready to go in this PR for this test case.

Release Notes

Kibana instances served over HTTPS will now benefit from improved asset compression on most JS & CSS files. This decreases network transfer by about 30% in most scenarios.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@joshdover joshdover added release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.8.0 labels Apr 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover joshdover marked this pull request as ready for review April 30, 2020 21:36
@joshdover joshdover requested a review from a team as a code owner April 30, 2020 21:36
@joshdover joshdover added this to Pending Review in kibana-core [DEPRECATED] via automation Apr 30, 2020
@joshdover joshdover requested a review from a team April 30, 2020 21:36
Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just one minor request.

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM (code only)

src/optimize/bundles_route/dynamic_asset_response.ts Outdated Show resolved Hide resolved
renovate.json5 Show resolved Hide resolved
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@joshdover joshdover merged commit 306a5fe into elastic:master May 4, 2020
kibana-core [DEPRECATED] automation moved this from Pending Review to Done (7.8) May 4, 2020
@joshdover joshdover deleted the np/brotli branch May 4, 2020 16:53
joshdover added a commit to joshdover/kibana that referenced this pull request May 4, 2020
# Conflicts:
#	packages/kbn-ui-shared-deps/package.json
#	renovate.json5
#	src/dev/renovate/package_groups.ts
@mshustov mshustov mentioned this pull request May 11, 2020
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.8.0
Projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants