You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Research: Implement/Use L3 load-balancing in OpenStack #251
As a container cluster user (DevOps team), I want to use externalTrafficPolicy: local behind a Load-Balancer not only for better performance, but to be able to see the Client IP address in e.g. the ingress controller.
In our current reference implementation, this is not the case, as the internal IP of the load-balancer (octavia) will be seen by the service, not the real client IP.
The basic reason is that our octavia load-balancer works at layer 4 (haproxy) and terminates the TCP connection and a new one is created from the LB to the final destination. A L3 load-balancer would just route the packets from the original IP to the client, using things like BGP to do the magic. Google -- with Direct Server Return (and probably Azure) appear to be doing such magic and probably also the MetalStack.io folks.
This is different from the workaround with the Proxy protocol that we investigate in #250 to address the issue found when discussing #227. Prepared Loadbalancing Document SovereignCloudStack/standards#203
The assignment here is to research what options we have to do L3 load-balancing:
Can octavia do L3 load-balancing with the standard amphora driver?
(If no:) Does the OVN provider for octavia (as opposed to the amphora driver) have this capability?
If yes -- are there any reasons that keep us from using it? Can we address them?
If not, would it be conceivable that another provider be written to do this? Or does it fundamentally not fit into the octavia model or API?
Are there other LB options we should consider that support this?
Definition of Done:
there exists a document that gives an overview of the possibilities that have been evaluated
there exists a clear recommendation on how to do L3 load-balancing
Can octavia do L3 load-balancing with the standard amphora driver?
No, that uses haproxy, and haproxy is always layer 4 upward (unless I missed something major).
Or does it fundamentally not fit into the octavia model or API?
For proper source-address-preserving L3 loadbalancing you need to either:
Be on the default gateway, or
Encapsulate the traffic toward the backend (e.g. IPIP, GRE, Proxy Protocol or something like that)
I'm not sure if the Octavia API covers that (the former would require not talking about ports or LB IPs in the API, the second would require API calls to configure that).
Activity
garloff commentedon Jan 18, 2023
Insight from @matofeder, @horazont, @ajfriesen, @joshmue and others definitely welcome!
horazont commentedon Jan 23, 2023
No, that uses haproxy, and haproxy is always layer 4 upward (unless I missed something major).
For proper source-address-preserving L3 loadbalancing you need to either:
I'm not sure if the Octavia API covers that (the former would require not talking about ports or LB IPs in the API, the second would require API calls to configure that).
matfechner commentedon Feb 1, 2023
Does the OVN provider for octavia (as opposed to the amphora driver) have this capability?
in a simple testbed test
OVN is able to work as DSR shipped by octavia-provider ovn
Test in Testbed Scenario we using the listener address 192.168.200.27 with port 2222
we use the origin client ip 192.168.112.122
which represent in the logs Feb 1 06:20:12 cirros authpriv.notice dropbear[509]: Password auth succeeded for 'cirros' from 192.168.112.122:46756
well we need more tests to reproduce this in more complex realworld scenario