You need a reverse proxy server application for the cache, then you can report a reverse proxy for compression.
In nginx, it looks like this:
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; server_name localhost; gzip on; gzip_min_length 1000;
So, here nginx will catch incoming requests on port 80, and then redirect them to the kestrel on the same computer, but to port 5004. Kestrel sends the response back to nginx. Since gzip is enabled, nginx compresses the response and sends it to the user. All you need to do is make sure that the application in Kestrel does not return HTTP headers such as HTTP 1.1 chuncked-encoding when outputting, for example, a file (for example, using what is used for Response.TransmitFile).
IIS 7.5+ supports reverse proxy.
See here for more details:
https://serverfault.com/questions/47537/can-iis-be-configure-to-forward-request-to-another-web-server
Stefan Steiger Feb 27 '15 at 6:42 2015-02-27 06:42
source share