Commit Graph

4074 Commits

Author SHA1 Message Date
Willy Tarreau
4a0a8db9c6 DOC: remove the ultra-obsolete TODO file
This one was still written in french and outdated since 1.4 or so.
2014-06-19 15:55:04 +02:00
Emeric Brun
c8b27b6c68 MEDIUM: ssl: add 300s supported time skew on OCSP response update.
OCSP_MAX_RESPONSE_TIME_SKEW can be set to a different value at
compilation (default is 300 seconds).
2014-06-19 14:37:30 +02:00
Emeric Brun
af4ef741e9 MINOR: ssl/cli: Fix unapropriate comment in code on 'set ssl ocsp-response' 2014-06-19 14:37:19 +02:00
Thierry FOURNIER
f4e6129e30 MINOR: missing regex.h include 2014-06-19 14:29:32 +02:00
Emeric Brun
4147b2ef10 MEDIUM: ssl: basic OCSP stapling support.
The support is all based on static responses. This doesn't add any
request / response logic to HAProxy, but allows a way to update
information through the socket interface.

Currently certificates specified using "crt" or "crt-list" on "bind" lines
are loaded as PEM files.
For each PEM file, haproxy checks for the presence of file at the same path
suffixed by ".ocsp". If such file is found, support for the TLS Certificate
Status Request extension (also known as "OCSP stapling") is automatically
enabled. The content of this file is optional. If not empty, it must contain
a valid OCSP Response in DER format. In order to be valid an OCSP Response
must comply with the following rules: it has to indicate a good status,
it has to be a single response for the certificate of the PEM file, and it
has to be valid at the moment of addition. If these rules are not respected
the OCSP Response is ignored and a warning is emitted. In order to  identify
which certificate an OCSP Response applies to, the issuer's certificate is
necessary. If the issuer's certificate is not found in the PEM file, it will
be loaded from a file at the same path as the PEM file suffixed by ".issuer"
if it exists otherwise it will fail with an error.

It is possible to update an OCSP Response from the unix socket using:

  set ssl ocsp-response <response>

This command is used to update an OCSP Response for a certificate (see "crt"
on "bind" lines). Same controls are performed as during the initial loading of
the response. The <response> must be passed as a base64 encoded string of the
DER encoded response from the OCSP server.

Example:
  openssl ocsp -issuer issuer.pem -cert server.pem \
               -host ocsp.issuer.com:80 -respout resp.der
  echo "set ssl ocsp-response $(base64 -w 10000 resp.der)" | \
               socat stdio /var/run/haproxy.stat

This feature is automatically enabled on openssl 0.9.8h and above.

This work was performed jointly by Dirkjan Bussink of GitHub and
Emeric Brun of HAProxy Technologies.
2014-06-18 18:28:56 +02:00
Emeric Brun
2aab722dc1 MEDIUM: ssl: ignored file names ending as '.issuer' or '.ocsp'.
We don't want to load these files found in directories specified in "crt" or
"crt-list".

These suffixes are reserved for OCSP stapling.
2014-06-18 18:24:55 +02:00
Thierry FOURNIER
26202760a4 MINOR: regex: Use native PCRE API.
The pcreposix layer (in the pcre projetc) execute strlen to find
thlength of the string. When we are using the function "regex_exex*2",
the length is used to add a final \0, when pcreposix is executed a
strlen is executed to compute the length.

If we are using a native PCRE api, the length is provided as an
argument, and these operations disappear.

This is useful because PCRE regex are more used than POSIC regex.
2014-06-18 15:14:00 +02:00
Thierry FOURNIER
c9c2daf283 MEDIUM: regex: Remove null terminated strings.
The new regex function can use string and length. The HAproxy buffer are
not null-terminated, and the use of the regex_exec* functions implies
the add of this null character. This patch replace these function by the
functions which takes a string and length as input.

Just the file "proto_http.c" is change because this one is more executed
than other. The file "checks.c" have a very low usage, and it is not
interesting to change it. Furthermore, the buffer used by "checks.c" are
null-terminated.
2014-06-18 15:12:51 +02:00
Thierry FOURNIER
09af0d6d43 MEDIUM: regex: replace all standard regex function by own functions
This patch remove all references of standard regex in haproxy. The last
remaining references are only in the regex.[ch] files.

In the file src/checks.c, the original function uses a "pmatch" array.
In fact this array is unused. This patch remove it.
2014-06-18 15:07:57 +02:00
Thierry FOURNIER
b8f980cc19 MINOR: regex: Create JIT compatible function that return match strings
This patchs rename the "regex_exec" to "regex_exec2". It add a new
"regex_exec", "regex_exec_match" and "regex_exec_match2" function. This
function can match regex and return array containing matching parts.
Otherwise, this function use the compiled method (JIT or PCRE or POSIX).

JIT require a subject with length. PCREPOSIX and native POSIX regex
require a null terminted subject. The regex_exec* function are splited
in two version. The first version take a null terminated string, but it
execute strlen() on the subject if it is compiled with JIT. The second
version (terminated by "2") take the subject and the length. This
version adds a null character in the subject if it is compiled with
PCREPOSIX or native POSIX functions.

The documentation of posix regex and pcreposix says that the function
returns 0 if the string matche otherwise it returns REG_NOMATCH. The
REG_NOMATCH macro take the value 1 with posix regex and the value 17
with the pcreposix. The documentaion of the native pcre API (used with
JIT) returns a negative number if no match, otherwise, it returns 0 or a
positive number.

This patch fix also the return codes of the regex_exec* functions. Now,
these function returns true if the string match, otherwise it returns
false.
2014-06-18 15:07:50 +02:00
Willy Tarreau
b854392824 BUG/MINOR: http: fix typos in previous patch
When I renamed the modify-header action to replace-value, one of them
was mistakenly set to "replace-val" instead. Additionally, differentiation
of the two actions must be done on args[0][8] and not *args[8]. Thanks
Thierry for spotting...
2014-06-17 19:03:56 +02:00
Sasha Pachev
218f064f55 MEDIUM: http: add actions "replace-header" and "replace-values" in http-req/resp
This patch adds two new actions to http-request and http-response rulesets :
  - replace-header : replace a whole header line, suited for headers
                     which might contain commas
  - replace-value  : replace a single header value, suited for headers
                     defined as lists.

The match consists in a regex, and the replacement string takes a log-format
and supports back-references.
2014-06-17 18:34:32 +02:00
Willy Tarreau
f5b1cc38b8 MEDIUM: stats: report per-backend and per-server time stats in HTML and CSV outputs
The time statistics computed by previous patches are now reported in the
HTML stats in the tips related to the total sessions for backend and servers,
and as separate columns for the CSV stats.
2014-06-17 17:15:56 +02:00
Willy Tarreau
4bfc580dd3 MEDIUM: session: maintain per-backend and per-server time statistics
Using the last rate counters, we now compute the queue, connect, response
and total times per server and per backend with a 95% accuracy over the last
1024 samples. The operation is cheap so we don't need to condition it.
2014-06-17 17:15:56 +02:00
Willy Tarreau
2438f2b984 MINOR: freq_ctr: introduce a new averaging method
While the current functions report average event counts per period, we are
also interested in average values per event. For this we use a different
method. The principle is to rely on a long tail which sums the new value
with a fraction of the previous value, resulting in a sliding window of
infinite length depending on the precision we're interested in.

The idea is that we always keep (N-1)/N of the sum and add the new sampled
value. The sum over N values can be computed with a simple program for a
constant value 1 at each iteration :

    N
  ,---
   \       N - 1              e - 1
    >  ( --------- )^x ~= N * -----
   /         N                  e
  '---
  x = 1

Note: I'm not sure how to demonstrate this but at least this is easily
verified with a simple program, the sum equals N * 0.632120 for any N
moderately large (tens to hundreds).

Inserting a constant sample value V here simply results in :

   sum = V * N * (e - 1) / e

But we don't want to integrate over a small period, but infinitely. Let's
cut the infinity in P periods of N values. Each period M is exactly the same
as period M-1 with a factor of ((N-1)/N)^N applied. A test shows that given a
large N :

     N - 1           1
  ( ------- )^N ~=  ---
       N             e

Our sum is now a sum of each factor times  :

   N*P                                     P
  ,---                                   ,---
   \         N - 1               e - 1    \     1
    >  v ( --------- )^x ~= VN * -----  *  >   ---
   /           N                   e      /    e^x
  '---                                   '---
  x = 1                                  x = 0

For P "large enough", in tests we get this :

    P
  ,---
   \     1        e
    >   --- ~=  -----
   /    e^x     e - 1
  '---
  x = 0

This simplifies the sum above :

   N*P
  ,---
   \         N - 1
    >  v ( --------- )^x = VN
   /           N
  '---
  x = 1

So basically by summing values and applying the last result an (N-1)/N factor
we just get N times the values over the long term, so we can recover the
constant value V by dividing by N.

A value added at the entry of the sliding window of N values will thus be
reduced to 1/e or 36.7% after N terms have been added. After a second batch,
it will only be 1/e^2, or 13.5%, and so on. So practically speaking, each
old period of N values represents only a quickly fading ratio of the global
sum :

  period    ratio
    1       36.7%
    2       13.5%
    3       4.98%
    4       1.83%
    5       0.67%
    6       0.25%
    7       0.09%
    8       0.033%
    9       0.012%
   10       0.0045%

So after 10N samples, the initial value has already faded out by a factor of
22026, which is quite fast. If the sliding window is 1024 samples wide, it
means that a sample will only count for 1/22k of its initial value after 10k
samples went after it, which results in half of the value it would represent
using an arithmetic mean. The benefit of this method is that it's very cheap
in terms of computations when N is a power of two. This is very well suited
to record response times as large values will fade out faster than with an
arithmetic mean and will depend on sample count and not time.

Demonstrating all the above assumptions with maths instead of a program is
left as an exercise for the reader.
2014-06-17 17:15:51 +02:00
Willy Tarreau
a28df3e19a MEDIUM: stats: report the last check and last agent's output on the CSV status
Now that we can quote unsafe string, it becomes possible to dump the health
check responses on the CSV page as well. The two new fields are "last_chk"
and "last_agt".
2014-06-16 18:20:26 +02:00
Willy Tarreau
a3310dc66c DOC: clarify the CSV format
Indicate that the text cells in the CSV format may contain quotes to
escape ambiguous texts. We don't have this case right now since we limit
the output, but it may happen in the future.
2014-06-16 18:20:14 +02:00
Willy Tarreau
588297f2f9 MINOR: tools: add new functions to quote-encode strings
qstr() and cstr() will be used to quote-encode strings. The first one
does it unconditionally. The second one is aimed at CSV files where the
quote-encoding is only needed when the field contains a quote or a comma.
2014-06-16 18:20:14 +02:00
Thierry FOURNIER
148f40866b MINOR: regex: fix a little configuration memory leak.
The function regfree free the memory allocated to the pattern buffer by
the compiling process. It is not freeing the buffer itself.
2014-06-16 16:47:20 +02:00
Simon Horman
75ab8bdb83 MEDIUM: Add port_to_str helper
This helper is similar to addr_to_str but
tries to convert the port rather than the address
of a struct sockaddr_storage.

This is in preparation for supporting
an external agent check.

Signed-off-by: Simon Horman <horms@verge.net.au>
2014-06-16 10:10:33 +02:00
Willy Tarreau
7799267f43 MEDIUM: connection: add support for proxy protocol v2 in accept-proxy
The "accept-proxy" statement of bind lines was still limited to version
1 of the protocol, while send-proxy-v2 is now available on the server
lines. This patch adds support for parsing v2 of the protocol on incoming
connections. The v2 header is automatically recognized so there is no
need for a new option.
2014-06-14 11:46:03 +02:00
Willy Tarreau
8fccfa256e CLEANUP: connection: merge proxy proto v2 header and address block
This is in order to simplify the PPv2 header parsing code to look more
like the one provided as an example in the spec. No code change was
performed beyond just merging the proxy_addr union into the proxy_hdr_v2
struct.
2014-06-14 11:46:02 +02:00
Willy Tarreau
7a6f134121 DOC: minor updates to the proxy protocol doc
Update the release data, revision history and the link to the Forwarded
HTTP extension.
2014-06-14 11:46:02 +02:00
Willy Tarreau
01320c9a34 DOC: proxy protocol example parser was still wrong
Now that version and cmd are in the same byte, it is not possible
anymore to compare the version as a 13th byte.
2014-06-14 11:46:02 +02:00
Willy Tarreau
4c20d29c29 BUG/MINOR: connection: make proxy protocol v1 support the UNKNOWN protocol
If haproxy receives a connection over a unix socket and forwards it to
another haproxy instance using proxy protocol v1, it sends an UNKNOWN
protocol, which is rejected by the other side. Make the receiver accept
the UNKNOWN protocol as per the spec, and only use the local connection's
address for this.
2014-06-14 11:46:02 +02:00
Simon Horman
b00d17a034 MEDIUM: Break out check establishment into connect_chk()
This is in preparation for adding a new type of check that
uses a process rather than a socket.

Signed-off-by: Simon Horman <horms@verge.net.au>
2014-06-13 18:31:11 +02:00
Willy Tarreau
215663dbf3 MINOR: config: warn when tcp-check rules are used without option tcp-check
Since this case means that the rules will be ignored, better emit a warning.
2014-06-13 18:30:23 +02:00
Willy Tarreau
33a14e515b MEDIUM: session: redispatch earlier when possible
As discussed with Dmitry Sivachenko, is a server farm has more than one
active server, uses a guaranteed non-determinist algorithm (round robin),
and a connection was initiated from a non-persistent connection, there's
no point insisting to reconnect to the same server after a connect failure,
better redispatch upon the very first retry instead of insisting on the same
server multiple times.
2014-06-13 17:53:55 +02:00
Willy Tarreau
db6d012270 MEDIUM: session: don't apply the retry delay when redispatching
The retry delay is only useful when sticking to a same server. During
a redispatch, it's useless and counter-productive if we're sure to
switch to another server, which is almost guaranteed when there's
more than one server and the balancing algorithm is round robin, so
better not pass via the turn-around state in this case. It could be
done as well for leastconn, but there's a risk of always killing the
delay after the recovery of a server in a farm where it's almost
guaranteed to take most incoming traffic. So better only kill the
delay when using round robin.
2014-06-13 17:48:45 +02:00
Willy Tarreau
b02906659b MEDIUM: session: allow shorter retry delay if timeout connect is small
As discussed with Dmitry Sivachenko, the default 1-second connect retry
delay can be large for situations where the connect timeout is much smaller,
because it means that an active connection reject will take more time to be
retried than a silent drop, and that does not make sense.

This patch changes this so that the retry delay is the minimum of 1 second
and the connect timeout. That way people running with sub-second connect
timeout will benefit from the shorter reconnect.
2014-06-13 17:04:44 +02:00
Willy Tarreau
18bf01e900 MEDIUM: tcp: add a new tcp-request capture directive
This new directive captures the specified fetch expression, converts
it to text and puts it into the next capture slot. The capture slots
are shared with header captures so that it is possible to dump all
captures at once or selectively in logs and header processing.

The purpose is to permit logs to contain whatever payload is found in
a request, for example bytes at a fixed location or the SNI of forwarded
SSL traffic.
2014-06-13 16:45:53 +02:00
Willy Tarreau
3a4ac422ce MINOR: tcp: prepare support for the "capture" action
A few minor entries will be needed to capture sample fetches in requests
or responses. This patch just prepares the code for this.
2014-06-13 16:32:48 +02:00
Willy Tarreau
54da8db40b MINOR: capture: extend the captures to support non-header keys
This patch adds support for captures with no header name. The purpose
is to allow extra captures to be defined and logged along with the
header captures.
2014-06-13 16:32:48 +02:00
Willy Tarreau
5b4bf70a95 MINOR: sample: improve sample_fetch_string() to report partial contents
Currently, all callers to sample_fetch_string() call it with SMP_OPT_FINAL.
Now we improve it to support the case where this option is not set, and to
make it return the original sample as-is. The purpose is to let the caller
check the SMP_F_MAY_CHANGE flag in the result and know that it should wait
to get complete contents. Currently this has no effect on existing code.
2014-06-13 16:32:48 +02:00
Willy Tarreau
d9ed3d2848 MINOR: logs: don't limit HTTP header captures to HTTP frontends
Similar to previous patches, HTTP header captures are performed when
a TCP frontend switches to an HTTP backend, but are not possible to
report. So let's relax the check to explicitly allow them to be present
in TCP frontends.
2014-06-13 16:32:48 +02:00
Willy Tarreau
4bf9963a78 MINOR: log: allow the HTTP status code to be logged even in TCP frontends
Log format is defined in the frontend, and some frontends may be chained to
an HTTP backend. Sometimes it's very convenient to be able to log the HTTP
status code of these HTTP backends. This status is definitely present in
the internal structures, it's just that we used to limit it to be used in
HTTP frontends. So let's simply relax the check to allow it to be used in
TCP frontends as well.
2014-06-13 16:32:48 +02:00
Willy Tarreau
be722a2d64 DOC: fix remaining occurrences of "pattern extraction" 2014-06-13 16:32:48 +02:00
Remi Gacogne
c1eab8c96f MEDIUM: ssl: fix detection of ephemeral diffie-hellman key exchange by using the cipher description.
In OpenSSL, the name of a cipher using ephemeral diffie-hellman for key
 exchange can start with EDH, but also DHE, EXP-EDH or EXP1024-DHE.
We work around this issue by using the cipher's description instead of
the cipher's name.
Hopefully the description is less likely to change in the future.
2014-06-12 20:52:41 +02:00
Remi Gacogne
f46cd6e4ec MEDIUM: ssl: Add the option to use standardized DH parameters >= 1024 bits
When no static DH parameters are specified, this patch makes haproxy
use standardized (rfc 2409 / rfc 3526) DH parameters with prime lenghts
of 1024, 2048, 4096 or 8192 bits for DHE key exchange. The size of the
temporary/ephemeral DH key is computed as the minimum of the RSA/DSA server
key size and the value of a new option named tune.ssl.default-dh-param.
2014-06-12 16:12:23 +02:00
Simone Gotti
b7f1cfc846 BUG/MEDIUM: Fix unhandled connections problem with systemd daemon mode and SO_REUSEPORT.
Using the systemd daemon mode the parent doesn't exits but waits for
his childs without closing its listening sockets.

As linux 3.9 introduced a SO_REUSEPORT option (always enabled in
haproxy if available) this will give unhandled connections problems
after an haproxy reload with open connections.

The problem is that when on reload a new parent is started (-Ds
$oldchildspids), in haproxy.c main there's a call to start_proxies
that, without SO_REUSEPORT, should fail (as the old processes are
already listening) and so a SIGTOU is sent to old processes. On this
signal the old childs will call (in pause_listener) a shutdown() on
the listening fd. From my tests (if I understand it correctly) this
affects the in kernel file (so the listen is really disabled for all
the processes, also the parent).

Instead, with SO_REUSEPORT, the call to start_proxies doesn't fail and
so SIGTOU is never sent. Only SIGUSR1 is sent and the listen isn't
disabled for the parent but only the childs will stop listening (with
a call to close())

So, with SO_REUSEPORT, the old childs will close their listening
sockets but will wait for the current connections to finish or
timeout, and, as their parent has its listening socket open, the
kernel will schedule some connections on it. These connections will
never be accepted by the parent as it's in the waitpid loop.

This fix will close all the listeners on the parent before entering the
waitpid loop.

Signed-off-by: Simone Gotti <simone.gotti@gmail.com>
2014-06-11 21:27:34 +02:00
Willy Tarreau
0f6093a9b2 DOC: fix proxy protocol v2 decoder example
Richard Russo reported that the example code in the PP spec is wrong
now that we slightly changed the format to merge <ver> and <cmd>. Also
rename the field <ver_cmd> to avoid any ambiguity on the usage.
2014-06-11 21:21:26 +02:00
Simone Gotti
1b48cc9c6f BUG/MEDIUM: fix ignored values for half-closed timeouts (client-fin and server-fin) in defaults section.
Signed-off-by: Simone Gotti <simone.gotti@gmail.com>
WT: bug introduced with the new feature in 1.5-dev25, no backport is needed.
2014-06-11 21:07:16 +02:00
Nenad Merdanovic
6639a7cf0d MINOR: checks: mysql-check: Add support for v4.1+ authentication
MySQL will in stop supporting pre-4.1 authentication packets in the future
and is already giving us a hard time regarding non-silencable warnings
which are logged on each health check. Warnings look like the following:

"[Warning] Client failed to provide its character set. 'latin1' will be used
as client character set."

This patch adds basic support for post-4.1 authentication by sending the proper
authentication packet with the character set, along with the QUIT command.
2014-06-11 18:13:46 +02:00
Willy Tarreau
1592d1e72a CLEANUP: http: don't clear CF_READ_NOEXP twice
Last patch cleared the flag twice in the response, which is useless.
Thanks Lukas for spotting it :-)
2014-06-11 16:49:14 +02:00
Willy Tarreau
77d29029af BUG/MEDIUM: http: clear CF_READ_NOEXP when preparing a new transaction
Commit b1982e2 ("BUG/MEDIUM: http/session: disable client-side expiration
only after body") was tricky and caused an issue which was fixed by commit
0943757 ("BUG/MEDIUM: session: don't clear CF_READ_NOEXP if analysers are
not called"). But that's not enough, another issue was introduced and further
emphasized by last fix.

The issue is that the CF_READ_NOEXP flag needs to be cleared when waiting
for a new request over that connection, otherwise we cannot expire anymore
an idle connection waiting for a new request.

This explains the neverending keepalives reported by at least 3 different
persons since dev24. No backport is needed.
2014-06-11 14:11:44 +02:00
Todd Lyons
d1dcea064c DOC: Add Exim as Proxy Protocol implementer. 2014-06-03 22:36:46 +02:00
Willy Tarreau
ac49707158 BUILD: stats: workaround stupid and bogus -Werror=format-security behaviour
As reported by Vincent Bernat and Ryan O'Hara, building haproxy with the
option above causes this :

src/dumpstats.c: In function 'stats_dump_sv_stats':
src/dumpstats.c:3059:4: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [src/dumpstats.o] Error 1

With that option, gcc wants an argument after a string format even when
that string format is a const but not a litteral. It can be anything
invalid, for example an integer when a string is expected, it just
wants something. So feed it with something :-(
2014-05-29 01:07:31 +02:00
Willy Tarreau
c874653bb4 BUILD: don't use type "uint" which is not portable
Dmitry Sivachenko reported that "uint" doesn't build on FreeBSD 10.
On Linux it's defined in sys/types.h and indicated as "old". Just
get rid of the very few occurrences.
2014-05-28 23:05:07 +02:00
Willy Tarreau
2e85840266 [RELEASE] Released version 1.5-dev26
Released version 1.5-dev26 with the following main changes :
    - BUG/MEDIUM: polling: fix possible CPU hogging of worker processes after receiving SIGUSR1.
    - BUG/MINOR: stats: fix a typo on a closing tag for a server tracking another one
    - OPTIM: stats: avoid the calculation of a useless link on tracking servers in maintenance
    - MINOR: fix a few memory usage errors
    - CONTRIB: halog: Filter input lines by date and time through timestamp
    - MINOR: ssl: SSL_CTX_set_options() and SSL_CTX_set_mode() take a long, not an int
    - BUG/MEDIUM: regex: fix risk of buffer overrun in exp_replace()
    - MINOR: acl: set "str" as default match for strings
    - DOC: Add some precisions about acl default matching method
    - MEDIUM: acl: strenghten the option parser to report invalid options
    - BUG/MEDIUM: config: a stats-less config crashes in 1.5-dev25
    - BUG/MINOR: checks: tcp-check must not stop on '\0' for binary checks
    - MINOR: stats: improve alignment of color codes to save one line of header
    - MINOR: checks: simplify and improve reporting of state changes when using log-health-checks
    - MINOR: server: remove the SRV_DRAIN flag which can always be deduced
    - MINOR: server: use functions to detect state changes and to update them
    - MINOR: server: create srv_was_usable() from srv_is_usable() and use a pointer
    - BUG/MINOR: stats: do not report "100%" in the thottle column when server is draining
    - BUG/MAJOR: config: don't free valid regex memory
    - BUG/MEDIUM: session: don't clear CF_READ_NOEXP if analysers are not called
    - BUG/MINOR: stats: tracking servers may incorrectly report an inherited DRAIN status
    - MEDIUM: proxy: make timeout parser a bit stricter
    - REORG/MEDIUM: server: split server state and flags in two different variables
    - REORG/MEDIUM: server: move the maintenance bits out of the server state
    - MAJOR: server: use states instead of flags to store the server state
    - REORG: checks: put the functions in the appropriate files !
    - MEDIUM: server: properly support and propagate the maintenance status
    - MEDIUM: server: allow multi-level server tracking
    - CLEANUP: checks: rename the server_status_printf function
    - MEDIUM: checks: simplify server up/down/nolb transitions
    - MAJOR: checks: move health checks changes to set_server_check_status()
    - MINOR: server: make the status reporting function support a reason
    - MINOR: checks: simplify health check reporting functions
    - MINOR: server: implement srv_set_stopped()
    - MINOR: server: implement srv_set_running()
    - MINOR: server: implement srv_set_stopping()
    - MEDIUM: checks: simplify failure notification using srv_set_stopped()
    - MEDIUM: checks: simplify success notification using srv_set_running()
    - MEDIUM: checks: simplify stopping mode notification using srv_set_stopping()
    - MEDIUM: stats: report a server's own state instead of the tracked one's
    - MINOR: server: make use of srv_is_usable() instead of checking eweight
    - MAJOR: checks: add support for a new "drain" administrative mode
    - MINOR: stats: use the admin flags for soft enable/disable/stop/start on the web page
    - MEDIUM: stats: introduce new actions to simplify admin status management
    - MINOR: cli: introduce a new "set server" command
    - MINOR: stats: report a distinct output for DOWN caused by agent
    - MINOR: checks: support specific check reporting for the agent
    - MINOR: checks: support a neutral check result
    - BUG/MINOR: cli: "agent" was missing from the "enable"/"disable" help message
    - MEDIUM: cli: add support for enabling/disabling health checks.
    - MEDIUM: stats: report down caused by agent prior to reporting up
    - MAJOR: agent: rework the response processing and support additional actions
    - MINOR: stats: improve the stats web page to support more actions
    - CONTRIB: halog: avoid calling time/localtime/mktime for each line
    - DOC: document the workarouds for Google Chrome's bogus pre-connect
    - MINOR: stats: report SSL key computations per second
    - MINOR: stats: add counters for SSL cache lookups and misses
2014-05-28 17:50:53 +02:00
Willy Tarreau
ce3f913e48 MINOR: stats: add counters for SSL cache lookups and misses
One important aspect of SSL performance tuning is the cache size,
but there's no metric to know whether it's large enough or not. This
commit introduces two counters, one for the cache lookups and another
one for cache misses. These counters are reported on "show info" on
the stats socket. This way, it suffices to see the cache misses
counter constantly grow to know that a larger cache could possibly
help.
2014-05-28 16:53:04 +02:00