dev@glassfish.java.net

Re: Loadbalancer Commands Enhancement

From: satish viswanatham <Satish.Viswanatham_at_Sun.COM>
Date: Mon, 25 Sep 2006 17:34:08 -0700

Davis.

Thanks for sending this out. I was about to send out an email about
plans to not expose *configure-http-lb-config* and enhance
*create-http-lb* and* create-http-lb-config* commands. I added the
minutes of LB admin meeting (September 22nd) on glassfishwiki.org
<http://www.glassfishwiki.org/gfwiki/Wiki.jsp?page=LBAdminMeeting>.
Please send me email if I missed documenting anything there.

I forwarding your message to dev_at_glassfish, so that we can get feedback
on these CLI commands both internally and externally.

Davis Nguyen wrote:

> Hi Jane/Satish,
>
> As we discussed in the LB iteam meeting, here is what I think it would
> be useful for users to have, and also to make CLI to be more
> consistent with Admin GUI.
>
> *1.* One command that will create a lb-config and a
> loadbalancer-config (a combination of create-http-lb and
> create-http-lb-config command)
> For examples:
> -If a user wants to create a loabalancer named* *myBalancer and a
> lb_config named myBalancer_LB_CONFIG, then he only needs to type:
> * asadmin>create-http-lb --devicehost device_host_or_ip --deviceport
> device_port myBalancer*
> -If a user wants to create a loabalancer-config and for cluster1. Then
> the syntax is:
> *asadmin>create-http-lb --devicehost device_host_or_ip --deviceport
> device_port --target cluster1 myBalancer*
> For additional attributes & properties
> (responsetimeout,httpsrouting,reloadinterval,monitor,routecookie,sslproxyhost,sslproxyport),
> user can use either command create-http-lb-config or create-http-lb to
> set their values


This reduces steps for simple configurations. I support this change.
Prashant and Jane, can you please comment on this.

>
> *2.* One command that will create a loadbalancer-config, a lb-config,
> enable all server(s) and application(s) for the target, generate and
> export the loadbalancer.xml to the named file location. (this is what
> the GUI seems to have, everything in 1 creation step, even
> enable/disable for servers/applications still missing)
> *asadmin>configure-http-lb-config **--devicehost device_host
> --deviceport device_port **--target cluster1 --loadBalancer_name
> **myBalancer** [/home/user/loadbalanacer.xml]
>
> *

We want to deprecate this command. There is less need for this command
now, once we add *--enableAllInstances *and *--enableAllApplications
*options for *create-http-lb-config *command. Rather than using _4
commands_ ( create-http-lb-config, enable-http-lb-server,
enable-http-lb-application and export-http-lb-config) _only 2 commands
_(create-http-lb-config and export-http-lb-config) are needed to export
a loadbalancer.xml.

> *3.* One command that allow user to config policy, create
> health-checker and turn on/off application and servers for a target
> The current *create-http-lb-ref *command only allows user to enable
> AllInstances and AllApplications but not to disable them. In addition,
> user can not select a single application for enable/disable. If
> create-http-lb-ref command can be implemented in a more useful way,
> user probably will not need the 6 commands below
> enable-http-lb-server, disable-http-lb-server,
> enable-http-lb-application & disable-http-lb-application,
> create-http-health-checker & delete-http-health-checker
>
I also support the idea of adding health-checker information during
*create-http-lb-ref*. However we also should support
*create(delete)-health-checker* commands. I also propose that we adding
--weight option during *create-http-lb-ref*.

Correction here:

    * There is no need for disabling application or instances during
      create-http-lb-ref, because by default they are disabled.

> *4*. One command that will delete server/cluster-ref, lb-config and
> loadbalancer-config (current GUI allows user to delete lb-config,
> server/cluster-ref and loadbalancer-config in one click)
> *asadmin>delete-http-lb <load-balancer-name>*
>
More than one LB can be sharing a load balancer config. By default
delete-http-lb should just be deleting LB. If everything needs to be
deleted a new option can be added

delete-http-lb --force <lb-name>.

Even the option only deletes the lb-config, if and only if no other lbs
are pointing to the lb-config.

Once I received feedback, I will the plan for these CLI enhancements to
LB Admin module page <https://glassfish.dev.java.net/javaee5/lb-admin/>.

thanks
Satish

> Thanks,
> -davis