dev@glassfish.java.net

Re: Review of http-lb commands and some other questions....

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Thu, 24 Aug 2006 22:42:41 -0700

Satish Viswanatham wrote:
> vince kraemer wrote:
>
>> [snip]
>>
>> I can see why you want to automate the generation of the
>> loadbalancer.xml...
>>
>> Possible bad attribute name or a doc error:
>> disable-timeout-in-minutes... The doc says seconds.... (see lines 39
>> and 40 of
>> http://fisheye5.cenqua.com/browse/glassfish/admin-ee/lb-admin/dtds/sun-loadbalancer_1_2.dtd?r=1.1.1.1)
>>
>
> Filed a bug. bug# 6463768.

Good.

As an aside: Why aren't we filing this in issue tracker?
>
>> [snip] http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8h?a=view#abdht
>>
>> What command would be used to change the
>> response-timeout/HTTPS-routing/reload-interval/monitor/routecookie of
>> an established http-lb-config object?
>>
> Dotted name command. Hanan, we should document this use case too.

The usage of 'asadmin set' is alluded to in this doc,
http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8h?a=view. Their aren't
enough details for the user to be able to use it, without a fair bit of
digging/GF source level knowledge.
>
>> It seems like routecookie is not documented correctly....
>>
>> What happens if I use delete-http-lb-config, but do not delete the
>> loadbalancer.xml file from the machine that has the lb installed?
>
> It is not supposed to delete the lb file. delete-http-lb-config only
> removes the config object on DAS.

Is that true even if auto update is enabled?

But nothing bad will happen to the users who are accessing apps via an
LB'ed site that just had its http-lb-config object deleted on the DAS,
as long as the loadbalancer.xml file still exists, right?

I am very worried that the LB and DAS work "together" to make load
balancing "work"... This worry is triggered by the number of places in
the docs about the http-lb commands that the order of operations is
called out... For example: you must create-http-lb-ref, then enable it...

OR

You must disable something before you can delete it...

>
>> [snip]
>> I have a real problem mapping create-http-lb-ref to content in the
>> loadbalancer.xml....
>>
> Some of our users may also have the same problem of mapping the
> commands to loadbalancer.xml. I will work with docs to document this
> more in detail. Copying Hanan from docs.

Good.
>
> [snip]
>>
>> Which command allows me to set or change the policy attribute of the
>> cluster element?
>
> Policy support etc is added in 9.0, for example if you look at CLIs in
> 9.0
> http://appserver.sfbay/cgi-bin/body.pl?options=/as9ee/navigation.html&content=/as9ee/pm.html&curTab=2,
> you will get an idea. I will post them on GlassFish soon.
>
> create-http-lb-ref [--terse=false] [--echo=false] [--interactive=true] [-
> -host localhost] [--port 4849] [--secure|-s=true] [--user admin_user]
> [--passwor
> dfile file_name] [--lbpolicy policy] [--lbpolicymodule path-to-module]
> [--health
> checkerurl url] [--healthcheckerinterval interval-in-seconds]
> [--healthcheckerti
> meout timeout-in-seconds] [--lbenableallapplications]
> [--lbenableallinstances] -
> -config config_name target


Is this something that will be presented in more detail at a User
Experience session?

(It seems like there are a number of new features of http-lb that did
not get presented.)

Some topics the presentation might want to cover are things like:

What is a policy module? Is there an API that a policy module must
implement? Is there a DTD or schema that a policy module must conform to?

What are the semantics of --lbenableallinstances?

>
>>
>> [snip]
>>
>> Is the default disable-timeout-in-minutes really 31 or is it "session
>> idle timeout"+1?
>
> Default is 31. disable-timeout-in-minutes CDATA "31"

What will happen if the user changes the "session idle timeout" to be a
value like 60, after they have created their lbxml and used it to
configure their LB?
>
>>
>> Is the user required to execute disable-http-lb-server before they
>> can execute delete-http-lb-ref? The document strongly implies that
>> the user must do one then the other? Why is that? Why can't we give
>> the user a SINGLE command to delete the ref? [That command may
>> perform a disable "under the covers"]
>>
>> http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8h?a=view#abdhv
>
> We prefer do it explicitly on command and not to do "under the covers".

Why should we want to force the user to enter two commands instead of one???

I realize there are cases, like rolling upgrades, where the user needs
to do an explicit disable....

That implies that we must have a disable command... But it doesn't imply
that a user must disable, before they delete...

> Unless we hear lot of complaints from users that do it "under the
> covers".
>
>>
>> Is there a way to enable all the servers in a config with just one
>> command? Something like:
>>
>> asadmin enable-http-lb-servers <config object name>
>>
>> or
>>
>> asadmin enable-http-lb-server -config <config object name>
>>
> Yes, during asadmin create-http-lb-ref --lbenableallinstances
> --config config_name target and asadmin create-http-lb-ref.

I am lost here...

Say I have an http-lb-config (Z) with 3 instances or clusters (a, b, c)
already created...

How would I use create-http-lb-ref to enable them all at one time? Is
there an example someplace?
>
>> It seems like the only way to do this today is to enter an
>> enable-http-lb-server command for each server or cluster that may be
>> in the config... That seems like it would be error prone... (people
>> forgetting to enable an instance or cluster)...
>>
>> The same comment would apply to disable.
>>
>> http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8h?a=view#abdhw
>>
>> I have a similar question/suggestion for applications as the one I
>> just made for servers...
>>
>> It looks like enable-http-lb-application implies a
>> create-http-lb-application operation (adds a web-module entry into
>> the http-lb-config...). How do I delete a web-module entry from an
>> http-lb-config? Is there a remove-http-lb-application command that I
>> missed?
>>
>> What command is used to set/change the attributes of a web-module
>> element?
>>
>> What happens if the user undeploys an app that is enabled for load
>> balancing?
>>
>> http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8h?a=view#abdhx
>
> This is an existing RFE (# 6463784)

Which of my previous questions is an RFE?
>
>>
>> How do I change the value of the properties that were used/defaulted
>> when I created a health-checker?
>>
> Using the dotted name commands. Hanan, we should include this in the
> docs.

+1
>
>> It looks like the health-checker has additional properties, like
>> active-healthcheck-enabled that are set via the property sub-element
>> of loadbalancer... Why doesn't the health-checker element have a
>> property sub-element for them?
>
> These 2 properties are global to loadbalancer, not specific to a
> particular health-checker.

Which is why they are documented in the section discussing the
health-checker element?

vbk