|
Summary: In context of the Deployment Descriptor, an SLA is a contractural service commitment describing the minimum performance criteria to meet while delivering a service.
OverviewThe definition of a SLA typically represents a contractual service commitment, describing the minimum performance criteria to meet while delivering a service. In this context the SLA element provides the means to specify low and high limits (defining an acceptable range) for a SLA with a given identifier. Additionally the SLA provides a mechanism to associate a SLA policy handler, which can be used to process policies specific to SLAs as they occur, taking specific actions appropriate for the ServiceBean.
SLA Policy HandlersThe Service Grid provides 3 SLA policy handlers. Additional policy handlers can be created by extending the policy handler class.
When a SeviceBean is instantiated by a GSC, the SLA element's ID is used to match a Watch that has been created by the ServiceBean, or declaratively created. If the SLA ID cannot be matched to a watch, the SLA will not be associated. Once associated the SLAPolicyHandler will be notified based on the thresholds that have been set. Sample SLA DeclarationAn example SLA declaration follows: <SLA ID="backlog" Low="100" High="500"> <PolicyHandler type="scaling" max="10" lowerDampener="3000" upperDampener="3000"/> </SLA> This SLA declares that a scaling policy handler be attached to a watch with the name of "backlog", that the number of services scale up to 10. This declaration also inlcudes lowerDampener and upperDampener configuration. The lowerDampener and upperDampener attributes have to do with the avoidance of oscillating around a threshold which is breached. These values behave as a smoothing filter, taking into account the reality that action on a threshold breach may need to be delayed. Behavior if Type is Relocation or Notify
Matching SLA to WatchThe SLA is not always tied to the SLA ID attribute for matching up to a Watch. By declaring the <Monitor> element within the scope of the <SLA> element, a Watch will be dynamically added, using the declared attributes to obtain the information needed to observe the declared SLA thresholds. The SLA will be associated to the name of the <Monitor> (which is a Watch). This is illustrated here: <SLA ID="backlog" Low="100" High="500"> <PolicyHandler type="scaling" max="10" lowerDampener="3000" upperDampener="3000"/> <Monitor name="collector" property="count" period="5000/ </SLA> The Monitor declaration tells the Service Grid runtime to create and register a watch with the name of "collector", reading the getCount method every 5 seconds.
Java Bean Getter MethodThe bean must declare a Java bean getter method that has as it's return type one of the following:
The read property return type is verified prior to watch creation. For example, given a bean called Foo, which declares a method called getCollector : public class Foo {
...
public long getCollector() {
return(value);
}
...
}
Defining Custom SLA WatcherIf you need to create a custom SLA watcher, use the Watch capability from the Rio project. The best way to do this with the M2 release is to use the Rio ServiceBean model.
To define a custom SLA Watcher:
RELATED TOPICS |
Wiki Content Tree
Your Feedback Needed!
We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Add Comment