Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Enum
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • AbstractResource
  • Access
  • Algorithm
  • AllowedDomain
  • ConnectionLogging
  • ConnectionThrottle
  • ContentCaching
  • ErrorPage
  • HealthMonitor
  • LoadBalancer
  • Metadata
  • Node
  • NodeEvent
  • NonIdUriResource
  • Protocol
  • ReadOnlyResource
  • SessionPersistence
  • SSLTermination
  • Stats
  • UsageRecord
  • VirtualIp
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class Node

The nodes defined by the load balancer are responsible for servicing the requests received through the load balancer's virtual IP. By default, the load balancer employs a basic health check that ensures the node is listening on its defined port. The node is checked at the time of addition and at regular intervals as defined by the load balancer health check configuration. If a back-end node is not listening on its port or does not meet the conditions of the defined active health check for the load balancer, then the load balancer will not forward connections and its status will be listed as "OFFLINE". Only nodes that are in an "ONLINE" status will receive and be able to service traffic from the load balancer.

All nodes have an associated status that indicates whether the node is ONLINE, OFFLINE, or DRAINING. Only nodes that are in ONLINE status will receive and be able to service traffic from the load balancer. The OFFLINE status represents a node that cannot accept or service traffic. A node in DRAINING status represents a node that stops the traffic manager from sending any additional new connections to the node, but honors established sessions. If the traffic manager receives a request and session persistence requires that the node is used, the traffic manager will use it. The status is determined by the passive or active health monitors.

If the WEIGHTED_ROUND_ROBIN load balancer algorithm mode is selected, then the caller should assign the relevant weights to the node as part of the weight attribute of the node element. When the algorithm of the load balancer is changed to WEIGHTED_ROUND_ROBIN and the nodes do not already have an assigned weight, the service will automatically set the weight to "1" for all nodes.

One or more secondary nodes can be added to a specified load balancer so that if all the primary nodes fail, traffic can be redirected to secondary nodes. The type attribute allows configuring the node as either PRIMARY or SECONDARY.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Resource\BaseResource
Extended by OpenCloud\Common\Resource\PersistentResource
Extended by OpenCloud\LoadBalancer\Resource\Node
Namespace: OpenCloud\LoadBalancer\Resource
Located at OpenCloud/LoadBalancer/Resource/Node.php
Methods summary
public string
# name( )

returns the Node name

returns the Node name

Returns

string

Throws

NameError
public object
# createJson( )

Provides JSON for create request body

Provides JSON for create request body

Returns

object

Throws

RuntimeException

Overrides

OpenCloud\Common\Resource\PersistentResource::createJson()
protected
# updateJson( mixed $params = array() )

Provides JSON for update request body

Provides JSON for update request body

Overrides

OpenCloud\Common\Resource\PersistentResource::updateJson()
public OpenCloud\LoadBalancer\Resource\Metadata
# metadata( mixed $data = null )

Returns a Metadata item

Returns a Metadata item

Returns

OpenCloud\LoadBalancer\Resource\Metadata
public PaginatedIterator
# metadataList( )

Returns a paginated collection of metadata

Returns a paginated collection of metadata

Returns

PaginatedIterator
Methods inherited from OpenCloud\Common\Resource\PersistentResource
checkExtension(), create(), delete(), getAlias(), noCreate(), noDelete(), noUpdate(), refresh(), refreshFromLocationUrl(), update(), waitFor()
Methods inherited from OpenCloud\Common\Resource\BaseResource
__construct(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), jsonCollectionElement(), jsonCollectionName(), jsonName(), parseResponse(), primaryKeyField(), resourceName(), setMetadata(), setParent(), setService()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Properties summary
public mixed $id
#
public string $address
#

IP address or domain name for the node.

IP address or domain name for the node.

public integer $port
#

Port number for the service you are load balancing.

Port number for the service you are load balancing.

public string $condition
#

Condition for the node, which determines its role within the load balancer.

Condition for the node, which determines its role within the load balancer.

public string $status
#

Current state of the node. Can either be ONLINE, OFFLINE or DRAINING.

Current state of the node. Can either be ONLINE, OFFLINE or DRAINING.

public integer $weight
#

Weight of node to add. If the WEIGHTED_ROUND_ROBIN load balancer algorithm mode is selected, then the user should assign the relevant weight to the node using the weight attribute for the node. Must be an integer from 1 to 100.

Weight of node to add. If the WEIGHTED_ROUND_ROBIN load balancer algorithm mode is selected, then the user should assign the relevant weight to the node using the weight attribute for the node. Must be an integer from 1 to 100.

public string $type
#

Type of node to add:

Type of node to add:

  • PRIMARY: Nodes defined as PRIMARY are in the normal rotation to receive traffic from the load balancer.
  • SECONDARY: Nodes defined as SECONDARY are only in the rotation to receive traffic from the load balancer when all the primary nodes fail.
protected static boolean $json_name false
#
protected static string $json_collection_name 'nodes'
#
protected static string $url_resource 'nodes'
#
public array $createKeys array( 'address', 'port', 'condition', 'type', 'weight' )
#
Properties inherited from OpenCloud\Common\Resource\BaseResource
$metadata, $parent, $service
Properties inherited from OpenCloud\Common\Base
$aliases
PHP OpenCloud API API documentation generated by ApiGen 2.8.0