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

Compress the response via GZIP #82

Open
nik6018 opened this issue Aug 22, 2021 · 1 comment
Open

Compress the response via GZIP #82

nik6018 opened this issue Aug 22, 2021 · 1 comment

Comments

@nik6018
Copy link

nik6018 commented Aug 22, 2021

Hey,

Can you turn on GZIP compression for the server ? will reduce the payload size and might help in latency as well.

I can help out if you want :)

@jai-dewani
Copy link

jai-dewani commented Sep 26, 2021

The response size of the API is for one meme is around 600-800 bytes.
I am not sure if turning on GZIP on this small of a response will have any real-life effect as the Maximum transmission unit (MTU) is around 1500 bytes, so even if you compress your 800 bytes to 500 bytes using GZIP, the transmission will take one complete MTU so you will technically be wasting CPU resources on nothing.

It might have some actual effect when you are requesting 100-1000 memes at once but I am not sure what percentage of calls made to this API would fall in this category

Refer to this article for more information -> https://www.computerworld.com/article/2693941/why-it-doesn-t-make-sense-to-gzip-all-content-from-your-web-server.html

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

No branches or pull requests

2 participants