diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-27 17:48:04 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-27 17:48:04 +0300 |
commit | 5196cf4d5003dade99321f71bcc1af80f0e5ad50 (patch) | |
tree | 7e087e5135793b55922082f18a84b387832cac63 /src/nxt_router.h | |
parent | baa8c9387b00dc3cd72cfca14c61c25a2badada9 (diff) | |
download | unit-5196cf4d5003dade99321f71bcc1af80f0e5ad50.tar.gz unit-5196cf4d5003dade99321f71bcc1af80f0e5ad50.tar.bz2 |
Rescheduling of pending request after configured timeout.
New optional configuration parameter introduced: limits.reschedule_timeout.
Default value 1 second. In the case when request is written to the port
socket 'in advance', it is called 'pending'.
On every completed request, the head of pending request is checked against
reschedule timeout. If this request waiting for execution longer than
timeout, it is cancelled, new port selected for this request.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_router.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h index 521c0397..89543a1b 100644 --- a/src/nxt_router.h +++ b/src/nxt_router.h @@ -81,7 +81,8 @@ struct nxt_app_s { nxt_thread_mutex_t mutex; /* Protects ports queue. */ nxt_queue_t ports; /* of nxt_port_t.app_link */ - nxt_queue_t requests; /* of nxt_req_conn_link_t */ + nxt_queue_t requests; /* of nxt_req_app_link_t */ + nxt_queue_t pending; /* of nxt_req_app_link_t */ nxt_str_t name; uint32_t pending_workers; @@ -90,6 +91,7 @@ struct nxt_app_s { uint32_t max_pending_responses; nxt_msec_t timeout; + nxt_nsec_t res_timeout; nxt_app_type_t type:8; uint8_t live; /* 1 bit */ |