Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshLoadBalancingStrategy support for RingHash and TCP traffic #12110

Open
lukidzi opened this issue Nov 26, 2024 · 0 comments
Open

MeshLoadBalancingStrategy support for RingHash and TCP traffic #12110

lukidzi opened this issue Nov 26, 2024 · 0 comments
Labels
kind/feature New feature triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@lukidzi
Copy link
Contributor

lukidzi commented Nov 26, 2024

Description

By design, we chose to support RING_HASH routing only for HTTP traffic. However, it is also possible to configure it for TCP traffic.

Use Case:
As a user, I want all requests from a specific source IP to route to the same instance of my database consistently.

Example Envoy configuration:

static_resources:
  listeners:
    - name: listener_0
      address:
        socket_address:
          address: 0.0.0.0
          port_value: 10000
      filter_chains:
        - filters:
            - name: envoy.filters.network.tcp_proxy
              typed_config:
                "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
                stat_prefix: tcp_stats
                cluster: service_ring_hash
                hash_policy:
                  - source_ip: {}

  clusters:
    - name: service_ring_hash
      connect_timeout: 0.25s
      type: STRICT_DNS
      lb_policy: RING_HASH
      load_assignment:
        cluster_name: service_ring_hash
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address: { address: 127.0.0.1, port_value: 9001 }
              - endpoint:
                  address:
                    socket_address: { address: 127.0.0.1, port_value: 9002 }
              - endpoint:
                  address:
                    socket_address: { address: 127.0.0.1, port_value: 9003 }
@lukidzi lukidzi added triage/pending This issue will be looked at on the next triage meeting kind/feature New feature labels Nov 26, 2024
@bartsmykla bartsmykla added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

2 participants