Skip to content

Commit

Permalink
Statistics for vcp (connection pools)
Browse files Browse the repository at this point in the history
Previously, we had zero reporting on the cause of backend connection
errors, which made it close to impossible to diagnose such issues directly.

We now add statistics per connection pool and Debug VSLs.

Ref varnishcache#2622
  • Loading branch information
nigoroll committed May 28, 2018
1 parent 3f4cd92 commit dcafeed
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 32 deletions.
3 changes: 2 additions & 1 deletion bin/varnishd/Makefile.am
Expand Up @@ -249,7 +249,8 @@ VSC_SRC = \
VSC_sma.vsc \
VSC_smf.vsc \
VSC_smu.vsc \
VSC_vbe.vsc
VSC_vbe.vsc \
VSC_vcp.vsc

VSC_GEN_C = @VSC_GEN_C@
VSC_GEN_H = @VSC_GEN_H@
Expand Down
10 changes: 10 additions & 0 deletions bin/varnishd/VSC_main.vsc
Expand Up @@ -761,6 +761,16 @@
:oneliner: ESI parse warnings (unlock)


.. varnish_vsc:: vcp_create
:level: diag
:oneliner: Connection Pool creates


.. varnish_vsc:: vcp_destroy
:level: diag
:oneliner: Connection Pool destroys


.. varnish_vsc:: vmods
:type: gauge
:oneliner: Loaded VMODs
Expand Down
120 changes: 120 additions & 0 deletions bin/varnishd/VSC_vcp.vsc
@@ -0,0 +1,120 @@
..
This is *NOT* a RST file but the syntax has been chosen so
that it may become an RST file at some later date.

.. varnish_vsc_begin:: vcp
:oneliner: Connection Pool Counters
:order: 65


Counter for operations on connection pools.

.. varnish_vsc:: n_conn
:type: counter
:level: diag
:oneliner: Number of pooled connections


.. varnish_vsc:: n_kill
:type: counter
:level: diag
:oneliner: Number of connections still to be closed


.. varnish_vsc:: n_used
:type: counter
:level: diag
:oneliner: Number of open connections


.. varnish_vsc:: opened
:type: counter
:level: diag
:oneliner: Connections opened

Connections opened successfully

This counter may be slightly inaccurate for performance reasons.


.. varnish_vsc:: closed
:type: counter
:level: diag
:oneliner: Connections closed

Connections closed


.. varnish_vsc:: recycle
:type: counter
:level: diag
:oneliner: Connections recycled

Connections kept open (cached) for later reuse


.. varnish_vsc:: recycle_fail
:type: counter
:level: diag
:oneliner: Connection recycles (Wait_Enter) failed


.. varnish_vsc:: helddown
:type: counter
:level: diag
:oneliner: Connection not attempted due to holddown

See parameters backend_local_error_holddown and
backend_remote_error_holddown.


.. varnish_vsc:: fail
:type: counter
:level: diag
:oneliner: Connections failed


Counter of failed opens. Detailed reasons are given in the
fail_* counters and in Debug VSL.

This counter is the sum of all detailled fail_* counters.

All fail_* counters may be slightly inaccurate for efficiency.

.. varnish_vsc:: fail_eacces
:type: counter
:level: diag
:oneliner: Connections failed with EACCES or EPERM


.. varnish_vsc:: fail_eaddrnotavail
:type: counter
:level: diag
:oneliner: Connections failed with EADDRNOTAVAIL


.. varnish_vsc:: fail_econnrefused
:type: counter
:level: diag
:oneliner: Connections failed with ECONNREFUSED


.. varnish_vsc:: fail_enetunreach
:type: counter
:level: diag
:oneliner: Connections failed with ENETUNREACH


.. varnish_vsc:: fail_etimedout
:type: counter
:level: diag
:oneliner: Connections failed ETIMEDOUT


.. varnish_vsc:: fail_other
:type: counter
:level: diag
:oneliner: Connections failed for other reason


.. varnish_vsc_end:: vcp

0 comments on commit dcafeed

Please sign in to comment.