Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-03HTTP/2: made it possible to flush response headers (ticket #1743).Maxim Dounin
Response headers can be buffered in the SSL buffer. But stream's fake connection buffered flag did not reflect this, so any attempts to flush the buffer without sending additional data were stopped by the write filter. It does not seem to be possible to reflect this in fc->buffered though, as we never known if main connection's c->buffered corresponds to the particular stream or not. As such, fc->buffered might prevent request finalization due to sending data on some other stream. Fix is to implement handling of flush buffers when the c->need_flush_buf flag is set, similarly to the existing last buffer handling. The same flag is now used for UDP sockets in the stream module instead of explicit checking of c->type.
2021-12-27Simplified sendfile(SF_NODISKIO) usage.Maxim Dounin
Starting with FreeBSD 11, there is no need to use AIO operations to preload data into cache for sendfile(SF_NODISKIO) to work. Instead, sendfile() handles non-blocking loading data from disk by itself. It still can, however, return EBUSY if a page is already being loaded (for example, by a different process). If this happens, we now post an event for the next event loop iteration, so sendfile() is retried "after a short period", as manpage recommends. The limit of the number of EBUSY tolerated without any progress is preserved, but now it does not result in an alert, since on an idle system event loop iteration might be very short and EBUSY can happen many times in a row. Instead, SF_NODISKIO is simply disabled for one call once the limit is reached. With this change, sendfile(SF_NODISKIO) is now used automatically as long as sendfile() is enabled, and no longer requires "aio on;".
2021-04-08Introduced the "keepalive_time" directive.Maxim Dounin
Similar to lingering_time, it limits total connection lifetime before keepalive is switched off. The default is 1 hour, which is close to the total maximum connection lifetime possible with default keepalive_requests and keepalive_timeout.
2021-01-19Core: removed post_accept_timeout.Maxim Dounin
Keeping post_accept_timeout in ngx_listening_t is no longer needed since we've switched to 1 second timeout for deferred accept in 5541:fdb67cfc957d. Further, using it in HTTP code can result in client_header_timeout being used from an incorrect server block, notably if address-specific virtual servers are used along with a wildcard listening socket, or if we've switched to a different server block based on SNI in SSL handshake.
2019-10-21Core: moved PROXY protocol fields out of ngx_connection_t.Roman Arutyunyan
Now a new structure ngx_proxy_protocol_t holds these fields. This allows to add more PROXY protocol fields in the future without modifying the connection structure.
2018-07-12Events: moved sockets cloning to ngx_event_init_conf().Maxim Dounin
Previously, listenings sockets were not cloned if the worker_processes directive was specified after "listen ... reuseport". This also simplifies upcoming configuration check on the number of worker connections, as it needs to know the number of listening sockets before cloning.
2018-06-04Stream: udp streams.Roman Arutyunyan
Previously, only one client packet could be processed in a udp stream session even though multiple response packets were supported. Now multiple packets coming from the same client address and port are delivered to the same stream session. If it's required to maintain a single stream of data, nginx should be configured in a way that all packets from a client are delivered to the same worker. On Linux and DragonFly BSD the "reuseport" parameter should be specified for this. Other systems do not currently provide appropriate mechanisms. For these systems a single stream of udp packets is only guaranteed in single-worker configurations. The proxy_response directive now specifies how many packets are expected in response to a single client packet.
2017-05-26Introduced ngx_tcp_nodelay().Ruslan Ermilov
2016-10-10Modules compatibility: compatibility with NGX_HTTP_SSL.Maxim Dounin
With this change it is now possible to load modules compiled without the "--with-http_ssl_module" configure option into nginx binary compiled with it, and vice versa (if a module doesn't use ssl-specific functions), assuming both use the "--with-compat" option.
2016-10-10Modules compatibility: compatibility with NGX_HAVE_FILE_AIO.Maxim Dounin
With this change it is now possible to load modules compiled without the "--with-file-aio" configure option into nginx binary compiled with it, and vice versa, assuming both use the "--with-compat" option.
2016-10-10Modules compatibility: compatibility with NGX_THREADS.Maxim Dounin
With this change it is now possible to load modules compiled without the "--with-threads" configure option into nginx binary compiled with it, and vice versa (if a module does not use thread-specific functions), assuming both use the "--with-compat" option.
2016-10-03Modules compatibility: removed two NGX_HAVE_DEFERRED_ACCEPT checks.Ruslan Ermilov
Removed (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) from the signature accordingly.
2016-10-03Modules compatibility: removed unneeded NGX_HAVE_REUSEPORT checks.Maxim Dounin
Removed NGX_HAVE_REUSEPORT from the signature accordingly.
2016-10-03Modules compatibility: removed unneeded IPV6_V6ONLY checks.Maxim Dounin
The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support.
2016-06-29Removed unused flag accept_context_updated from ngx_event_t.Ruslan Ermilov
Also, removed practically unused flag accept_context_updated from ngx_connection_t.
2016-05-23Added the $proxy_protocol_port variable.Dmitry Volyntsev
2016-05-20Belatedly changed the ngx_create_listening() prototype.Ruslan Ermilov
The function is called only with "struct sockaddr *" since 0.7.58.
2016-04-28Removed unused flag unexpected_eof from ngx_connection_t.Ruslan Ermilov
2016-03-30Style.Ruslan Ermilov
2016-01-20Stream: UDP proxy.Roman Arutyunyan
2015-09-11The HTTP/2 implementation (RFC 7240, 7241).Valentin Bartenev
The SPDY support is removed, as it's incompatible with the new module.
2015-08-11Core: idle connections now closed only once on exiting.Valentin Bartenev
Iterating through all connections takes a lot of CPU time, especially with large number of worker connections configured. As a result nginx processes used to consume CPU time during graceful shutdown. To mitigate this we now only do a full scan for idle connections when shutdown signal is received. Transitions of connections to idle ones are now expected to be avoided if the ngx_exiting flag is set. The upstream keepalive module was modified to follow this.
2015-05-20The "reuseport" option of the "listen" directive.Maxim Dounin
When configured, an individual listen socket on a given address is created for each worker process. This allows to reduce in-kernel lock contention on configurations with high accept rates, resulting in better performance. As of now it works on Linux and DragonFly BSD. Note that on Linux incoming connection requests are currently tied up to a specific listen socket, and if some sockets are closed, connection requests will be reset, see https://lwn.net/Articles/542629/. With nginx, this may happen if the number of worker processes is reduced. There is no such problem on DragonFly BSD. Based on previous work by Sepherosa Ziehau and Yingqi Lu.
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov
The http and stream versions of this macro were identical.
2015-03-20Removed ngx_connection_t.lock.Ruslan Ermilov
2015-03-14Added support for offloading Linux sendfile() in thread pools.Valentin Bartenev
2015-03-04Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation.Ruslan Ermilov
It's mostly dead code and the original idea of worker threads has been rejected.
2015-02-11Refactored sendfile() AIO preload.Valentin Bartenev
This reduces layering violation and simplifies the logic of AIO preread, since it's now triggered by the send chain function itself without falling back to the copy filter. The context of AIO operation is now stored per file buffer, which makes it possible to properly handle cases when multiple buffers come from different locations, each with its own configuration.
2014-03-17Added server-side support for PROXY protocol v1 (ticket #355).Roman Arutyunyan
Client address specified in the PROXY protocol header is now saved in the $proxy_protocol_addr variable and can be used in the realip module. This is currently not implemented for mail.
2014-01-14SPDY: body filter was replaced by c->send_chain() function.Valentin Bartenev
It allows to use ngx_http_write_filter() and all its rate limiting logic.
2014-01-04Allowed up to two EBUSY errors from sendfile().Maxim Dounin
Fallback to synchronous sendfile() now only done on 3rd EBUSY without any progress in a row. Not falling back is believed to be better in case of occasional EBUSY, though protection is still needed to make sure there will be no infinite loop.
2013-12-09Core: keep the length of the local sockaddr.Ruslan Ermilov
2013-12-03Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.Mathew Rodley
--- auto/unix | 12 ++++++++++++ src/core/ngx_connection.c | 32 ++++++++++++++++++++++++++++++++ src/core/ngx_connection.h | 4 ++++ src/http/ngx_http.c | 4 ++++ src/http/ngx_http_core_module.c | 21 +++++++++++++++++++++ src/http/ngx_http_core_module.h | 3 +++ 6 files changed, 76 insertions(+)
2013-03-07Removed c->single_connection flag.Valentin Bartenev
The c->single_connection was intended to be used as lock mechanism to serialize modifications of request object from several threads working with client and upstream connections. The flag is redundant since threads in nginx have never been used that way.
2012-07-30Core: ipv6only is now on by default.Ruslan Ermilov
There is a general consensus that this change results in better consistency between different operating systems and differently tuned operating systems. Note: this changes the width and meaning of the ipv6only field of the ngx_listening_t structure. 3rd party modules that create their own listening sockets might need fixing.
2012-01-18Copyright updated.Maxim Konovalov
2011-12-05Added the "so_keepalive=" parameter to the "listen" directive.Valentin Bartenev
The "so_keepalive" directive in mail module was deprecated. Thanks to Vsevolod Stakhov for initial work.
2011-04-04reuse keepalive connections if there are no free worker connectionsIgor Sysoev
patch by Maxim Dounin
2010-07-05listen setfib=XIgor Sysoev
2009-11-01delete unused field c->local_socklenIgor Sysoev
2009-08-30aio sendfileIgor Sysoev
2009-05-25keepalive_requestsIgor Sysoev
2009-05-18ngx_connection_local_sockaddr()Igor Sysoev
2009-05-05ngx_create_listening()Igor Sysoev
2009-05-05use correct nameIgor Sysoev
2009-05-04delete never used ngx_ssl_set_nosendshut()Igor Sysoev
2009-05-04delete ngx_listening_inet_stream_socket()Igor Sysoev
2009-04-30*) refactor error_log processing: listen socket log might inherit built-inIgor Sysoev
error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
2009-03-13ipv6onlyIgor Sysoev
2009-03-12ignore EINVAL from setsockopt() on SolarisIgor Sysoev