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

dag: add support for traffic mirroring #1557

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

davecheney
Copy link
Contributor

Fixes #459

Add support for per route traffic mirroring. Only available in HTTPProxy

spec:
  routes:
  - conditions:
     - prefix: "/"
  - services:
     - name: kuard
       port: 8080
     - name: kuard-mirror
       port: 8080
       mirror: true

Signed-off-by: Dave Cheney [email protected]

@davecheney davecheney added this to the 1.0.0-beta.1 milestone Sep 20, 2019
@davecheney davecheney force-pushed the issue/459 branch 3 times, most recently from 97008ff to 90fe044 Compare September 20, 2019 09:03
Copy link
Member

@stevesloka stevesloka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to make sure to update the calculation for weighted clusters (https://github.com/projectcontour/contour/blob/master/internal/envoy/route.go#L161) so that any mirrored cluster isn't taken into account in the event there are multiple upstreams.

@stevesloka
Copy link
Member

What happens if a user selects multiple "mirror" upstreams?

Copy link
Member

@youngnick youngnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit.

}
rh.OnAdd(p1)

// check timeout policy with malformed response timeout is propogated as infinity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Comment got left behind maybe?

@davecheney
Copy link
Contributor Author

What happens if a user selects multiple "mirror" upstreams?

excellent point. I'll add a test and some status output tests.

@davecheney
Copy link
Contributor Author

Need to make sure to update the calculation for weighted clusters (https://github.com/projectcontour/contour/blob/master/internal/envoy/route.go#L161) so that any mirrored cluster isn't taken into account in the event there are multiple upstreams.

This should be fine because the set of clusters we pass to weighted clusters is reduced by one -- the on which is assigned to the mirror. The weightings will work out -- hopefully/

Fixes projectcontour#459

Add support for per route traffic mirroring.

Signed-off-by: Dave Cheney <[email protected]>
@davecheney davecheney merged commit de19f6b into projectcontour:master Sep 24, 2019
@davecheney davecheney deleted the issue/459 branch September 24, 2019 10:53
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

Successfully merging this pull request may close these issues.

ingressroute: add support for traffic mirroring
3 participants