On Mon, 28 Sep 2009, Willy Tarreau wrote:

Hi Krzysztof,

On Sun, Sep 27, 2009 at 09:36:19PM +0200, Krzysztof Piotr Oledzki wrote:
In my configuration there are several stats backends with different
proxies displayed and requiring to put the same name in each one
is not very nice. Finally, one day we might use node name for some
other purposes. Please also note that this option was implemented
very recently - the number of affected users should be very limited.

I have a problem with this change. Some users offer shared services
to their customers, and for them the node or description will be
per-proxy since their customers will only see one instance. For instance,
they would prefer to report "master" or "node 1/3" instead of "psrv432".
But the "master" or "node 1/3" role depends on the customer.

Right, I didn't think about such situation.

That said, I found that the global info was missing when dumping the
stats via the unix socket.

Ooops. ;)

So what we could do would be the following :

 - keep the global "node" and "description" as you did
 - keep the "show-node" and "show-desc" stats argument
 - add optional values after those arguments, allowing one to
   force the names for a customer.

Excellent idea.

So you could have this :

global
        node Paris
        description "This node is in bay 13, DC xxx, Paris, France"
...
backend cust-0003
        # report global values for this customer
        stats show-node
        stats show-desc
...
backend cust-0045
        # report specific values for this customer
        stats show-node "Europe"
        stats show-desc "Master node for Europe, Asia, Africa"

Would you be OK with such a solution ?

Sure, I'll make a v2 patch.

So, I'm tagging it [MEDIUM] instead of [MINOR] and keeping
the "node-name" option only to display a warning message.

You can leave it MINOR as no version was released with the node-name
value yet. I think it's just on my sites (as a test), so I will
notice it and fix it when I upgrade. Also in general, I prefer
that we don't report keywords which do not exist, because I did
that once (accidentely) and got questions about where to find
info about keyword XXX which did not appear in the doc.

OK.

Best regards,

                                Krzysztof Olędzki

Reply via email to