-
Couldn't load subscription status.
- Fork 15
Join load balancers
Emiliano Ticci edited this page Dec 5, 2013
·
1 revision
You can easily join a local load balancer using the following syntax:
config.vm.provider :softlayer do |sl|
...
sl.join_load_balancer :vip => "1.1.1.1", :port => 443 do |service|
service.destination_port = 443
service.weight = 2
end
endThe join_load_balancer directive takes some arguments and a block. Arguments are for service group configuration, instead the block is for service configuration.
NOTE:
You can't join load balancers from private-only machines.
Available service group parameters are:
| Parameter | Description | Possible Values | Default |
|---|---|---|---|
:method |
Routing method | Routing methods | Round Robin |
:port |
Virtual port | Any port number | |
:type |
Routing type | Routing types | TCP |
:vip |
Virtual IP address | Any IP address |
Available service parameters are:
| Parameter | Description | Possible Values | Default |
|---|---|---|---|
:destination_port |
TCP port on the node | Any port number | |
:health_check |
Service health check | Health checks | Ping |
:weight |
Service weight | 0-100 | 1 |
The directive can be specified multiple times for joining the machine to multiple load balancers/service groups.
Currently allocations are equally balanced between service groups. Service groups are created on the fly when necessary, and removed when empty.
Consistent Hash IPInsert CookieLeast ConnectionsLeast Connections With Inserted CookieLeast Connections With Persistent IPPersistent IPRound RobinRound Robin With Inserted CookieRound Robin With Persistent IPShortest ResponseShortest Response With Inserted CookieShortest Response With Persistent IP
DNSFTPHTTPHTTPSTCPUDP
DefaultDNSHTTPHTTP-CustomPingTCP