Re: Nginx $upstream_cache_status not available when used in rate limiting

2016-07-20 Thread Valentin V. Bartenev
On Wednesday 20 July 2016 14:52:10 linnading wrote: > Hi Francis, > > It is "to the same upstream server" that I care about. I would like to > limit the request rate to the same upstream server. > > The Scenarios is like: > 10 requests at the same time to the same upstream server, the upstream

Re: Nginx $upstream_cache_status not available when used in rate limiting

2016-07-20 Thread Francis Daly
On Wed, Jul 20, 2016 at 02:52:10PM -0400, linnading wrote: Hi there, > It is "to the same upstream server" that I care about. I would like to > limit the request rate to the same upstream server. That makes sense, thanks. I am not aware of a way to achieve this directly in stock nginx. I see

Re: how can i get nginx lib

2016-07-20 Thread Thiago Farina
On Mon, Jun 27, 2016 at 8:37 AM, Pankaj Chaudhary wrote: > > > Is there such thing? As far as I know it is distributed only as binary. -- Thiago Farina ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Nginx $upstream_cache_status not available when used in rate limiting

2016-07-20 Thread linnading
Hi Francis, It is "to the same upstream server" that I care about. I would like to limit the request rate to the same upstream server. The Scenarios is like: 10 requests at the same time to the same upstream server, the upstream server should only receive requests at rate 1r/m. Last few request

Re: Nginx $upstream_cache_status not available when used in rate limiting

2016-07-20 Thread Francis Daly
On Wed, Jul 20, 2016 at 02:03:44PM -0400, linnading wrote: Hi there, > I assume $upstream_cache_status variable is set after requests are sent and > responses are got. But is there a way to do do rate limiting ignoring cache? > Really appreciate any help on this. I'm afraid that, having read th

Re: Nginx $upstream_cache_status not available when used in rate limiting

2016-07-20 Thread linnading
I assume $upstream_cache_status variable is set after requests are sent and responses are got. But is there a way to do do rate limiting ignoring cache? Really appreciate any help on this. Thanks. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268345,268383#msg-268383 __

Re: ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
figure it out, would jump one position for 3 bytes separator Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268369,268379#msg-268379 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

error while building own nginx module

2016-07-20 Thread Pankaj Chaudhary
Hi i have written own nginx module and i have many header ,src and makefiles files . my nginx module folder structure look like below /product/src/nginx/ngx_http_auth_module.cpp /product/src/nginx/Makefile /product/src/nginx/config(nginx config file) /product/src/common/.cpp files /product/lib

Re: ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
also ngx_http_upstream_response_time_variable and ngx_http_upstream_response_length_variable, + 2 for separator if (state[i].peer) { *p++ = ','; *p++ = ' '; } else { *p++ = ' '; *p++ = ':'; *p++ = ' '; if (++i == r->

Re: while building own nginx module error to find user defined header file

2016-07-20 Thread Pankaj Chaudhary
I have makefile which provide other header file path and third party lib path. I have structure like this module_folder/ 1.module.cpp 2.config 3.Makefile and having sub parent folder which contain other dependency code. so please let me know what i should do On Tue, Jul 19, 2016 at 3:14 PM, Pank

ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
ngx_http_upstream_status_variable len = r->upstream_states->nelts * (3 + 2); write status to string, one status str len would be 3 in most case, like 200, 302, 404 but if upstream multi times, may be add ' : ' as separator so, string len may be nelts*3 + (nelts-1)*3 = 6nelts - 3 != nelts * (

error nginx: [emerg] dlopen() "/usr/local/nginx/modules/ds_http_module.so" failed (/usr/local/nginx/modules/ds_http_module.so: undefined symbol: ds_http_module

2016-07-20 Thread Pankaj Chaudhary
Hi All, I am getting error below error for own written module ds_http_module. nginx: [emerg] dlopen() "/usr/local/nginx/modules/ds_http_module.so" failed (/usr/local/nginx/modules/ds_http_module.so: undefined symbol: ds_http_module Please let me know what could be the reason of this error. Reg