summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2018-01-29 16:17:36 +0300
committerMax Romanov <max.romanov@nginx.com>2018-01-29 16:17:36 +0300
commit9cd4fdbdb78e035254e8094b5cff2155857ab764 (patch)
tree6de4ee721996740cbeda8647e11b8b2aa18e704f /src/nxt_port.h
parenta36babddef203d79dc37736661e1a042df4064f8 (diff)
downloadunit-9cd4fdbdb78e035254e8094b5cff2155857ab764.tar.gz
unit-9cd4fdbdb78e035254e8094b5cff2155857ab764.tar.bz2
Introducing extended app process management.
- Pre-fork 'processes.spare' application processes; - fork more processes to keep 'processes.spare' idle processes; - fork on-demand up to 'processes.max' count; - scale down idle application processes above 'processes.spare' after 'processes.idle_timeout'; - number of concurrently started application processes also limited by 'processes.spare' (or 1, if spare is 0).
Diffstat (limited to 'src/nxt_port.h')
-rw-r--r--src/nxt_port.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h
index 74d37dcb..d916b34b 100644
--- a/src/nxt_port.h
+++ b/src/nxt_port.h
@@ -158,6 +158,9 @@ struct nxt_port_s {
nxt_queue_link_t app_link; /* for nxt_app_t.ports */
nxt_app_t *app;
+ nxt_queue_link_t idle_link; /* for nxt_app_t.idle_ports */
+ nxt_msec_t idle_start;
+
nxt_queue_t messages; /* of nxt_port_send_msg_t */
nxt_thread_mutex_t write_mutex;