summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_router.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-22Removed fibers from compilation.Valentin Bartenev1-0/+2
It's not used anyway, but breaks building with musl. This closes issue #5 on GitHub.
2017-09-15Introducing named port message handlers to avoid misprints.Max Romanov1-16/+4
2017-09-15Fixing memory leak of request parse context.Max Romanov1-10/+11
2017-09-15Introducing application timeout.Max Romanov1-76/+334
2017-09-15Fixed port handlers arrays.Valentin Bartenev1-0/+3
2017-09-15Router: more logical code order change.Igor Sysoev1-2/+2
Updating the router engines list before posting jobs to worker thread engines is more logical because worker threads may exit after the posting. However, the previous code was safe because an engine is freed by the router main thread after worker its thread has exited.
2017-09-14Router: fixed segmentation fault.Igor Sysoev1-10/+32
The router process exited abnormally on reconfiguration if number of worker threads had been decreased on the previous reconfiguration. Besides the list of router engines should be updated only after a new configuration joints have been prepared for all engines.
2017-09-14Router: worker threads should quit only if the main thread hasIgor Sysoev1-1/+54
requested this.
2017-09-14Fixed textual socket name lengths and Unix domain sockaddr length.Igor Sysoev1-2/+2
2017-09-07Moving body data before headers for PHP POST.Max Romanov1-5/+20
PHP SAPI tries to read body for POST request before registering header-specific variables. For other methods, read_post_body() called by SAPI after variables registration. This closes #10 issue on GitHub.
2017-09-06Style fixes.Igor Sysoev1-17/+31
2017-09-05Fixing request id logging.Max Romanov1-1/+1
2017-09-05Fixing racing condition on app port release/request.Max Romanov1-1/+21
Application free ports is a queue (double linked list) protected with mutex. After successfull request parsing, each router thread (1) tries to get port from this list. If this list is empty, (2) start worker request posted to main router thread. Another thread may release port between (1) and (2). This fix adds an attempt to get port from free ports list at the beginning of start worker action in main thread.
2017-09-05Double connection close attempt fix.Max Romanov1-2/+11
2017-09-01Added SERVER_ADDR parameter for Python and PHP modules.Igor Sysoev1-0/+7
2017-08-31Multiplexing different requests in single app port.Max Romanov1-0/+5
2017-08-31Default value 1 for number of workers.Max Romanov1-0/+2
2017-08-30Send remote address to go application.Max Romanov1-0/+1
2017-08-29Fixed debug message broken in e8da77a2c293.Max Romanov1-4/+3
2017-08-29The master process has been renamed to the main process.Igor Sysoev1-13/+13
2017-08-26Introduced nxt_socket_defer_accept().Igor Sysoev1-6/+1
2017-08-17The new module configuration interface.Igor Sysoev1-6/+271
Configuration and building example: ./configure ./configure python ./configure php ./configure go make all or ./configure make nginext ./configure python make python ./configure php make php ./configure go make go Modules configuration options and building examples: ./configure python --module=python2 --config=python2.7-config make python2 ./configure php --module=php7 --config=php7.0-config --lib-path=/usr/local/php7.0 make php7 ./configure go --go=go1.6 --go-path=${HOME}/go1.6 make go1.6
2017-08-16Object mapping interface extended with more string types.Valentin Bartenev1-6/+6
2017-08-11Controller: more HTTP headers and detailed JSON parsing errors.Valentin Bartenev1-1/+1
2017-08-11Request body read state implemented.Max Romanov1-51/+191
With specific timeout and buffer size settings.
2017-08-02Listening socket creation and binding operations are passedIgor Sysoev1-63/+192
to the master process.
2017-08-02Added basic port error handler.Max Romanov1-1/+2
2017-08-02Implicit port read buffer completion.Max Romanov1-8/+4
To disable implicit completion, handler should reset msg->buf field.
2017-08-02Using port rpc in controller->router configuration update.Max Romanov1-32/+5
2017-08-02Using port rpc in router->master start worker request.Max Romanov1-151/+97
2017-08-02Port RPC interface introduced.Max Romanov1-0/+3
Usage: 1. Register handlers in incoming port with nxt_port_rpc_register_handler(). 2. Use return value as a stream identifier for next nxt_port_socket_write().
2017-08-02Added bit flags to type parameter of nxt_port_socket_write().Max Romanov1-2/+3
NXT_PORT_MSG_LAST - mark message as last; NXT_PORT_MSG_CLOSE_FD - close fd right after send; Type constants altered to include last flag for single buffer messages. Last sign is critical for coming port RPC layer. Handlers unregistered on last message. Create sync buffer is not convenient, extra parameter is better.
2017-07-25Assign current request id to prevent port memory release.Max Romanov1-0/+1
2017-07-25Using engine task to avoid racing condition.Max Romanov1-1/+6
2017-07-25Fixed building on Solaris by Sun C.Max Romanov1-2/+3
2017-07-19Listening sockets remaining from the previous configurationIgor Sysoev1-0/+1
were not updated with new parameters.
2017-07-18Added application name in process title.Igor Sysoev1-1/+6
2017-07-18Request-app link introduced to prevent mp destroy for penging requests.Max Romanov1-122/+296
nxt_req_conn_link_t still used for lookup connection by request id. New nxt_req_app_link_t (ra) allocated from conn->mem_pool using mp_retain(). ra stored in app->requests if there is no free worker to process request.
2017-07-18Using correct task for engine post.Max Romanov1-8/+15
2017-07-18Work queue thread assertions. Reset thread after fork.Max Romanov1-0/+2
2017-07-18Mem pool cleanup introduced.Max Romanov1-17/+16
Used for connection mem pool cleanup, which can be used by buffers. Used for port mem pool to safely destroy linked process.
2017-07-18Port allocation and destroy changed. Worker process stop introduced.Max Romanov1-65/+185
2017-07-16Router configuration retention count fixed.Igor Sysoev1-1/+1
2017-07-16Router: joint must be added to engine's joint list in theIgor Sysoev1-2/+4
engine thread.
2017-07-14Router: joint must be checked before memory pool destruction.Igor Sysoev1-1/+5
2017-07-14Router: listening socket configuration retention count fixed.Igor Sysoev1-1/+6
2017-07-14Router: using joint job queues instead of arrays to passIgor Sysoev1-88/+35
listening socket handlers to worker engines.
2017-07-14Router: using joint jobs to pass listening socket handlers toIgor Sysoev1-75/+65
worker engines.
2017-07-13Router: restoring listening sockets of the previous configuration.Igor Sysoev1-0/+6
2017-07-12Closing new listening sockets on configuration failure.Igor Sysoev1-10/+35