AppLogic 2.4 Documentation The latest production release is AppLogic 2.8.9
SLA: Controller
Latest version: 1.1.2
| At a Glance |
| Catalog | Dynamic |
| Category | Application Controller |
| User volumes | yes |
| Min. memory | 256 MB |
| OS | Linux |
| Constraints | no |
| Questions/Comments | Ask Forum |
Functional Overview
SLA is an application controller which dynamically scales an application by starting and stopping other appliances within the application in accordance with a user defined policy. Policy enforcement relies on periodic assessment of counter values accessed through the mtr terminal. The mtr terminal is typically connected to the aux terminal of the MON appliance. SLA tracks the values of a single counter over a group of appliances.
The policy is configurable through a simple web interface (GUI) exposed by SLA. The GUI is accessed using the application IP and the configured SLA port. A policy comprises:
-
counter entity (i.e., CPU Summary)
-
counter name (i.e., CPU Total)
-
start value (i.e., 30)
-
stop value (i.e., 10)
-
trailing average period (i.e., 15 minutes)
SLA periodically calculates a trailing average for the counter by averaging the counter values of the running appliances in the appliance group over the trailing average period. When the trailing average passes the start value, SLA starts an appliance in the appliance group. When the trailing average passes the stop value, SLA stops an appliance in the appliance group.
SLA is typically used to start and stop individual web servers within the scalable web server appliances WEBx4/WEBx8 in response to HTTP request load.
SLA works only with MON appliances version 1.1.3 and above. To verify the version of any MON appliance in your application, right-click on the appliance and select view class.
Boundary
Resources
Terminals
| name | dir | prot. | description |
in | in | any | Exposes a web interface (GUI) for configuring the policy. All other network traffic not directed to the GUI is passed-through aux without modification. |
net | out | any | Output for accessing the grid in order to facilitate appliance start/stop. |
mtr | out | any | Output for accessing performance and resource data using the MON Data Collection Interface. |
log | out | cifs | Output to a network file system for storing operational logs. If this terminal is unconnected, logs are stored on the config volume. |
aux | out | any | Auxiliary output. Incoming traffic that is not directed to the GUI is sent through this terminal without modification. This terminal can be left unconnected. |
mon | out | cce | Used for performance and resource usage statistics. This terminal can be left unconnected. |
User Volumes
This volume is used to store:
- a private key file which provides authentication as a normal user on the grid controller
- the policy
- temporary files
- a log of SLA operations (provided the
log terminal is unconnected)
This volume should be 10MB in size. See Preparing for Use for information on setting up a private key on the config volume.
Properties
| name | type | description |
appliance_group | string | The group of appliances which SLA dynamically starts and stops. This is an appliance name excluding any trailing numbers. For example, a value of main.srv.srv indicates that SLA will start/stop appliances whose names begin with main.srv.srv (i.e., main.srv.srv1, main.srv.srv2, etc.) This property is mandatory. |
grid_ctl_ip | IP | IP address of the grid controller on which the application is running. This property is mandatory. |
port_no | integer | Port for accessing the web interface. The GUI is accessed through the application IP and this port. Default: 8080. |
username | string | User-name for web-based authentication. If empty, no authentication is performed. Default: empty |
password | string | Password for web-based authentication. This property is not used if username is empty. Default: empty |
logs_base_dir | string | Directory where logs are stored. This property has no affect if the log terminal is not connected. Default: / |
Performance
Additional resources do not affect performance.
Error Messages
The following messages may appear in either the appliance log file or the system log of the grid controller when the appliance fails to start:
- httpd did not start
- sla setup failed
- /var/www/html/.rc.local script is not executable
- /var/www/html/.rc.local script failed, ret=ret
Operational Constraints and Behavior
- SLA tracks the values of only a single counter (i.e. Total CPU Usage) for all the running appliances in the
appliance_group (i.e. web servers within a scalable web server appliance such as WEBx4 or WEBx8).
- When the trailing average of the counter falls outside of the configured range, SLA starts or stops an appliance in the
appliance_group.
- SLA never stops all appliances with the
appliance_group.
- If all appliances within the
appliance_group are running and the trailing average passes beyond the start value, SLA logs a message on the AppLogic Dashboard.
- Counter data is collected from the
mtr terminal every 5 seconds.
- Counter data is retained to an historical depth of 24 hours.
- Policy enforcement occurs once per minute.
- Once an appliance is started or stopped, policy enforcement does not resume until 6 minutes later.
Web Interface (GUI)
SLA exposes a web interface which is used to define the policy. This GUI is accessed using the application IP on the configured port port_no.
Above is an example of the GUI when it is first accessed. The Commit button commits the policy defined in the GUI for enforcement.
Above is an example of the GUI when a policy is being enforced. The graph shows the last 24 hours of policy enforcement and includes:
- a graph of the counter values averaged over the running appliances
- a graph of the
trailing average
- a graph of the number of running appliances in
appliance_group
- a horizontal line marking the
start value
- a horizontal line marking the
stop value
- a dashed vertical line marking the
trailing average period
The buttons at the top of the GUI are used to:
| button | action |
| Stop enforcement of the policy. While enforcement is stopped, SLA will not start or stop appliances in accordance with the policy. |
| Start enforcement of the policy. SLA resumes enforcement and will start and stop appliances in accordance with the policy. |
| Edit the policy. |
| Contract the graph width. |
| Expand the graph width. |
| Manually stop an appliance in appliance_group. |
| Manually start an appliance in appliance_group. |
Preparing to Use SLA in an Application
These steps must be taken before SLA can be used to dynamically start and stop appliances within an application. A step-by-step example is provided here.
- SLA must be able to authenticate on the grid controller as a normal user. To ensure this, create a public/private key pair in openssh format without a passphrase. Create a user on the grid whose public key corresponds to the generated public key. Put the generated private key file, with the name
grid.private.key, on the root of the config volume of the appliance.
Typical Usage
LampX4
The diagram below shows how SLA can be incorporated in the LampX4 reference application. The INSSL gateway properties are set to forward tcp traffic on port 8080 to its aux terminal. Pointing a browser at port 8080 of the LampX4 application IP or resolvable domain name brings up the web interface for SLA.
Note: the SLA appliance should not be connected directly between an IN gateway and the rest of the application, but rather to the aux terminal of an INSSL gateway.
A step-by-step example for setting up the LampX4 use case is provided here.
Notes and Links
Notes
- It is good practice to set the
username and password properties of SLA to prevent unauthorized users from accessing the SLA GUI.
- If SLA fails to start or stop an appliance in
appliance_group, a message is logged on the AppLogic Dashboard. SLA will not try to start or stop the failed appliance again until SLA has been re-started.
- On start SLA accesses the grid controller through its
net terminal. SLA must start after any appliance connected to its net terminal.
- SLA fails to start if any of these conditions is true:
- the property
grid_ctl_ip is incorrect
- the
grid.private.key file does not exist
- the
grid.private.key file does not authenticate on the grid controller
- the
appliance_group property does not resolve to two or more appliances within the application
Related Documents
Questions and Comments
To post a question about this appliance, visit our forum.
-- StephenQ - 17 Nov 2007
Copyright © 2005-2010 3tera, Inc. All Rights Reserved.