Traffic Routing
Cloud functions support traffic routing settings. With this configuration, you can conveniently control the gradual rollout or rollback process of function versions in actual usage scenarios or environments, avoiding potential risks from a full-scale deployment.
Function Version Routing Configuration
You can use the following command to configure function version routing:
tcb fn config-route <name> <version1> <traffic1> [version2] [traffic2]
tip
If only version1 and traffic1 are specified, the remaining traffic is allocated to the $LATEST version.
If both version1 traffic1 and version2 traffic2 are specified, all traffic is allocated to the two versions.
Function Version Routing View
You can view the function version routing configuration using the following command:
tcb fn get-route <name>
You will see output similar to the following: