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

Add gzip for heavy backend endpoints #124

Open
namsnath opened this issue Feb 14, 2021 · 0 comments
Open

Add gzip for heavy backend endpoints #124

namsnath opened this issue Feb 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@namsnath
Copy link
Collaborator

  • Endpoints like allCourseLists and fullHeatmap return data along with a success message.
  • The data is memory cached, but the whole response isn't.
  • GZip can be enabled on the full response, which would lead to much lighter responses.
  • This would be more efficient than enabling gzip on nginx for the response, since it would probably have to process the whole thing on every response.

Will require restructuring of the routes

  • Move the logic to a function in the courseUtility file
  • Add zlib for gzipping
  • Keep a gzipped version of the success response
  • Send the gzipped response if available
  • Add a regardless parameter like in the existing queries to force an update
  • Run a forced update everytime the courses are updated
@namsnath namsnath added the enhancement New feature or request label Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant