Capturing gzipped output, and reusing.
See original GitHub issueI’m hoping to capture Javalin’s gzipped response (after, or in parallel to the response being streamed the client), and pipe it to Redis so that it can be used to serve a cached response on the subsequent requests across all nodes we’re running Javalin.
The usage pattern would preferably look something like this:
Start
- Fetch from cache
If cache value not present (a):
- Execute regular handler
- Send response via standard
ctx.json()
- Stream or capture gzipped response, forward to redis (via
.after
handler?) - END
If cache value present (b):
- Pipe Redis’ cached gzip bytes straight to the client
- END
Where should I be looking in the framework to get the gzipped response (4a), and to stream a prebuilt gzipped response to the client from the server, via a byte stream (2b)?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Capturing gzipped output, and reusing. · Issue #913 · javalin ...
I'm hoping to capture Javalin's gzipped response (after, or in parallel to the response being streamed the client), and pipe it to Redis...
Read more >extract random-positioned data from gzip files, even like `tail -f`
gztool can extract random-positioned data from gzip files with no penalty, including gzip tailing like with `tail -f`. gztool creates an index file...
Read more >How to Enable GZIP Compression for Faster Web Pages
Learn how GZIP compression works to deliver web pages to browsers more quickly, and how to activate it on your web server.
Read more >HttpWebRequest and GZip Http Responses - Rick Strahl
You start by adding an Accept-Encoding header to the request that tells the server to encode responses with GZip. That what the server...
Read more >ob_gzhandler - Manual - PHP
Before ob_gzhandler() actually sends compressed data, it determines what type of content encoding the browser will accept ("gzip", "deflate" or none at all)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve not yet had a chance to get to this. Hoping to create a proof of concept sometime starting early next week.
I’m going to close this issue now, but please feel free to post an update when/if you have one.