Skip to content

Load balancers ​

Not open to customers yet

The load balancer endpoints are currently reserved for Anikeen staff: customer tokens get 403 on all of them. They are documented here for completeness and will be opened later.

Load balancers with their backends (server pools), frontends (listeners) and routing rules (scope console-load-balancers beta, or user / user:read / products:read).

MethodPath
GET/load-balancerslist
GET/load-balancers/{load_balancer}one, with its frontends and backends
GET, POST/load-balancers/{load_balancer}/backendslist, create backends
GET, PUT, DELETE/load-balancers/{load_balancer}/backends/{backend}read (with its servers), change, delete
POST/load-balancers/{load_balancer}/backends/{backend}/serversadd a server to a backend
PUT, DELETE/load-balancers/{load_balancer}/backends/{backend}/servers/{server}change, remove
POST/load-balancers/{load_balancer}/frontendscreate a frontend
PUT, DELETE/load-balancers/{load_balancer}/frontends/{frontend}change, delete
POST/load-balancers/{load_balancer}/frontends/{frontend}/backendsadd a routing rule
PUT, DELETE/load-balancers/{load_balancer}/frontends/{frontend}/backends/{pivot}change, delete a routing rule
POST/load-balancers/{load_balancer}/frontends/{frontend}/bindsadd a bind (address and port)
PUT, DELETE/load-balancers/{load_balancer}/frontends/{frontend}/binds/{bind}change, delete

Nested objects only resolve within their parent: a backend of another load balancer answers 404.

How the parts fit together ​

text
client ──▶ frontend (binds: address:port, mode http|tcp)
              │  routing rules: if/unless <condition> → backend
              │  default backend
              ▼
           backend (mode, balance) ──▶ servers (address:port, health check)

Backends ​

FieldRules
moderequired, http or tcp
balancerequired, roundrobin
descriptionoptional
bash
curl -X POST https://console.anikeen.com/api/v1/load-balancers/01JC…/backends \
  -H "Authorization: Bearer $ANIKEEN_TOKEN" -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"mode":"http","balance":"roundrobin","description":"web"}'

A backend that is the default backend of a frontend cannot be deleted (409).

Backend servers ​

FieldRules
addressrequired
portrequired, integer
checkoptional boolean: health check on

Frontends ​

FieldCreateChange
moderequiredrequiredhttp or tcp
descriptionoptionaloptional
load_balancer_backend_idoptionaloptionalthe default backend
inspect_sni_capability-optionaltcp frontends only: route TLS traffic by its SNI host name

Binds ​

Where the frontend listens:

FieldRules
addressrequired
portrequired, integer

Routing rules ​

A routing rule sends matching requests of a frontend to a backend:

FieldRules
load_balancer_backend_idrequired, the target backend
condrequired, if or unless
cond_testrequired, the condition; {hostname} is replaced with hostname
hostnamerequired
json
{"load_balancer_backend_id": "01JC…", "cond": "if", "cond_test": "{ req.hdr(host) -i {hostname} }", "hostname": "www.example.com"}

Creating a rule answers 204. The Console itself uses { req.hdr(host) -i {hostname} } for http frontends and { req_ssl_sni -i {hostname} } for tcp frontends with SNI inspection.

Anikeen Console documentation