Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi brethren, I am newly developing with Mojolicious. I have a question about scope. I've read some of the Mojo doc but not found a clear answer to my concern. If I understand correctly, by default running a Mojo app under Hypnotoad will allow each worker process to accept N concurrent client connections, where N defaults to 1000 (from max_connections in Mojo::IOLoop). One can override this with the clients option, all the way down to 1 so that the worker process exits and a new one is spawned after each request. This is recommended only for applications that are heavily blocking. What I haven't been able top confirm is whether each client connection is completely separate from the others within a single worker process. Here's the scenario:
So what I want to make sure of is that the data stashed in the logger context hash is not shared, obviously. Do I need to set Hypnotoad so that only one client connection is handled per worker? Or is the scope limited to client connection already? Or, am I missing some fundamental Mojo concept? Thanks!
The way forward always starts with a minimal test.
In reply to Mojolicious / Hypnotoad / concurrency / data scope by 1nickt
|
|