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

Traffic Splitting #6360

Open
8 of 10 tasks
Tracked by #29
jkotalik opened this issue May 13, 2022 · 1 comment
Open
8 of 10 tasks
Tracked by #29

Traffic Splitting #6360

jkotalik opened this issue May 13, 2022 · 1 comment

Comments

@jkotalik
Copy link
Contributor

jkotalik commented May 13, 2022

Overview

Traffic splitting is the ability to distribute traffic across two or more versions of an application. For example, I have container v1 and container v2 running inside of my application, and I want to evenly distribute traffic between the two containers.

Traffic splitting enables many interesting scenarios that will be required as Radius matures:

  • A/B traffic splitting
  • Manual rollbacks
  • Traffic splitting based off weight/percentages
  • Traffic splitting based off attributes of a request

And can lead to eventual patterns for:

  • Automatic rollbacks and rollouts based off health
  • Blue green deployment patterns

Current State

Currently today, if I have two containers that I want to equally split traffic to, whether the route be internal or external, there is no way to do that.

resource containerv1 'Applications.Core/Container@v1' = {
  name: 'containerv1'
  properties: {
    container: {
      image: 'myimage:v1'
      ports: {
        web: {
          containerPort: 80
          provides: sharedroute.id
        }
      }
    }
  }
}

resource containerv2 'Applications.Core/Container@v1' = {
  name: 'containerv2'
  properties: {
    container: {
      image: 'myimage:v2'
      ports: {
        web: {
          containerPort: 80
          provides: sharedroute.id
        }
      }
    }
  }
}

resource sharedroute 'Applications.Core/HttpRoute@v1' = {
  name: 'route'
}

In this example, I stated that the sharedroute is provided by both containerv1 and v2, I want traffic to be split between them in some manner. By default, this should split traffic with some default routing rule.

Work items

Infrastructure changes

For enabling traffic splitting, we should look into using Open Service Mesh (OSM). Open Service Mesh is a service mesh that is built on Envoy. It natively has the ability to support traffic splitting: https://release-v1-0.docs.openservicemesh.io/docs/guides/traffic_management/traffic_split/. OSM has the ability to do many other app model changes

Doc on the design of traffic splitting in OSM: https://github.com/servicemeshinterface/smi-spec/blob/v0.6.0/apis/traffic-split/v1alpha2/traffic-split.md

App model

See https://github.com/project-radius/app-model/issues/16 for the app model design.

For some of this app model work, we may need to support both the old way of doing type generation as well as the new for bicep types as the appcore RP isn't quite up and running yet.

  • Add OSM as a configuration option on the environment.
  • Add necessary properties to HTTPRoute and/or Gateway to support traffic splitting options
    • Support weights per backend
    • Support routes based off attributes of a request

Control plane changes

We will then need to make the changes necessary to generate the right CRDs s.t. OSM can use them.

  • Create TrafficSplit CRD to route traffic from one service to multiple backend services

Documentation and Samples

  • Sample E2E
  • Documentation in radius docs

AB#6870

@emily-potyraj
Copy link
Contributor

@ruokun-niu and @jkotalik, we're shipping this feature with v0.13, right? shall we move it out of the v0.12 iteration?

@willtsai willtsai transferred this issue from radius-project/radius Sep 19, 2023
@willtsai willtsai transferred this issue from another repository Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants