Allow nginx proxy w/cache to compress and store the compressed files and deliver them pre-compressed directly to all future clients instead of storing the uncompressed files and compressing on output to every client.
Suggested implmentation: Hook into the proxy's data-from-upstream-server pipeline and compresses the input body using the existing nginx gzip module and adds the correct header. Practically just moving the entrypoint for gzip compression from output to input.
- Module should use the existing gzip module's settings such as what mime types to compress, compression level, etc. If implemented as suggested, this can probably be offloaded to the gzip module entirely without this module knowing anything about those settings.
- Output from upstream server is ~99% uncompressed, so module also needs to check for pre-compressed input.
- Compression policy choice:
Either 1. Always compress (Easiest)
or optimally 2. check whether file will be cached and/or client supports gzip before compressing (More development work)
(2 prevents us from compressing and then decompressing a file that will not be cached and is delivered to a client not supporting gzip. Not critical but nice-to-have.)
- Clients not accepting gzip can get uncompressed files by activating the existing nginx gunzip module (decompresses cached files on-the-fly)
5 freelancers are bidding on average $627 for this job
Good Day! Here I’m a developer with experience of 3+ years. Using C sharp I’ve made many powerful software and applications. Your project will be a chance to explore myself more. Contact me if you are interested!