I have a server REST API that answer some JSON response. I want to chunk it on the server to increase response time.
Is there a way for a reverse proxy like Apache or Nginx or any other, to intercept this response, and gzip the chunks, and send it back to the client as chunked?
I got something working by gzipping the content before chunking it directly inside my API server, and I'm just wondering if there's any other option available to me that would increase response time of my server.
I think that this is possible according to some other stack overflow questions that I have seen answered.
https://serverfault.com/questions/159313/enabling-nginx-chunked-transfer-encoding/187573#187573
According to the above, it is possible to disable proxy_buffering in your nginx configuration, and supports gzipping output if configured.
As noted in the page, there are possible disadvantages and you should test to ensure that this action is appropriate.