Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically gzip responses #29

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Automatically gzip responses #29

merged 2 commits into from
Feb 27, 2024

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Feb 27, 2024

It seems convenient to do this in CTile rather than Nginx because (currently) it's easier for us to scale the number of CTile instances than the number of Nginx instances.

Using NYTimes/gziphandler simplifies a little bit the handling of different cases (like whether or not the requester accepts gzip encoding).

I incorporated the gzip handler into tileCachingHandler rather than setting it up in main, in order to make it easier to test inside the current integration test.

It seems convenient to do this in CTile rather than Nginx because
(currently) it's easier for us to scale the number of CTile instances
than the number of Nginx instances.
@jsha jsha requested review from mcpherrinm, a team and aarongable and removed request for a team February 27, 2024 20:45
@mcpherrinm
Copy link
Contributor

go mod tidy please - the gziphandler isn't //indirect

@jsha jsha merged commit e421bee into main Feb 27, 2024
2 checks passed
@jsha jsha deleted the gzip-responses branch February 27, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants