Dubbo provides the service governance capability of adjusting traffic distribution by weight, and can dynamically adjust traffic distribution by weight without restarting the application.
Dubbo can adjust traffic distribution by weight through XML configuration, annotation configuration, and dynamic configuration. Here we mainly introduce the dynamic configuration method. For other configuration methods, please refer to the old document Configuration
Please make sure to run Dubbo-Admin successfully
In the case of different machine performance, the load of different machines needs to be evaluated systematically, and some machines need to be downgraded. By adjusting the traffic ratio of the machine by weight, the performance of the machine can be reasonably evaluated. Certain services will face traffic shocks. In order to ensure the availability of core services, some services need to be downgraded. Adjust traffic distribution by weight to avoid faults caused by traffic impact.
For the scenario of dynamically adjusting traffic distribution through weight, you only need to clarify the following issues to know how to write the configuration:
scope: application, key: app-name
(you can also use services
to specify certain services).scope: service, key:group+service+version
.addresses: ["0.0.0.0"]
or addresses: ["0.0.0.0:*"]
depends on the side value.addersses[list of instance addresses]
.Select the application related to the weight configuration to trigger the call verification.