DevMode Mesh
#
Why Mesh DevModeConsider 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.
#
How it worksUse 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 Header: a=1
Service A'' is created by another user enter mesh devMode with special header Header: a=2
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
#
How to useRight-click Start Mesh(Duplicate)
on the Jetbrains and VS Code extension to enter Mesh DevMode
:
Then, you need to set a header to indicate traffic with this header will route to this pod.
Enter Mesh DevMode
and you will see the corresponding icon of the workload, indicating that the workload is in Mesh DevMode
.
#
FAQ#
Do we need to install istio to use Mesh DevMode?No, Mesh DevMode use envoy as data-plane, not depends on istio.
Duplicate DevMode
Replace DevMode
and Mesh DevMode
?#
What's the difference between Mesh DevMode
support all protocol?#
Does No, it just supports HTTP/GRPC.
#
Is there a limitation on the number of duplicates?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.
#
How to verify Mesh DevMode works fine?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
curl
to 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.