Consider of multiple user may want to develop one service at the same time, but if using DevMode Duplicate, it will not receive traffic, if using DevMode Replace, it can only dev by one user, so we create another DevMode called Mesh DevMode, use special headers will route to your DevMode pod, other traffic will route to original pod.
Use envoy to route traffic with headers, we make a control-plane to distribute route rule.
Like the picture below:
Service A is original, receive inbound traffic
Service A' is created by one user enter mesh devMode with special header
Service A'' is created by another user enter mesh devMode with special header
Traffic with header
Header: a=1 will route to Service A'
Traffic with header
Header: a=2 will route to Service A''
Otherwise, traffic will other header, like
Header: b=1 or
Header: c=2 or without header, will handle by Service A
Start Mesh(Duplicate) on the Jetbrains and VS Code extension to enter
Then, you need to set a header to indicate traffic with this header will route to this pod.
Mesh DevMode and you will see the corresponding icon of the workload, indicating that the workload is in
No, Mesh DevMode use envoy as data-plane, not depends on istio.
What's the difference between
Replace DevMode and
Mesh DevMode support all protocol?#
No, it just supports HTTP/GRPC.
There is no limitation on the number of duplicates in Nocalhost. Theoretically,
Mesh DevMode can be run on any number of devices to create their own duplicates for development. However, it may be limited by cluster resources in real scenarios.
You can not use port-forward to verify Mesh devMode, because of localhost traffic will route to local, you can use two ways to verify it:
- enter another pod terminal, use command line
curlto send request to origin pod with special header to verify Mesh DevMode.
- port-forward service to local, access this service with special header to verify Mesh DevMode.