You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Brotli compression is slower than other encoding algorithms
Edgee adds a header to the response which indicates the compute duration (x-edgee-compute-duration)
When an upstream server responds a gzip compressed response, the compute duration on my local env is okay (~10ms)
When an upstream server responds a brotli compressed response, the compute duration on my local env is too slow (~120ms)
Here are some figures for x-edgee-compute-duration on my machine with different setups:
no compression: ~3ms
brotli (quality 5): ~9 ms
brotli (quality 11): ~101 ms <-- that's the current hard-coded value
gzip: ~9 ms
So already by lowering the quality to 5 we have a performance closer to that of gzip, of course a couple of runs without proper benchmarking isn't conclusive, but it already suggests that there is room for improvement by changing some of the default parameters (with #97 in place it would probably be easier to have better figures).
Additionally, not all MIME types equally benefit from compression, so we have an additional parameter for the MIME types for which one wants brotli encoding to be activated.
In summary, a reasonable starting point is to lower the compression quality parameter, and possibly add all or some of these configuration knobs to the Edgee configuration to make it tunable.
Is your feature request related to a problem? Please describe.
Brotli compression is slower than other encoding algorithms
Edgee adds a header to the response which indicates the compute duration (
x-edgee-compute-duration
)When an upstream server responds a gzip compressed response, the compute duration on my local env is okay (~10ms)
When an upstream server responds a brotli compressed response, the compute duration on my local env is too slow (~120ms)
The slowdown seems to originate from this part:
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: