- 29 Nov, 2021 6 commits
-
-
Dridi Boukelmoune authored
Just like the file cursor reads from stdin when opening "-". And in addition, teach varnishlog to also write to stdout when it is opening the file directly. Likewise, put varnishncsa on par with varnishlog in that regard. It is now possible to compress binary VSL on the fly without taking a detour to the file system, see u00019.vtc for an example. Considering how VUT daemonizes, a "-w -" option in daemon mode becomes an error as well. Refs #3740
-
Martin Blix Grydeland authored
When vsl_reclen (maximum length of a record) is close to vsl_buffer, the vsl buffer is flushed to the main shared memory log for every record. This is because we test if there is space for vsl_reclen, not the actual size of the formatted log record (which likely is much smaller). Fix this by doing the formatting in up to two stages. If the first stage shows that we overflowed, but would not have overflown vcl_reclen if there was more room in the buffer, then flush and redo the formatting. This limits the extra work of formatting twice only to the one record that happened to overflow the buffer.
-
Dridi Boukelmoune authored
Otherwise valid code can panic on workspace exhaustion: std.ip(req.http.X-Real-IP, std.ip(req.http.X-Client-IP, client.ip)) If the nested std.ip() call runs out of workspace, it will return a null ip instead of the fallback, and since the outer std.ip() call is getting a fallback argument, it will panic upon checking the suckaddr sanity. Refs a3b26d0b
-
Nils Goroll authored
-
Nils Goroll authored
{req,bereq}.time remain constant across restarts/retries req_top.time remains constant across esi includes The other values represent the time when the respective object was created.
-
David Korczynski authored
-
- 24 Nov, 2021 7 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
(Last part of #3599)
-
Poul-Henning Kamp authored
(4th part of #3599)
-
Poul-Henning Kamp authored
(3rd part of #3599)
-
Poul-Henning Kamp authored
(2nd part of #3599)
-
Poul-Henning Kamp authored
(First part of #3599)
-
Poul-Henning Kamp authored
-
- 23 Nov, 2021 8 commits
-
-
Martin Blix Grydeland authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Martin Blix Grydeland authored
-
Martin Blix Grydeland authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Dridi Boukelmoune authored
-
- 22 Nov, 2021 1 commit
-
-
Poul-Henning Kamp authored
Dont limit ourselves to a set number of VSL records to include the "0 CLI" we want, various platforms emit a number of Debug messages relating to sockopt Use the `process p%d -expect-text` mechanism to wait only as long as necessary for the "0 CLI"
-
- 19 Nov, 2021 7 commits
-
-
Poul-Henning Kamp authored
Dont limit ourselves to a set number of VSL records to include the "0 CLI" we want, various platforms emit a number of Debug messages relating to sockopt Use the `process p%d -expect-text` mechanism to wait only as long as necessary for the "0 CLI"
-
Dridi Boukelmoune authored
Refs #3740
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
- 17 Nov, 2021 11 commits
-
-
Dridi Boukelmoune authored
Closes #3692 Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
Instead of having a single global check that all acceptors may race towards, this check now happens on a per listen socket basis. For sockets with a different inheritance behavior on a single system, we avoid having the first connection dictate what may be inherited by a connection socket from its listen socket for all the other listen addresses. At least on Linux, Unix-domain sockets DO NOT inherit options like SO_{RCV,SND}TIMEO even though TCP sockets do. On the off chance that even sockets of the same family could behave differently, like for example a regular vs a loopback TCP session, this is done on a per listen address basis. To avoid cache-acceptor coordination with the acceptor worker threads of a given listen address, workers will individually perform this check once and for all when the first connection is accepted. We also stay defensive in the event of a parameter change, just in case a previous test would assume inheritance because the Varnish parameter value would match the kernel default value. Once a mismatch is observed for a given connection with a given socket, the inheritance test is no longer performed needlessly for this combination. A race still exists between acceptors from different thread pools for a given listen address, but this race is identical to the previous one based on the former global need_test variable. Although the inheritance check leaks into struct listen_sock, it is opaque so everything can remain contained inside cache_acceptor.c. Some aspects of this change (including the clarification comments) are from @mbgrydeland. Refs #2722
-
Dridi Boukelmoune authored
And while at it, update the SO_LINGER explanation to match reality. Refs 7eba9460 Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
The SO_KEEPALIVE justification used to precede such a constant and was left confusingly lingering over the unrelated need_test variable. Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
Using the tmp sock_arg for storage, we can test all values with the same logic and only differentiate hard-coded options from parameterized ones. Stylistic polish by @mbgrydeland. Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
They can be stored directly in the sock_opts array or on the stack. Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
The sess and listen_sock structs contain everything we need to find or infer the former `sock`, `uds` and `force` arguments. In particular, it helps distinguish between working on a connection vs listen socket.
-
Dridi Boukelmoune authored
And conversely rename `to` variables to `so` for consistency. Better diff with the --word-diff --word-diff-regex='\w+' options. Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
It is a 1:1 mapping with IPPROTO_TCP, so TCP_NODELAY was moved down to be with the other IPPROTO_TCP options. Conflicts: bin/varnishd/cache/cache_acceptor.c
-
Dridi Boukelmoune authored
-