Re: Timed cookies

From: Krzysztof Oledzki <ole#ans.pl>
Date: Sun, 21 Oct 2007 03:08:15 +0200 (CEST)

On Sat, 20 Oct 2007, Willy Tarreau wrote:

>> Recommendations for Stats page:
>> If down include downtime (seconds or minutes) in addition to count.
>> (IE: Was this server unavailable 5 separate times totaling 10 minutes,
>> or 1 time totaling 5 hours).
>
> OK, that seems reasonable. It could be used to compute an SLA.
>
>> Last time a request came in (especially for hosts in backup mode, so I
>> can know if it's relatively safe yet to reload or not).
>
> Yes, I've already thought about that one for the same reason. I think
> that a simple field in human readable form would be enough, such as
> "5ms", "10s", "3m", "5h", "13d"....
>
>> If I get some spare time (HA!), I might try to implement patches for
>> the above, but I say that without looking at the code yet.
>
> Be careful, I don't want to add new features to 1.2.17, or minor
> features only. It's basically in fixes-only mode right now. However,
> adding 2 columns in the stats page in 1.3 is OK for me.

Funny, funny. I have been working on similar functionality for some time now. I was planing to push this patch yesterday (read as: before the midnight) but my initial version only calculated time since last status change. It was nearly a trivial joke to add what you described. So here it is, with small delay required by additional changes. ;)

This patch implements new statistics for SLA calculation by adding new filed 'Dwntime' with total down time since restart (both HTTP/CSV) and extending status filed (HTTP) or inserting a new one (CVS) with time showing how long each server/backend is in a current state. Additionaly, down transations are also calculated and displayed for backends, so it is possible to know how many times selected backend was down, generating "No server is available to handle this request." error.

New information are presentetd in two different ways:

I believe that seconds resolution is enough.

As there are more columns in the status page I decided to shrink some names to make more space:

Making described changes I also made some improvements and fixed some small bugs:

To prevent future mistakes I also added new 'END' field with '.', so now it is easy to check if there are no fields missing after new ones were added.

Best regards,

                                 Krzysztof Olędzki

Received on 2007/10/21 03:08

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET