limit connection based on Host header

2017-02-03 Thread Frank Liu
Hi, I have a default "server" block with "server_name _ ;". Since connections coming in may have different Host header, I am trying to limit the connection based on Host header. limit_conn_zone $server_name zone=perserver:10m; limit_conn perserver 10; Will this work? It seems if the connection

Re: Where does $remote_addr come from?

2017-02-03 Thread Paul Nickerson
> Reading that file, the next likely looking line is: > c->addr_text.len = ngx_sock_ntop(c->sockaddr, c->socklen, > c->addr_text.data, > ls->addr_text_max_len, 0); Thank you for the boost. From wh

Re: Where does $remote_addr come from?

2017-02-03 Thread Francis Daly
On Fri, Feb 03, 2017 at 03:36:53PM -0500, Paul Nickerson wrote: Hi there, > > Exactly, it is what the source code says: > > v->data = r->connection->addr_text.data; > > and then you can track where that addr_text.data value is set. > > I thought it might be coming from addr_text in the code,

Where does $remote_addr come from?

2017-02-03 Thread Paul Nickerson
I accidentally turned on digest mode for myself on this mailing list (now turned off), so this might not be threaded. Sorry. Francis Dalyfrancis at daoine.org > Exactly, it is what the source code says: > v->data = r->connection->addr_text.data; > and then you can track where that addr

Re: Nginx only sends hostname to syslog.

2017-02-03 Thread Maxim Dounin
Hello! On Fri, Feb 03, 2017 at 01:17:30PM +0100, Kai Stian Olstad wrote: > To get the post data from Kibana I use Nginx as a proxy and have the > following log format, > >log_format audit '$time_iso8601 "$remote_user" "$request_uri" > "$request_body"'; > > > and to send the log to syslog

Nginx only sends hostname to syslog.

2017-02-03 Thread Kai Stian Olstad
Hi To get the post data from Kibana I use Nginx as a proxy and have the following log format, log_format audit '$time_iso8601 "$remote_user" "$request_uri" "$request_body"'; and to send the log to syslog I use the following. access_log syslog:server=192.168.1.1,tag=audit audit; But

Re: SO_BUSY_POLL for latency critical cases

2017-02-03 Thread Maxim Dounin
Hello! On Fri, Feb 03, 2017 at 12:47:45PM +0200, Donatas Abraitis wrote: > Sorry, what is `with.min` and `without.min` in this case? These are series of data from the pull request in question: with.min - min latency with busy polling without.min - min latency without busy polling with.max - ma

Re: SO_BUSY_POLL for latency critical cases

2017-02-03 Thread Francis Daly
On Fri, Feb 03, 2017 at 12:47:45PM +0200, Donatas Abraitis wrote: Hi there, > Sorry, what is `with.min` and `without.min` in this case? Without trying to speak for Maxim: The github link provided says "Benchmarks example. Port 6379 is without busy polling, 6380 with:" and provides some lists of

Re: SO_BUSY_POLL for latency critical cases

2017-02-03 Thread Donatas Abraitis
Sorry, what is `with.min` and `without.min` in this case? On Thu, Feb 2, 2017 at 2:47 PM, Maxim Dounin wrote: > Hello! > > On Thu, Feb 02, 2017 at 09:40:56AM +0200, Donatas Abraitis wrote: > > > I do not cover any tests, just putting this patchset and wanna ask if > > someone had tried this? I t

Re: Where does $remote_addr come from?

2017-02-03 Thread Francis Daly
On Thu, Feb 02, 2017 at 05:02:43PM -0500, Paul Nickerson wrote: Hi there, > Currently, my best guess is that it's the source address > field in the incoming TCP/IP packet's IPv4 internet header. Is this > correct? Or, does it come from somewhere else? grep -lr remote_addr . in the source tree s