org.jclouds.elb.domain
Class HealthCheck

java.lang.Object
  extended by org.jclouds.elb.domain.HealthCheck

public class HealthCheck
extends Object

Elastic Load Balancing routinely checks the health of each load-balanced Amazon EC2 instance based on the configurations that you specify. If Elastic Load Balancing finds an unhealthy instance, it stops sending traffic to the instance and reroutes traffic to healthy instances.

Author:
Adrian Cole
See Also:
doc

Nested Class Summary
static class HealthCheck.Builder<T extends HealthCheck.Builder<T>>
           
 
Field Summary
protected  int healthyThreshold
           
protected  int interval
           
protected  String target
           
protected  int timeout
           
protected  int unhealthyThreshold
           
 
Constructor Summary
protected HealthCheck(int healthyThreshold, int interval, String target, int timeout, int unhealthyThreshold)
           
 
Method Summary
static HealthCheck.Builder<?> builder()
           
 boolean equals(Object obj)
          
 int getHealthyThreshold()
          Specifies the number of consecutive health probe successes required before moving the instance to the Healthy state.
 int getInterval()
          Specifies the approximate interval, in seconds, between health checks of an individual instance.
 String getTarget()
          Specifies the instance being checked.
 int getTimeout()
          Specifies the amount of time, in seconds, during which no response means a failed health probe.
 int getUnhealthyThreshold()
          Specifies the number of consecutive health probe failures required before moving the instance to the Unhealthy state.
 int hashCode()
          
protected  com.google.common.base.Objects.ToStringHelper string()
           
 HealthCheck.Builder<?> toBuilder()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

healthyThreshold

protected final int healthyThreshold

interval

protected final int interval

target

protected final String target

timeout

protected final int timeout

unhealthyThreshold

protected final int unhealthyThreshold
Constructor Detail

HealthCheck

protected HealthCheck(int healthyThreshold,
                      int interval,
                      String target,
                      int timeout,
                      int unhealthyThreshold)
Method Detail

builder

public static HealthCheck.Builder<?> builder()

toBuilder

public HealthCheck.Builder<?> toBuilder()

getHealthyThreshold

public int getHealthyThreshold()
Specifies the number of consecutive health probe successes required before moving the instance to the Healthy state.


getInterval

public int getInterval()
Specifies the approximate interval, in seconds, between health checks of an individual instance.


getTarget

public String getTarget()
Specifies the instance being checked. The timeout is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.

Note

TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case a healthcheck simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.
SSL is also specified as SSL: port pair, for example, SSL:5000.
For HTTP or HTTPS timeout, the situation is different. You have to include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy. The total length of the HTTP ping target needs to be 1024 16-bit Unicode characters or less.


getTimeout

public int getTimeout()
Specifies the amount of time, in seconds, during which no response means a failed health probe.

Note

This value must be less than the Interval value.


getUnhealthyThreshold

public int getUnhealthyThreshold()
Specifies the number of consecutive health probe failures required before moving the instance to the Unhealthy state.


hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object

string

protected com.google.common.base.Objects.ToStringHelper string()


Copyright © 2009-2012 jclouds. All Rights Reserved.