On 8/24/12 12:10 AM, Jason Miller wrote:
> I replied on a different thread, but I was the one who implemented the
> ring buffer.  Whatever you do, don't use the "yield" solution as that
> will reintroduce the DoS vulnerability that the ring-buffer was added to
> fix.
>
> If you really don't like the ring-buffer than the fix would be to use a
> resizeable queue of some sort, and I guess I could do that, but then you
> are back to 1.7.x where streaming data quickly from a handler chews up
> m2 RAM like crazy.  The real fix is to add a way for m2 to throttle
> backends and the closest we have to that now is read/write stats from
> the control port, which is a bit primitive.
>
> -Jason
>
Thanks for the reply.  I will need to chew on these ideas a while before 
suggesting a fix.

For my use cases I will use 1.7.5 for the present as I have very few 
concurrent users.

For the future:
0) I submitted a hasty patch to the uWSGI mailing list; a similar fix or 
that one should be fine for "normal" http communication (i.e. expect 
handlers to send 1 or 2 messages per http response -- then the 
ring-buffer is OK)
1) Some mechanism to have Mongrel2 send files rather than streaming them 
via a handler (I can easily hack my own app/handler)
2) Streaming apps like video may require extra thought for better 
communication patterns between Mongrel2 and handlers

My 2 cents

--Jeff

Reply via email to