We demonstrate the basic usage of Dubbo’s traffic control rules through a mall microservice project developed with Dubbo, including the following scenarios:
By dynamically adjusting the service timeout at runtime, it can effectively address issues such as unreasonable timeout settings and frequent timeouts caused by system emergencies, improving system stability.
Retrying after a failed initial service call can effectively improve the overall success rate of calls.
Access logs can effectively record all service request information processed by a machine over a period, and enabling access logs dynamically at runtime is very helpful for troubleshooting.
Same data center/region priority means prioritizing service providers in the same data center/region when the application calls the service, avoiding network latency caused by crossing regions, thereby reducing response time.
By dividing one or more applications in the cluster into logically isolated environments, it can be used to build gray environments or multiple testing environments.
For example, routing traffic based on user ID, forwarding a small portion of user requests to the newly released product version to verify the stability of the new version and gather user experience feedback.
By dynamically adjusting the weights of a single or a group of machines, the distribution of request traffic can be changed at runtime, achieving dynamic proportional traffic routing.
The core goal of service downgrade is to maintain functional integrity as much as possible by returning degraded results when weak dependencies are unavailable or fail.
By forwarding requests to a fixed provider machine, it helps quickly reproduce development or online issues.