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)
6 freelancers are bidding on average $160 for this job
[login to view URL] an experienced developer, I am very interested in the job. Especially I have a talent in ngix and aparch. Now I am ready to work for you. Best regards.