Forum: NGINX Any caveat in using post_action?

Posted by howard chen (Guest)
on 2012-11-06 14:43
(Received via mailing list)
Hi,

I am going to use post_action for mirroring the load for performance
testing to new backend.

But according to the doc:

>> Note: this directive "has subtleties" according to Maxim Dounin, so use
at your own risk.

Some questions:

1. Is the  post_action blocking to the user request? Or the sub request 
is
truly async and not affecting to the user?
2. And caveat is using high load env, e.g. stability?


So anyone mind share your experience?

Thanks.
Posted by Maxim Dounin (Guest)
on 2012-11-06 15:43
(Received via mailing list)
Hello!

On Tue, Nov 06, 2012 at 09:42:22PM +0800, howard chen wrote:

> Hi,
>
> I am going to use post_action for mirroring the load for performance
> testing to new backend.
>
> But according to the doc:
>
> >> Note: this directive "has subtleties" according to Maxim Dounin, so use
> at your own risk.

There is no official documentation on the "post_action" directive
(you may check yourself at http://nginx.org/en/docs/), and it's on
purpose.  What you are quoting is wiki.

> Some questions:
>
> 1. Is the  post_action blocking to the user request? Or the sub request is
> truly async and not affecting to the user?

The post_action is executed in the context of the main request,
and will block further work on the same client connection till
it's complete.

That is, it's unlikely a good idea to use post_action for
performance testing.  I would recommend logging requests instead
and re-executing them with a separate process.

[...]

--
Maxim Dounin
http://nginx.com/support.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.