[ANN] ngx_echo v0.35: ability to POST/PUT local files as subrequest bodies

Elena Zwetkow ezwetkow at gmx.de
Thu Mar 10 12:01:49 MSK 2011


Thanks so much for the detailed information. 

Storing uploaded data nonblocking sounds not so easy... What do you think about a solution sending data as base64 encoded sting, then i can use your form-input addon and send this data directly to redis?

Have a nice day.

Elena

-------- Original-Nachricht --------
> Datum: Thu, 10 Mar 2011 16:28:54 +0800
> Von: agentzh <agentzh at gmail.com>
> An: nginx at nginx.org
> Betreff: Re: [ANN] ngx_echo v0.35: ability to POST/PUT local files as	subrequest bodies

> On Thu, Mar 10, 2011 at 4:16 PM, Elena Zwetkow <ezwetkow at gmx.de> wrote:
> >
> > Hello,
> >
> > could this be a way to put POST multipart uploads to redis/memcache?
> 
> Yes :)
> 
> > I am right, if i use a fileread with lua in nginx the script is
> blocking?
> 
> Yup.
> 
> > Any ideas how i can store POST multipart uploads nonblocking?
> 
> Use echo_subrequest POST /foo -f /path/to/file for that (combined with
> ngx_upload, maybe).
> 
> > I know there is a great file upload module for nginx, but what happens
> if i use lua to work on an uploaded file like move / rename / copy uploaded
> files, this blocks nginx?
> 
> Yes. Most disk operations will block nginx (or some other processes like
> php).
> 
> > How can i check if something block nginx?
> >
> 
> Maybe configure only 1 nginx worker and try
> 
>     ab -c 100 -n 10000 http://...
> 
> and check the results? ;)
> 
> There will be a "body_file" option for ngx_lua's
> "ngx.location.capture" and "ngx.location.capture_multi" Lua functions,
> similar to echo_subrequest's -f option.
> 
> But nginx may also block even if itself does the disk operations.
> 
> A work-around is to start a few more nginx worker processes, just like
> how apache and php-fpm has been doing for years ;)
> 
> Cheers,
> -agentzh
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



More information about the nginx mailing list