Skip to content

Add configuration option to enable/disable HTTP response compression #15832

Open
@ByteYue

Description

@ByteYue

Describe the feature

Introduce a configuration parameter (e.g., like --http.compression in erigon) to enable or disable HTTP response compression in the rpc server logic. This flexibility allows operators to tailor compression settings based on their infrastructure and performance requirements.​

Additional context

We're integrating Reth as the execution layer for our high-performance, EVM-compatible blockchain. During performance stress testing, we observed significant CPU usage attributed to the miniz_oxide::deflate functions as follows, which handle HTTP response compression. This overhead is particularly impactful when processing high volumes of sendTransaction requests.​

Image

To optimize resource utilization, especially for validator nodes, we think it might be one solution that offloading compression tasks to upstream load balancers (LBs). This approach conserves CPU resources on validator nodes by delegating compression to LBs positioned earlier in the network topology. To do so, the compression logic inside the rpc server logic should be able to passed.

Before proceeding, we seek confirmation on whether this enhancement aligns with the project's goals and if it would be a valuable addition to Reth. Looking forward to your comments ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementNew feature or requestS-needs-triageThis issue needs to be labelledS-staleThis issue/PR is stale and will close with no further activity

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions