http://uwsgi-docs.readthedocs.org/en/latest/Spooler.html

The Spooler is a queue manager built into uWSGI that works like a
> printing/mail system.
>
> You can enqueue massive sending of emails, image processing, video
> encoding, etc. and let the spooler do the hard work in background while
> your users get their requests served by normal workers.
>


On Wed, Jan 15, 2014 at 11:11 AM, Craig Glennie <[email protected]> wrote:

> Hi there, we have an API that requires consistent high-performance, and as
> part of profiling we've identified that large writes to memcache cause
> problems. We would like to write to memcache after we have transmitted our
> response to the client. My understanding is that (per the WSGI spec) we
> ought to be able to yield our response and have that returned immediately
> to Nginx, then do our memcache write after data has been transmitted to the
> client.
>
> Something like:
> def handle_request():
>   response = make_response()
>   yield response # Response data goes out over the network
>   memcache.write(response)
>
> Is this correct? Are there are gotchas or caveats?
>
> Thanks,
> Craig
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>


-- 
xiaoguoqiao
18608007022
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to