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

Tab / Mirror of traffic #4385

Open
tobad357 opened this issue May 13, 2020 · 6 comments
Open

Tab / Mirror of traffic #4385

tobad357 opened this issue May 13, 2020 · 6 comments

Comments

@tobad357
Copy link

Feature Request

We would like to have the ability to mirror traffic to one service to another url

What problem are you trying to solve?

This would solve an issue where we want to either test a new version with production traffic or alternatively debug an issue by using production traffic

How should the problem be solved?

Either by extending the traffic split to allow mirroring

What do you want to happen? Add any considered drawbacks.
The traffic from one service gets mirrored to another service

Any alternatives you've considered?

We have tried to use tap but for debugging, which would solve one half of the problem.
The issue is that tap doesn't allow to see the POST request body so we can't see whats being sent in and what is responded

Is there another way to solve this problem that isn't as good a solution?

How would users interact with this feature?

If you can, explain how users will be able to use this. Maybe some sample CLI
output?

@grampelberg
Copy link
Contributor

grampelberg commented May 13, 2020

You can do this today with TrafficSplit and nginx. If you follow the fault injection tutorial and tweak the nginx config a little bit you should be good to go!

Now that I've said that, we should totally add shadow traffic to Linkerd!

@tobad357
Copy link
Author

Great :) Should I log another issue to allow seeing request and response body with tap?

@grampelberg
Copy link
Contributor

I think #4326 is close to what you're looking for. If that doesn't hit your use case, please open up a new issue!

@lebenitza
Copy link

Any news? Would love to see traffic mirroring/shadowing in Linkerd 🙏

@kzap
Copy link
Contributor

kzap commented Aug 30, 2023

You can do this today with TrafficSplit and nginx. If you follow the fault injection tutorial and tweak the nginx config a little bit you should be good to go!

Now that I've said that, we should totally add shadow traffic to Linkerd!

Looking at the tutorial now, the TrafficSplit has been replaced by HTTPRoute

With httpBackendRef, can one specify weights that total > 100% ? eg send 100% of traffic to both backends?

@kzap
Copy link
Contributor

kzap commented Nov 7, 2023

Another update here from this Slack thread: https://linkerd.slack.com/archives/C89RTCWJF/p1693405159374459

httpBackendRef weights are not %
See https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io%2fv1.BackendRef

Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.

If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.

Support for this field varies based on the context where used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Help Wanted
  
To do
Development

No branches or pull requests

4 participants