Load Balancing
On this page
The load balancing in Oakestra consists of a multistep address conversion protocol using semantic addresses as part of an overlay network.
Semantic Addressing
The semantic addressing happens on the service layer. Similar to a cluster IP in Kubernetes, these addresses reference all the instances (replicas) of a microservice with a single address. This address does not change when scaling up the instances or when migrating them. Unlike the Kubernetes cluster IP, when deploying a service in Oakestra, the platform provides as many Service IP addresses as the number of balancing policies supported (and active) within the platform.
Example
A developer can communicate with any instance of Service B either with Round Robin balancing policy or the Closest balancing policy. The former balances the traffic evenly between all the instances, and the latter finds the geographically closer instance.
Click on the following tabs to see how every request is handled.
Reminder
Currently the IPv6 Closest balancing strategy IP addresses (reserved, but not implemented)
are in the fdff:1000::/21
subnet, and IPv6 Round Robin in fdff:2000::/21
. In IPv4, both balancing
strategies take their IPs from the 10.30.0.0/16
subnet. For further information, take a look at the
IPv4 or IPv6 address space documentation pages.
Mixing IP protocols
6to4 or 4to6 service translation is not supported (yet).
Why do we need Instance IPs?
Instance IPs represent a service’s instance uniquely within the platform. Even when the instance migrates toward new devices, the Instance IP always represents the instance and not the machine where the instance is deployed. The Instance IP is the foundation that enables an overlay network that abstracts services from machines.
When forwarding the packet, the proxy uses the sender’s Instance IP in the from
header field of the packet.
This way, any response or connection-oriented protocol can transparently work, and we guarantee the original
sender receives the response.
Why Service IPs? Why do we need multiple balancing policies?
At the Edge, Oakestra’s net component enables flexibility in the way developers can balance the traffic without the requirement of adapting the code. Just by using a Service IP instead of a regular IP, a developer can achieve balancing by using any protocol based on UDP or TCP and can also customize the balancing behavior of each request accordingly to their need. Edge computing brings resources closer to the users, so one might need to forward some traffic with very low latency using Closest balancing policy, or one might just want to evenly balance another endpoint with Round Robin policy.