Hey i got a pretty straight forward problem. Im new to Linkerd. I currently have 2 backend deployments and 2 matching services. I also exposed these services with a ingress. Everything works fine until here.
Now i wanted to do some Traffic Splitting and came across HttpRoute and weights. I configured everything accordingly, deployed all files without errors and gave backend-v1 a weight of 80, while backend-v2 got a weight of 20. Now i would expect the incomming http traffic to be split accordingly. But this does not seem to work. It still splits the traffic around 50/50 for 200k requests. Am i overlooking something?
Here a prometheus graph visualizing the issue:
Here is my httpRoute:
apiVersion: policy.linkerd.io/v1beta2
kind: HTTPRoute
metadata:
name: backend-router
namespace: linkerd-hofladen
spec:
parentRefs:
- name: backend
kind: Service
group: core
port: 8080
rules:
- backendRefs:
- name: backend-v1
port: 8080
weight: 80
- name: backend-v2
port: 8080
weight: 20
I found my mistake. The problem was a mistake in understanding how and when those policies are applyed. To actually get all those configs to work, you have to work from inside the cluster.
This means accessing a container with kubectl exec -it and then for example sending curl requests, to the container which the configurations are applying to. This way retrys and all my other problems got fixed.
You can not send requests with Postman and expect it to work. It does not. In the end this makes sense, since Service Meshes are responsible mainly for the traffic INSIDE the cluster.