monitoringRef | reference to MonitoringWorkspace | | | | Optional MonitoringWorkspace to send L3/L4/L7 flow and latency telemetry to. |
vpcRef | reference to VPC | yes | | | The VPC the nodes and the backends are on. Cannot be changed. |
level | string (one of) | | "l4" | l3, l4, l7 | l3 forwards IP packets per flow; l4 balances TCP connections and UDP datagrams on listeners; l7 balances HTTP requests. Cannot be changed. |
algorithm | string (one of) | | | roundRobin, leastConnections, hash | roundRobin (weighted), leastConnections (active connections per weight) or hash (consistent hashing on hashKey). Defaults to roundRobin; l3 always hash. |
hashKey | string | | | up to 80 characters | For hash: source, flow (default for l3 and l4), header:<Name> or cookie:<name> (l7 only). |
protocols | list of string | | | up to 4 items | l3: which IP protocols are forwarded. Defaults to all. |
listeners | list of object | | | up to 8 items | l4 and l7: the ports the balancer accepts on. |
listeners[].name | string | | | up to 63 characters | Name of the listener, unique; defaults to <protocol>-<port>. |
listeners[].protocol | string (one of) | yes | | tcp, udp, http | Protocol the listener accepts. |
listeners[].port | integer | yes | | 1 to 65535 | Port the listener accepts on. |
listeners[].targetPort | integer | | | 1 to 65535 | Port to connect to on the backend; defaults to port. |
backends | list of object | | | up to 64 items | Where traffic goes: processes, VPC members or addresses. |
backends[].name | string | | | up to 63 characters | Name of the backend, unique in the balancer; defaults to b<index>. |
backends[].processRef | object | | | | A Compute process: traffic goes to its first interface on the VPC. |
backends[].processRef.name | string | yes | | length 1 to 63 | Name of the process. |
backends[].accountRef | object | | | | A VPC member (Account). |
backends[].accountRef.name | string | yes | | length 1 to 63 | Name of the account. |
backends[].address | string | | | up to 45 characters | An IPv6 or IPv4 address literal. IPv4 only when the VPC has an IPv4 network. |
backends[].port | integer | | | 1 to 65535 | The backend's port. Defaults to the listener's targetPort. |
backends[].weight | integer | | 1 | 0 to 256 | Share of the traffic. 0 drains: no new flows, existing ones continue. |
backends[].databaseRef | object | | | | A Database of this project: traffic goes to the node that has the role now (so it follows a failover). The port defaults to the database port. |
backends[].databaseRef.name | string | yes | | length 1 to 63 | Name of the database. |
backends[].databaseRef.role | string (one of) | yes | | primary, replicas | primary (the node that accepts writes) or replicas (the read-only nodes, else the primary). |
backends[].brokerRef | object | | | | A MessageBroker of this project: traffic goes to the node(s) that serve now. The port defaults to the first protocol port the node offers. |
backends[].brokerRef.name | string | yes | | length 1 to 63 | Name of the message broker. |
backends[].brokerRef.role | string (one of) | yes | | serving, endpoints | serving (the node that serves now) or endpoints (every node). |
healthCheck | object | | {} | | How backends are probed. A backend is Up after healthyThreshold successes in a row and Down after unhealthyThreshold failures in a row. |
healthCheck.protocol | string (one of) | | | tcp, http, icmp, none | tcp connects; http requests path and expects a 2xx or 3xx answer; icmp pings; none never probes. Defaults to icmp for l3 and tcp otherwise. |
healthCheck.port | integer | | | 1 to 65535 | Port to probe; defaults to the backend's port. |
healthCheck.path | string | | "/" | up to 512 characters | Path for http probes. |
healthCheck.intervalSeconds | integer | | 5 | 1 to 300 | Seconds between probes. |
healthCheck.timeoutSeconds | integer | | 2 | 1 to 60 | Seconds before a probe fails. |
healthCheck.healthyThreshold | integer | | 2 | 1 to 10 | Successes in a row to become Up. |
healthCheck.unhealthyThreshold | integer | | 3 | 1 to 10 | Failures in a row to become Down. |
nodes | integer | | 1 | 1 to 5 | How many nodes run the data plane. Each has its own address; any node accepts any traffic and they agree on every choice. |
affinityGroup | string | | | up to 63 characters | Run the nodes on the same host as every other process of the project with this affinity group (for example the backends the balancer reaches while no path joins two hosts). Without it the nodes are spread over different hosts. |
maxNodes | integer | | | 1 to 5 | The most nodes the platform may run by itself. When the nodes refuse connections (condition Saturated) the platform raises spec.nodes by one, with a cooldown, up to this number. Unset, it never changes spec.nodes. |
resources | object | | {} | | What each node may use. |
resources.memoryPower | integer | | 6 | 0 to 10 | Memory per node: 64 KiB times two to this power (6 is 4 MiB). |
resources.cpuMillicores | integer | | 250 | 1 to 1000 | Processor time per node on average, in thousandths of a core. |