fix: drop gzip support, improve performance. (#1854)
BREAKING CHANGE Not gzipping the output more than doubles the throughput for a simple "do nothing" RPC function. Postgrest's gzip support was surprisingly slow, lacked in configurability, was undocumented and untested. It was possible to achieve this before by not sending `Accept-Encoding: gzip`, but that turned into a bit of an undocumented gotcha. Most browsers do send it and by default a proxy pass would forward this header. Better to not support gzip at all, further focusing on ensuring Postgrest is a minimal layer over Postgres. Nginx, or whatever proxy, provides critical options such as min length, vary headers and so forth, and will likely have much better performance as well.
This commit is contained in:
@@ -116,7 +116,6 @@ pgrstFormat minStatus date req status responseSize =
|
||||
pgrstMiddleware :: LogLevel -> Wai.Application -> Wai.Application
|
||||
pgrstMiddleware logLevel =
|
||||
logger
|
||||
. Wai.gzip Wai.def
|
||||
. Wai.cors corsPolicy
|
||||
. Wai.staticPolicy (Wai.only [("favicon.ico", "static/favicon.ico")])
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user