users@grizzly.java.net

Re: GZIP'ing content ...

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 29 Aug 2008 13:40:24 -0400

Salut,

Alan Williamson wrote:
> Right got a wee problem with this now. Someone can help i am sure.
>
> We have nginx proxying requests to a series of backend loadbalanced
> machines all running Grizzly.
>
> Now nginx only proxes using HTTP/1.0; and it would appear Grizzly's GZIP
> isn't being invoked for HTTP/1.0 type of requests (true or false)?

Yes, compression has been only officially added for HTTP/1.1. protocol.
Netscape supported compression with HTTP 1.0 for some times (bogus), but
I do not think it work with Mozilla for now.


>
> Now it only proxies in 1.0 because nginx does not support chunked
> transfers.

I've looked at their documentation but couldn't find what I was looking
at....which is some configuration that explain why the proxy mode use
http 1.0 :-(


>
> So what options available to me?

Can you unzip the content using some sort of filter with nginx? I'm not
familiar enough, but if your can extend nginx with a filter than can
unzip the content, then you can probably still use gzip.

Do i zip it manually and then send it
> via Grizzly and turn off the Grizzly auto gzip'ing?


That's another solution, meaning always gzipping the content on the
grizzly side independently of the protocol version (1.0 or 1.1). You can
easily achieve that extending the DefaultProcessorTask.isCompressable()
method. The problem is that method is private. I can turn it protected
so you can for GZIP for all protocol, but you will need to make sure
that browser which communicate through nginx can unzip it, e.g if they
ping with 1.0, they most probably cannot receive GZIp content. So you
will need so filter on the nginx side to detect that case I suspect.

A+

- Jeanfrancois




>
> thx
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>