Skip to content

Enable HTTP Response Compression by Default #21369

@candrews

Description

@candrews

I think the default value of server.compression.enabled should be changed from false to true in an upcoming version of Spring Boot (perhaps even 2.3.0? Yes, I'm optimistic).

I don't believe that there's any downside to server.compression.enabled=true. Years ago, the extra CPU consumption of compression may have been a concern, but I think the time for that worry has passed - the reduced network transfer is far more important for the almost all situations. The default values of server.compression.mime-types and server.compression.min-response-size ensure that compression won't compress things uselessly, too.

If there are reasons for compression to be off, I think the documentation should be updated to explain them to users. See https://docs.spring.io/spring-boot/docs/2.2.x/reference/htmlsingle/#how-to-enable-http-response-compression

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions