Complete the code to define a simple routing rule that directs traffic to the correct microservice.
route = {
"path": "/api/v1/users",
"service": "[1]"
}The route should direct traffic to the UserService for user-related API calls.
Complete the code to split traffic between two versions of a microservice for canary deployment.
traffic_split = {
"v1": 80,
"[1]": 20
}The new version 'v2' receives 20% of the traffic for canary testing.
Fix the error in the routing rule to correctly match the path prefix.
routing_rule = {
"match": {
"path_prefix": "[1]"
},
"service": "PaymentService"
}The path prefix must start with a slash '/' to correctly match the URL path.
Fill both blanks to create a traffic splitting rule that sends 70% to stable and 30% to canary.
traffic_policy = {
"stable": [1],
"canary": [2]
}70% traffic goes to stable, 30% to canary for gradual rollout.
Fill all three blanks to define a routing rule with path, method, and target service.
routing_rule = {
"path": "[1]",
"method": "[2]",
"service": "[3]"
}The rule routes POST requests on '/api/v1/orders' to the OrderService.