Nginx+HTTPS event stream issues

Daniel Gomes blink0 at
Tue May 29 16:02:58 UTC 2012

Thanks mate, your module does seem pretty handy! I'm not sure it's what 
I need though,let me explain:

Basically, what I have now (without using the push stream module) is a 
PHP function that, *when called*, pretty much echos the contents of a 
certain DB table (chosen via POST paramters) every 0,5 seconds. On the 
client-side, there is javascript code that sets up an event source (with 
HTML5's EventSource class) to this PHP script URL and shows the 
information to the user, when the events arrive. Like I said in my 
initial message, this works fine for HTTP, but the SSL buffering means 
the events get bundled together and instead of waiting 0,5secs for an 
event, I only see events after like 10 seconds (and then only the last 
event's info is seen by the user).

 From what I can understand from your module, the publisher is something 
that is always running, ie. always posting new stuff to *all clients*. 
What I need, on the other hand, is an individual channel that is 
different for *each different client* and each *different DB-information 
to obtain* (ie. info from what table to post, the fields to return, 
etc). Ignoring how setting up individual channels would be 
time-consuming, what I think is the main problem here is that I would 
have to (client-side) somehow call a PHP function (via XHR, I guess) to 
initiate the proper channel with some parameters (DB table, etc) and 
then go subscribe to it (on a different address). Now, this doesn't look 
like a good set-up, does it? :/

In the mean time, I figured out how to disable SSL buffering (or change 
its size), so I might just go with that*... Would still like to hear 
your opinion, tho, since using a proper publisher-subscriber module 
seems like a better idea!

*: for anyone with the same problem, its all in 
src/event/ngx_event_openssl.h . The buffer size is in NGX_SSL_BUFSIZE 
and if you want to disable it completely, change NGX_SSL_BUFFER to 0.


On 26.05.2012 19:32, Wandenberg Peixoto wrote:
> Hi Daniel,
> I don't know if this will help you, but you can give a try on this module
> Regards,
> Wandenberg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list