Skip to content

Commit

Permalink
Remove GZIP middleware from Butler server
Browse files Browse the repository at this point in the history
Remove the GzipMiddleware for two reasons:
1. It was preventing "keep-alive" messages from working in streamed responses, because it was batching them until it had a full gzip chunk.
2.  It was slowing down queries by about 10% at the RSP -- it turns out that compressing/decompressing is expensive, and there is lots of bandwidth available within Google.
  • Loading branch information
dhirving committed Aug 29, 2024
1 parent 311fece commit 670ba4d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions python/lsst/daf/butler/remote_butler/server/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import safir.dependencies.logger
from fastapi import FastAPI, Request, Response
from fastapi.middleware.gzip import GZipMiddleware
from fastapi.staticfiles import StaticFiles
from safir.logging import configure_logging, configure_uvicorn_logging

Expand All @@ -54,7 +53,6 @@ def create_app() -> FastAPI:
config = load_config()

app = FastAPI()
app.add_middleware(GZipMiddleware, minimum_size=1000)

# A single instance of the server can serve data from multiple Butler
# repositories. This 'repository' path placeholder is consumed by
Expand Down

0 comments on commit 670ba4d

Please sign in to comment.