Load Balancer API
v1

Introduction

Load Balancer is a highly available, fully-managed type of instances which allows to scale your applications and ensure their availability. It provides a special public IP address which is always reachable: even if we experience a hardware failure, we will reroute this address to a backup instance, which is pre-configured in advance. You can use this address for your frontends, and the incoming sessions will be balanced between your backend servers.

You can add as many servers to your backends as your needs require. This allows to scale your applications on demand, e. g. increase the capacity of a web-site for high-usage periods and decrease it when your customers are on vacation.

Load Balancer can monitor the availability of your backend servers, detect that one of them is not available anymore, and rebalance the load between the rest of the servers thus making your applications always available to users.

Technical Limitations

  • TLS/SSL offload is not supported yet. To balance HTTPS sessions use TCP mode.
  • Your Load Balancer external highly available IP address can only be IPv4. You can, however, use IPv6 between Load Balancer and backend servers.

Each Load Balancer is configured with one or several frontends. Each frontend listens to a configured port and has one or many backends, associated with it, to witch it forwards the flows.

Master and Backup Load Balancers

Each Load Balancer is implemented with two instances: master and backup, which provide active/passive hight availability. These instances are synchronously preconfigured, so if the master fails, the backup is always ready to handle the traffic. There is no stateful connection synchronization between master and backup, so all long-living sessions must be reestablished in case of a switchover.

Master and backup are running on different hardware clusters to insure that they don't share physical resources and minimize the risk of a simultaneous failure.

IP address, which the frontend listens to, is a little bit more than just a simple IP address. It is a special highly available address, which is, by default, routed to the master Load Balancer instance. Should the master instances experience a failure, this address is automatically rerouted to the backup one. This action is taken automatically by the Load Balancer control subsystems, so it is transparent to the user.

Highly available IP is automatically created by default, when a Load Balancer is created. It can also be conserved when an LB is deleted and reused later. See CreateLb and DeleteLb API calls documentation for more details on how to do this.

Only one highly available IP per Load Balancer is currently supported. By this time it can only be IPv4, IPv6 support will come later.

Backend is a list of servers between which the flows of a given frontend are balanced. In addition to that backend has multiple parameters like session timeouts, protocol type, associated health-checks etc.

Backend servers can fail. One of the main features of the Load Balancer is to monitor their availability and, in case of a failure, redirect new flows between the active servers in the pool. Health check objects are used to detect backend servers failures. Each health check is an availability test specification, which defines how you determine that a backend server is "Up" or "Down". It can be a given number of missing ICMP echo replies or an unsuccessful HTTP request of a given URL.

For the full list of supported health check types see UpdateHealthCheck

Below you will find a step by step guide on how to create and delete your Load Balancer, add frontends and backends, and configure health checks.

In order to use Scaleway API you need to have curl installed. It is also a good idea to have jq, which will help you to read and parse JSON output. Make sure you have these two tools before you begin. Otherwise use your package manager to install them.

To call Scaleway API, you need an X-Auth-Token. If you don't have one yet, you can create it on the credentials page of your Scaleway account.

Using this token, get your organization ID:

export TOKEN="<Secret key of your token>"
REGION="<choose your location (nl-ams/fr-par)>"

curl -H "X-Auth-Token: $TOKEN" https://account.scaleway.com/organizations | jq '.organizations[] | "orga_id: " + .id + " orga_name: " + .name'

ORGANIZATION_ID="<your organization ID>"

You can also find your organization ID in new version of the Scaleway web console.

Customize the name, description, tags and set your organization ID

curl -X POST "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs" -H "accept: application/json" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d "{\"description\":\"YOUR DESCRIPTION\",\"name\":\"TEST\",\"organization_id\":\"$ORGANIZATION_ID\",\"tags\":[\"test\", \"step by step\"]}"

Copy the id field of the response to use at the next steps. For the sake of simplicity we will save the ID to a variable, which we will use in the following examples:

export LB_ID="<your load balancer id>"

To destroy a Load Balancer use the following call:

curl -s -H "X-Auth-Token: $TOKEN" -X DELETE "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID" -H "Content-Type: application/json" -d "{\"release_ip\": false}"

It normally takes less than a second to provision a load balancer, but you always can check the status with the following call.

curl -s "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID" -H "accept: application/json" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" | jq .

In the reply, you will find:

  • instances: details of your load balancer cluster status. If both instances have the ready status, it means that the cluster if fully operational and highly available. If one of the instances fail, your traffic will be switched to the other.
  • ip_address: This is the public highly available IP address. Use this address as the front-end of your highly availably services.

In order to create a backend you need to customize the following parameters:

  • forward_port load balancer with forward user sessions to this port. For example, you can use port 8080 on a backend, while your front-end port is 80.
  • forward_port_algorithm string value, specifying of of the following options:
    • "roundrobin" new sessions are balanced equally between the backend servers;
    • "leastconn" will take into account the number of active sessions, established to each of the servers, and will forward new ones to the server, which has the least.
  • server_ip : A list of IPv4 or IPv6 address of your Scaleway or Online.net servers to.

Other backend parameters are documented here: CreateBackend

curl -s -X POST "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID/backends" -H "accept: application/json" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d "{\"forward_port\":80,\"forward_port_algorithm\":\"roundrobin\",\"forward_protocol\":\"tcp\",\"health_check\":{\"check_delay\":2000,\"check_max_retries\":3,\"check_timeout\":1000,\"port\":80,\"tcp_config\":{}},\"name\":\"main backend\",\"send_proxy_v2\":false,\"server_ip\":[\"<REPLACE-BY-IP-OF-YOUR-SERVER1>\", \"<REPLACE-BY-IP-OF-YOUR-SERVER2>\"]} | jq ."

Save the id field of the reply.

export $BACKEND_ID="<ID of your backend>"

If you want to delete a backend, this is how it can be done.

curl -H "X-Auth-Token: $TOKEN" -X DELETE "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID/backends/$BACKEND_ID"

Creating a frontend is straight-forward. You need to know the IDs of a load balancer and an existing frontend, then specify the inbound_port, on which the frontend will listen for incoming connections. You can also customize the protocol and client timeout. For more details on these options see the CreateFrontend call documentation.

Main fields:

  • backend_id link your frontend to the backend where the traffic will be redirect
  • inbound_port accept connections from this port
curl -X POST "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID/frontends" -H "accept: application/json" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d "{\"backend_id\":\"$BACKEND_ID\",\"inbound_port\":80,\"inbound_protocol\":\"tcp\",\"name\":\"main frontend\",\"timeout_client\":5000}"

Save the id field of the reply.

export $FRONTEND_ID="<ID of your frontend>"

You can delete a frontend using the following API call

curl -H "X-Auth-Token: $TOKEN" -X DELETE "https://api-world.scaleway.com/lb/v1/regions/$REGION/lbs/$LB_ID/frontends/$FRONTEND_ID"

Choose in which location you want deploy your load balancer

NameAPI ID
Parisfr-par
Amsterdamnl-ams

Main Load Balancer object

GET
/lb/v1/regions/{region}/lbs
Path Parameters
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
nullable string
Use this to search by name.
string
Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.
nullable string
number
Page number. The default value is 1.
number
Page size. The default value is 20.
Request Example
Comming Soon
array
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
Response Example
{
"lbs": [
{
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
}
],
"total_count": 42
}
POST
/lb/v1/regions/{region}/lbs
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required string
Resource description.
nullable string
Just like for compute instances, when you destroy a Load Balancer, you can keep its highly available IP address and reuse it for another Load Balancer later.
required string
Resource names.
required string
Owner of resources.
array
List of keyword.
Request Example
{
"description": "string",
"ip_id": "string",
"name": "string",
"organization_id": "string",
"tags": [
"string"
]
}
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
Response Example
{
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
}
GET
/lb/v1/regions/{region}/lbs/{lb_id}
required string
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
Response Example
{
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
}
PUT
/lb/v1/regions/{region}/lbs/{lb_id}
required string
Load Balancer ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required string
Resource description.
required string
Resource name.
array
List of keywords.
Request Example
{
"description": "string",
"name": "string",
"tags": [
"string"
]
}
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
Response Example
{
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
}
DELETE
/lb/v1/regions/{region}/lbs/{lb_id}
required string
Load Balancer ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
boolean
Set true if you don't want to keep this IP address.
Request Example
Comming Soon
Empty response

Load Balancer frontend objects

GET
/lb/v1/regions/{region}/frontends/{frontend_id}
required string
Frontend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
object
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
(in milliseconds).
Response Example
{
"backend": {
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
},
"id": "string",
"inbound_port": 42,
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"timeout_client": 42
}
PUT
/lb/v1/regions/{region}/frontends/{frontend_id}
required string
Frontend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required string
Backend ID.
required number
TCP port to listen on the front side.
required string
Resource name.
Client session maximum inactivity time (in milliseconds).
Request Example
{
"backend_id": "string",
"inbound_port": 42,
"name": "string",
"timeout_client": 42
}
object
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
(in milliseconds).
Response Example
{
"backend": {
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
},
"id": "string",
"inbound_port": 42,
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"timeout_client": 42
}
DELETE
/lb/v1/regions/{region}/frontends/{frontend_id}
required string
Frontend ID to delete.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
Empty response
GET
/lb/v1/regions/{region}/lbs/{lb_id}/frontends
required string
Load Balancer ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
nullable string
Use this to search by name.
string
Response order. Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.
required number
Page number. The default value is 1.
number
Set the maximum list sizes. The default value is 20.
Request Example
Comming Soon
List frontends object of your loadbalancer.
object
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
(in milliseconds).
total count, wihtout pagination.
Response Example
{
"frontends": [
{
"backend": {
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
},
"id": "string",
"inbound_port": 42,
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"timeout_client": 42
}
],
"total_count": 42
}
POST
/lb/v1/regions/{region}/lbs/{lb_id}/frontends
required string
Load Balancer ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required string
Backend ID.
required number
TCP port to listen on the front side.
required string
Resource name.
Set the maximum inactivity time on the client side (in milliseconds).
Request Example
{
"backend_id": "string",
"inbound_port": 42,
"name": "string",
"timeout_client": 42
}
object
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
(in milliseconds).
Response Example
{
"backend": {
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
},
"id": "string",
"inbound_port": 42,
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"timeout_client": 42
}

Load Balancer backend objects

GET
/lb/v1/regions/{region}/backends/{backend_id}
required string
Backend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
Response Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
PUT
/lb/v1/regions/{region}/backends/{backend_id}
required string
Backend ID to update.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required number
User sessions will be forwarded to this port of backend servers.
required string
Load balancing algorithm. Possible values are leastconn and roundrobin. The default value is roundrobin.
required string
Backend protocol. TCP or HTTP. Possible values are http and tcp. The default value is tcp.
required string
Resource name.
Modify what occurs when a backend server is marked down. Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
Enables PROXY protocol version 2 (must be supported by backend servers).
required string
Enable cookie-based session persistence. Possible values are cookie, none and table. The default value is none.
Maximum initial server connection establishment time (in milliseconds).
Maximum server connection inactivity time (in milliseconds).
Maximum tunnel inactivity time (in milliseconds).
Request Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
Response Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
DELETE
/lb/v1/regions/{region}/backends/{backend_id}
required string
ID of the backend to delete.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
Empty response
PUT
/lb/v1/regions/{region}/backends/{backend_id}/healthcheck
required string
Backend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required number
Time between two consecutive health checks (in milliseconds).
required number
Number of consecutive unsuccessful health checks, after wich the server will be considered dead.
required number
Additional check timeout, after the connection has been already established (in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older version, please use TCP check.
string
string
required number
Specify the port used to health check.
The response is analyzed to find the +PONG response message.
Request Example
{
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
}
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
Response Example
{
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
}
POST
/lb/v1/regions/{region}/backends/{backend_id}/servers
required string
Backend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required array
Set all IPs to remove of your backend.
Request Example
{
"server_ip": [
"string"
]
}
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
Response Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
PUT
/lb/v1/regions/{region}/backends/{backend_id}/servers
required string
Backend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required array
Set all IPs to add of your backend and remove all other.
Request Example
{
"server_ip": [
"string"
]
}
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
Response Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
DELETE
/lb/v1/regions/{region}/backends/{backend_id}/servers
required string
Backend ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
required array
Set all IPs to remove of your backend.
Request Example
{
"server_ip": [
"string"
]
}
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
Possible values are on_marked_down_action_none and shutdown_sessions. The default value is on_marked_down_action_none.
array
Possible values are cookie, none and table. The default value is none.
(in milliseconds).
(in milliseconds).
(in milliseconds).
Response Example
{
"forward_port": 42,
"forward_port_algorithm": "roundrobin",
"forward_protocol": "tcp",
"health_check": {
"check_delay": 42,
"check_max_retries": 42,
"check_timeout": 42,
"http_config": {
"code": 42,
"method": "string",
"uri": "string"
},
"ldap_config": {},
"mysql_config": {
"user": "string"
},
"pgsql_config": {
"user": "string"
},
"port": 42,
"redis_config": {},
"tcp_config": {}
},
"id": "string",
"lb": {
"backend_count": 42,
"description": "string",
"frontend_count": 42,
"id": "string",
"instances": [
{
"id": "string",
"ip_address": "string",
"region": "string",
"status": "unknown"
}
],
"ip": [
{
"id": "string",
"ip_address": "string",
"lb_id": "string",
"organization_id": "string",
"region": "string",
"reverse": "string"
}
],
"name": "string",
"organization_id": "string",
"region": "string",
"status": "unknown",
"tags": [
"string"
]
},
"name": "string",
"on_marked_down_action": "on_marked_down_action_none",
"pool": [
"string"
],
"send_proxy_v2": "boolean",
"sticky_sessions": "none",
"sticky_sessions_cookie_name": "string",
"timeout_connect": 42,
"timeout_server": 42,
"timeout_tunnel": 42
}
GET
/lb/v1/regions/{region}/lbs/{lb_id}/backends
required string
Load Balancer ID.
required string
Possible values are fr-par and nl-ams.
Request Example
Comming Soon
nullable string
Use this to search by name.
string
Choose order of response. Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.
required number
Page number. The default value is 1.
number
Set the maximum list sizes. The default value is 20.
Request Example
Comming Soon
List Backend objects of a Load Balancer.
Possible values are leastconn and roundrobin. The default value is roundrobin.
Possible values are http and tcp. The default value is tcp.
(in milliseconds).
(in milliseconds).
nullable number
string
string
The response is analyzed to find an LDAPv3 response message.
The check requires MySQL >=3.22, for older versions, use TCP check.
string
string
number
The response is analyzed to find the +PONG response message.
string
object
string
string
string
string
Possible values are error, locked, pending, ready, stopped and unknown. The default value is unknown.
array
string
nullable string
string
string
string
string