Take a look at the dubbo configuration

Configuration class relationship (Configuration Relation)



class specific description:
· ApplicationConfig application configuration, used to configure the current application information, whether the application is a provider or a consumer.
· RegistryConfig registry configuration, used to configure the connection registry related information.
· ProtocolConfig protocol configuration, used to configure the protocol information for providing services. The protocol is specified by the provider and passively accepted by the consumer.
· ServiceConfig service configuration, used to expose a service, define the meta information of the service, a service can be exposed by multiple protocols, and a service can also be registered with multiple registries.
· ProviderConfig The default value of the provider. When a property of ProtocolConfig and ServiceConfig is not configured, this default value is adopted.
· ReferenceConfig reference configuration, used to create a remote service proxy, a reference can point to multiple registries.
· ConsumerConfig The default configuration of the consumer. When a property of ReferenceConfig is not configured, this default value is used.
· MethodConfig method configuration, which is used to specify method-level configuration information in ServiceConfig and ReferenceConfig.
ArgumentConfig is used to specify method parameter configuration.


Configuration Override




· The above figure takes timeout as an example to show the search order of the configuration, other retries, loadbalance, actives, etc. are similar.
· The method level takes precedence, the interface level comes second, and the global configuration takes precedence.
· If the level is the same, the consumer takes priority, and the provider takes second.
· Among them, the configuration of the service provider is passed to the consumer through the URL through the registry.
· It is recommended to set the timeout by the service provider, because the service provider knows how long a method needs to be executed. If a consumer references multiple services at the same time, it does not need to care about the timeout setting of each service.
In theory, the non-service identifier configuration of ReferenceConfig can be configured by default in ConsumerConfig, ServiceConfig, and ProviderConfig.

Configuration Type:

Note: Only group, interface, and version are the matching conditions for services. The three determine whether it is the same service. Other configuration items are tuning and governance parameters.

All configuration items are divided into three categories, see the "Function" column in the table below.

· Service discovery: Indicates that this configuration item is used for service registration and discovery, so that consumers can find providers.
· Service Governance: Indicates that this configuration item is used to manage the relationship between services, or to provide convenience for development and testing.
· Performance Tuning: Indicates that this configuration item is used to tune performance, and different options will affect performance.
All configurations will eventually be converted into URL representation, generated by the service provider, and passed to the consumer through the registration center. Each attribute corresponds to the URL parameters, see the "Corresponding URL Parameters" column in the configuration item list.
URL format:


More dubbo configuration information move: https://www.gitbook.com/@dubbo

More massive videos and videos follow the public account

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326219058&siteId=291194637