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

Support arbitrary traffic splitting #1132

Closed
deliahu opened this issue Jun 16, 2020 · 0 comments · Fixed by #1213
Closed

Support arbitrary traffic splitting #1132

deliahu opened this issue Jun 16, 2020 · 0 comments · Fixed by #1213
Labels
enhancement New feature or request
Milestone

Comments

@deliahu
Copy link
Member

deliahu commented Jun 16, 2020

Description

Support traffic splitting

API (draft)

- name: iris-classifier
  kind: TrafficSplitter
  apis:
    - name: iris-classifierA
      weight: 50
    - name: iris-classifierB
      weight: 50
  networking:
    endpoint: my-endpoint
    api_gateway: public

- name: iris-classifierA
  kind: SyncAPI
  predictor:
    type: python
    path: predictor.py
    config:
      model: s3://cortex-examples/pytorch/iris-classifier/weights.pth

- name: iris-classifierB
  kind: SyncAPI
  predictor:
    type: python
    path: predictor.py
    config:
      model: s3://cortex-examples/pytorch/iris-classifier/weights.pth

Virtual Service:

https://istio.io/latest/docs/reference/config/networking/virtual-service/#VirtualService

type Destination struct {
	ServiceName string
	ServicePort int32
	Weight      int32
}

type VirtualServiceSpec struct {
	Name         string
	Gateways     []string
	Destinations []Destination
	Path         string
	Rewrite      *string
	Labels       map[string]string
	Annotations  map[string]string
}

Validations

  • When creating or updating a "splitter", validate that all APIs listed either exist already, or are going to be deployed in the same file
  • When deleting an API, validate that it's not referenced by any existing "splitters"
@deliahu deliahu added the enhancement New feature or request label Jun 16, 2020
@deliahu deliahu added the v0.19 label Jul 28, 2020
@deliahu deliahu added this to the v0.19 milestone Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant