Fix checkin endpoint gzip handling#6491
Merged
michel-laterman merged 6 commits intoelastic:mainfrom Mar 6, 2026
Merged
Conversation
85a4289 to
b7ea7e5
Compare
b7ea7e5 to
de0e252
Compare
cmacknz
reviewed
Mar 4, 2026
cmacknz
reviewed
Mar 4, 2026
Contributor
Author
|
Some findings for validation of this:
Gathering data from the first couple of checkin an agent with the default policy (monitoring + systems integration) makes with a custom fleet-server build we can see the compressed resp savings, and estimate the request size savings to be:
Note that these numbers are for agents running today, without |
ycombinator
approved these changes
Mar 6, 2026
Contributor
|
@Mergifyio backport 8.19 9.2 9.3 |
Contributor
✅ Backports have been createdDetails
Cherry-pick of 122fac1 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
|
mergify bot
pushed a commit
that referenced
this pull request
Mar 6, 2026
Detect Content-Encoding: gzip header when validating checkin bodies and uncompress the body if detected. (cherry picked from commit 122fac1) # Conflicts: # internal/pkg/api/handleCheckin_test.go
2 tasks
mergify bot
pushed a commit
that referenced
this pull request
Mar 6, 2026
Detect Content-Encoding: gzip header when validating checkin bodies and uncompress the body if detected. (cherry picked from commit 122fac1)
2 tasks
mergify bot
pushed a commit
that referenced
this pull request
Mar 6, 2026
Detect Content-Encoding: gzip header when validating checkin bodies and uncompress the body if detected. (cherry picked from commit 122fac1)
2 tasks
ebeahan
pushed a commit
that referenced
this pull request
Mar 6, 2026
ebeahan
pushed a commit
that referenced
this pull request
Mar 6, 2026
* Fix checkin endpoint gzip handling (#6491) Detect Content-Encoding: gzip header when validating checkin bodies and uncompress the body if detected. (cherry picked from commit 122fac1) * Fix backport test --------- Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com> Co-authored-by: michel-laterman <michel.laterman@elastic.co>
michel-laterman
added a commit
that referenced
this pull request
Mar 6, 2026
* Fix checkin endpoint gzip handling (#6491) Detect Content-Encoding: gzip header when validating checkin bodies and uncompress the body if detected. (cherry picked from commit 122fac1) # Conflicts: # internal/pkg/api/handleCheckin_test.go * Fix backport * Fix backport test * Fix panic --------- Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com> Co-authored-by: michel-laterman <michel.laterman@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the problem this PR solves?
Checkin requests did not support "Content-Encoding: gzip" correctly.
How does this PR solve the problem?
Detect
Content-Encoding: gzipheader when validating checkin bodies and uncompress the body if detected.Design Checklist
I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature works./changelog/fragmentsusing the changelog tool