Skip to content

Research: Implement/Use L3 load-balancing in OpenStack #251

Closed

Description

@garloff

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

Activity

  1. added
    enhancement
    Container
    on Jan 17, 2023
  2. moved this from Backlog to Refined Stories in Sovereign Cloud Stackon Jan 17, 2023
  3. added
    IaaS
    and removed
    Container
    on Jan 18, 2023
  4. moved this from Refined Stories to Doing in Sovereign Cloud Stackon Jan 18, 2023
  5. garloff commented on Jan 18, 2023

    @garloff
    MemberAuthor

    Insight from @matofeder, @horazont, @ajfriesen, @joshmue and others definitely welcome!

  6. horazont commented on Jan 23, 2023

    @horazont
    Member

    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).

  7. matfechner commented on Feb 1, 2023

    @matfechner

    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

  8. moved this from Doing to Done in Sovereign Cloud Stackon Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

IaaSenhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions