SpringCloud XXI What Config distributed configuration center yes.

SpringCloud Config Distributed Configuration Center

① micro-Services Overview mentioned: SpringCloud Config.

 

For now, the service industry for micro and there is no single, standard definition (While there is no precise definition of this architectural style)

But generally, the micro-service architecture is an architectural pattern or a kind of architectural style, it advocates a single application into a set of smaller services, each running in its own separate process, the service between coordination with each other, complement each other, providing the ultimate value for the user. The use of lightweight communication mechanism between the service to communicate with each other (usually HTTP-based RESTful API). Each service around the specific business to build, and can be independently deployed into a production environment, production-like environment and so on. In addition, you should try to avoid a unified, centralized service management mechanism, for a specific service should be based on the business context, select the appropriate language, tools to build them, can have a very lightweight centralized management to coordinate these services (the Config management is SpringCloud) , you can use a different language to write the service, you can use different data storage

 

--- ② distributed system configuration issues faced.

Micro service means that you are single applications business split into a sub-service, each service granularity is relatively small, so the system will be a lot of services. Since each service needs to run the necessary configuration information, so a centralized, dynamic configuration management facilities is essential. SpringCloud provides ConfigServer to solve this problem, each of our own micro-services with a application.yml, managing hundreds of configuration files ......

 

What ③SpringCloud Config distributed configuration center yes.

There SpringCloud Config Server (service) side, and that is SpringCloud ConfigServer

SpringCloud Config The Client (client) side, namely SpringCloud ConfigClient end.

 

 

SpringCloud ConfigServer it is a distributed micro-services.

 

SpringCloud Config provide external configuration support centralized as micro-services architecture micro-services (you can make the configuration and coding separately), such as: one or a number of micro-services, databases need to be connected are subject to change, the user name and password for the database connection has been modify the database maintained by the general operation and maintenance engineers and DBA. In one method, operation and maintenance engineers or development engineers to modify the DBA notice. The second is, operation and maintenance engineers (or called configuration engineer, maybe he / she did not know java, and even do not have permission to write java code, but he / she has permission to change certain configuration content on GitHub.) On GitHub modify the remote end of the configuration file, the modifications are SpringCloud ConfigServer sensed, and to notify the SpringCloud ConfigServer SpringCloud ConfigClient a, B, C. . . . . . . . . Informing these config client (ie Development Engineer), which micro-services database configuration files needed to make changes. Configuring external configuration server provides a centralized environment for all of the different micro-services applications. Switch can handle a variety of environmental dynamic, more flexible.
 

 

How ④SpringCloud Config distributed configuration center to use it.

SpringCloud Config is divided into server and client in two parts.
 
Also known as distributed configuration server center, which is an independent micro-service application, and a server configured for connecting the client to provide access to configuration information, the encryption / decryption information access interface

The client is managed by the configuration specified in the application center resources, as well as content related to the service configuration, and access to and loaded from the distribution center in the startup configuration information server defaults git to store configuration information, so that you can help version management of the environment configuration, and can git client tools to facilitate configuration management and access content.
 
 

 

⑤SpringCloud Config distributed configuration can be doing?

1, centralized management of configuration files.

2, different configurations of different environments, dynamic configuration updates, such as partial deployment environment dev (Development Environment) / test (test environments) / prod (production) / beta / release.

3, dynamic adjustment during the run configuration, write the configuration file on the machine no longer need to be deployed in each service, the service will be unified pull their configuration information to the distribution center.

4, when a configuration change occurs, you can restart the service do not need to change the perception of the configuration and apply the new configuration.

5, the configuration information is exposed in the form of REST interface.

 

 

Since SpringCloud Config using Git to store configuration files by default (there are other ways, such as support for SVN and local file), but the most recommended or Git, and the use of the form http / https access. The most recommended and GitHub integration configuration.

Published 155 original articles · won praise 1 · views 10000 +

Guess you like

Origin blog.csdn.net/lbh19630726/article/details/104224239