Welcome! Log In Create A New Profile

Advanced

Re: Sending Traffic to another Server/Port/IP asynchronously

March 19, 2012 06:08AM
That logging issue was a mistake. All the access_log directive need to be in a single location/server block.

After a lot of testing. I found an issue.

The processing time of post_action is added to the response time. hence delaying the response.

Here is how i have used post_action to log.

http {

server {

location / {
proxy_pass http://upstream123;
post_action @loglua;
}

location @loglua {
set $log '';
rewrite_by_lua_file /nginx/mylua.lua;
logformat format1 '$log';
access_log /var/log/nginx/newlog.log format1;
}
}
}
Subject Author Posted

Sending Traffic to another Server/Port/IP asynchronously

rishabh February 09, 2012 11:25PM

Re: Sending Traffic to another Server/Port/IP asynchronously

Alexandr Gomoliako February 09, 2012 11:52PM

Re: Sending Traffic to another Server/Port/IP asynchronously

rishabh February 10, 2012 01:20AM

Re: Sending Traffic to another Server/Port/IP asynchronously

rishabh March 19, 2012 06:08AM

Re: Sending Traffic to another Server/Port/IP asynchronously

rishabh March 19, 2012 06:08AM

Re: Sending Traffic to another Server/Port/IP asynchronously

Valentin V. Bartenev March 19, 2012 06:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready