Class LoadBalancer
A load balancer is a logical device which belongs to a cloud account. It is used to distribute workloads between multiple back-end systems or services, based on the criteria defined as part of its configuration.
- OpenCloud\Common\Base
- OpenCloud\Common\Resource\BaseResource
- OpenCloud\Common\Resource\PersistentResource
- OpenCloud\LoadBalancer\Resource\LoadBalancer implements OpenCloud\DNS\Resource\HasPtrRecordsInterface
Located at OpenCloud/LoadBalancer/Resource/LoadBalancer.php
public
|
#
addNode( string $address, integer $port, boolean $condition = OpenCloud\LoadBalancer\Resource\NodeCondition::ENABLED, string $type = null, integer $weight = null )
This method creates a Node object and adds it to a list of Nodes to be added to the LoadBalancer. This method will not add the nodes directly to the load balancer itself; it stores them in an array and the nodes are added later, in one of two ways: |
public
array
|
|
public
Guzzle\Http\Message\Response
|
|
public
|
#
addVirtualIp( string $type = OpenCloud\LoadBalancer\Resource\IpType::PUBLIC_TYPE, integer $ipVersion = null )
Adds a virtual IP to the load balancer. You can use the strings 'PUBLIC' or
'SERVICENET' to indicate the public or internal networks, or you can pass the
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
Guzzle\Http\Message\Response
|
#
createAccessList( array $list )
Creates an access list. You must provide an array of \stdClass objects, each of which contains `type' and `address' properties. Valid types for the former are: "DENY" or "ALLOW". The address must be a valid IP address, either v4 or v6. |
public
|
|
public
|
|
public
boolean
|
|
public
Guzzle\Http\Message\Response
|
|
public
boolean
|
|
public
Guzzle\Http\Message\Response
|
|
public
|
|
public
|
|
public
|
|
protected
object
|
|
protected
|
checkExtension(),
create(),
delete(),
getAlias(),
noCreate(),
noDelete(),
noUpdate(),
refresh(),
refreshFromLocationUrl(),
update(),
waitFor()
|
public
mixed
|
$id |
|
|
public
string
|
$name |
|
#
Name of the load balancer to create. The name must be 128 characters or less in length, and all UTF-8 characters are valid. |
public
string
|
$port |
|
#
Port of the service which is being load balanced. |
public
string
|
$protocol |
|
#
Protocol of the service which is being load balanced. |
public
array|Collection
|
$virtualIps | array() |
#
Type of virtual IP to add along with the creation of a load balancer. |
public
array|Collection
|
$nodes | array() |
#
Nodes to be added to the load balancer. |
public
Collection
|
$accessList |
|
#
The access list management feature allows fine-grained network access controls to be applied to the load balancer's virtual IP address. |
public
|
$algorithm |
|
#
Algorithm that defines how traffic should be directed between back-end nodes. |
public
|
$connectionLogging |
|
#
Current connection logging configuration. |
public
|
$connectionThrottle |
|
#
Specifies limits on the number of connections per IP address to help mitigate malicious or abusive traffic to your applications. |
public
|
$healthMonitor |
|
#
The type of health monitor check to perform to ensure that the service is performing properly. |
public
SessionPersistance
|
$sessionPersistence |
|
#
Forces multiple requests, of the same protocol, from clients to be directed to the same node. |
public
array| |
$metadata | array() |
#
Information (metadata) that can be associated with each load balancer for the client's personal use. |
public
integer
|
$timeout |
|
#
The timeout value for the load balancer and communications with its nodes. Defaults to 30 seconds with a maximum of 120 seconds. |
public
mixed
|
$created |
|
|
public
mixed
|
$updated |
|
|
public
mixed
|
$status |
|
|
public
mixed
|
$nodeCount |
|
|
public
mixed
|
$sourceAddresses |
|
|
public
mixed
|
$cluster |
|
|
protected static
string
|
$json_name | 'loadBalancer' |
|
protected static
string
|
$url_resource | 'loadbalancers' |
|
protected
array
|
$associatedResources | array(
'node' => 'Node',
'virtualIp' => 'VirtualIp',
'connectionLogging' => 'ConnectionLogging',
'healthMonitor' => 'HealthMonitor',
'sessionPersistance' => 'SessionPersistance'
) |
|
protected
array
|
$associatedCollections | array(
'nodes' => 'Node',
'virtualIps' => 'VirtualIp',
'accessList' => 'Access'
) |
|
protected
array
|
$createKeys | array(
'name',
'port',
'protocol',
'virtualIps',
'nodes',
'accessList',
'algorithm',
'connectionLogging',
'connectionThrottle',
'healthMonitor',
'sessionPersistence'
) |
$parent,
$service
|
$aliases
|