Re: NGINX Dynamic Modules

2016-02-09 Thread Jeff Kaufman
ies and the 2.4 series (so 4 binaries). This works because we're calling into an ABI that Apache is committed to keep the same, but there might be some other way that would work better for nginx. Jeff Kaufman PageSpeed TL [1] With there being 33 bits in the signature, we're not g

Re: Breaking content generation phase into multiple phases or adding custom events in content phase

2015-06-23 Thread Jeff Kaufman
On Mon, Jun 22, 2015 at 2:17 AM, Kaustubh Deorukhkar wrote: > @Jeff regarding using pipes to trigger event, does it create one pipe per > request or just one pipe. ngx_pagespeed originally used a pipe per request, which was simpler, but then switched to one pipe for everything for efficiency. He

Re: Breaking content generation phase into multiple phases or adding custom events in content phase

2015-06-19 Thread Jeff Kaufman
I think it should be able to support nearly as many clients as standard nginx. It would still use a background thread for image optimization, though. On Thu, Jun 18, 2015 at 11:06 PM, Yichun Zhang (agentzh) wrote: > Hello! > > On Thu, Jun 18, 2015 at 7:06 PM, Jeff Kaufman wrote: >>

Re: Breaking content generation phase into multiple phases or adding custom events in content phase

2015-06-18 Thread Jeff Kaufman
ngx_pagespeed does this by giving nginx a pipe to watch, setting up a handler for that pipe, calling an async api that uses threads, then the from the callback writing a byte to the pipe. Now when the async code finishes we're back on the nginx event loop in the pipe's handler. On Wed, Jun 17, 20

Debugging net::ERR_SPDY_PROTOCOL_ERROR

2015-05-12 Thread Jeff Kaufman
I'm trying to debug a SPDY 3.1 protocol error that you get when combining nginx, Chrome, and ngx_pagespeed. Chrome sends a SPDY request for /pagespeed_static/1.JiBnMqyl6S.gif as: :host = www.kluisstore.nl :method = GET :path = /pagespeed_static/1.JiBnMqyl6S.gif :scheme = https :version = HTTP/1.1

Re: Nginx Based Socket application

2015-02-09 Thread Jeff Kaufman
Looking at the code of ngx_http_spdy_module might be helpful. On Sun, Feb 8, 2015 at 2:59 PM, Tigran Bayburtsyan wrote: > Hi. > I'm trying to find out, how to write module for Nginx which would be able to > access directly to connection socket and transfer non HTTP data. > I know that Nginx is wr

Re: Event loop plus another event loop

2015-01-22 Thread Jeff Kaufman
On Wed, Jan 21, 2015 at 5:00 PM, Yichun Zhang (agentzh) wrote: > You can register the fd of the socket created by your 3rd-party > libraries into nginx's event model and use nginx's event loop to > dispatch read/write events on it on the library's behalf. > Alternatively, and this is kind of a ha

Re: processing request body in files

2014-08-11 Thread Jeff Kaufman
Thanks! On Fri, Aug 8, 2014 at 12:42 PM, Maxim Dounin wrote: > Hello! > > On Fri, Aug 08, 2014 at 10:44:59AM -0400, Jeff Kaufman wrote: > >> In ngx_pagespeed we want to handle POSTs, processing them in our nginx >> module and performing an action. This works fine fo

processing request body in files

2014-08-08 Thread Jeff Kaufman
In ngx_pagespeed we want to handle POSTs, processing them in our nginx module and performing an action. This works fine for small POSTs, but if they're too big then r->request_body->temp_file is set and the data isn't available in memory. Right now we just log an error, but I'd like to fix this.

Re: Add Support for Variant ETags

2013-12-13 Thread Jeff Kaufman
On Fri, Dec 13, 2013 at 11:17 AM, Maxim Dounin wrote: > > at least if flushes are done. > Right, thanks! > As already suggested, I believe the correct solution is to > downgrade entity tags to weak ones. > Makes sense. Agreed. ___ nginx-devel mailin

Re: Add Support for Variant ETags

2013-12-13 Thread Jeff Kaufman
On Fri, Dec 13, 2013 at 6:12 AM, Maxim Dounin wrote: > gzipping may result in many different byte representations of > a resource. Strict entity tags aren't allowed as a result. > Is gzip deterministic, where you only get different byte representations with different gzip settings? If so we cou

multiple vary headers and gzip

2013-12-12 Thread Jeff Kaufman
eparate from, but it's the best we have at the moment. Is there something that would be better for us to do here? (We also considered trying to add a filter after ngx_http_header_filter_module that coalesces duplicate headers with the same name, but it doesn&

Re: Passing response from upstream server to another upstream server

2013-11-13 Thread Jeff Kaufman
I think Arnaud is suggesting that instead of a request flow like: 1. nginx[A] receives request, forwards to upstream[B] 2. upstream[B] creates response and replies to nginx[A] 3. nginx[A] forwards response to upstream[C] 4. upstream[C] modifies response and replies to nginx[A] 5. nginx[A] returns

Removing response headers

2013-07-02 Thread Jeff Kaufman
://github.com/agentzh/headers-more-nginx-module/blob/master/src/ngx_http_headers_more_util.c#L294) so I'd rather use the first, but is there a reason to prefer the second? Jeff Kaufman ngx_pagespeed ___ nginx-devel mailing list nginx-de

Re: How to avoid blocking Nginx with long request

2013-04-10 Thread Jeff Kaufman
Why is your module taking a long time? Is it doing heavy computation or is it blocked on IO? If it's blocking IO, can you rewrite it to use asynchronous IO and never block? Another option would be to put your code in a separate process and reverse proxy to it. Or you could be crazy and do what

no content length on 204s; hangs wget

2013-04-08 Thread Jeff Kaufman
I've written a content handler for nginx that does: return NGX_HTTP_NO_CONTENT; This produces output like: $ curl -D- 'http://localhost:8050/no_content_test' HTTP/1.1 204 No Content Server: nginx/1.2.7 Connection: keep-alive Date: Mon, 08 Apr 2013 18:28:02 GMT Testing th