2

Preface

We may have such needs in our daily work, and we need to dynamically adjust configuration items during system operation, such as:

  • Adjust the system alarm person
  • Adjust activity switch
  • Adjust the downgrade switch
  • Adjust the log level
  • ...

The above is not enough. As the program functions become more and more complex, the expectations for the configuration are getting higher and higher, and the following needs to be met:

  • Realize the management configuration of sub-environment and sub-cluster
  • Implementation of grayscale release of configuration
  • The release of the configuration requires a complete authorization mechanism
  • The release of the configuration needs to record the release history
  • Support configuration rollback to the previous release version
  • ...

How to solve the above problems, are there any open source products?

Configuration center on the market

how to choose? You can read the document by yourself.

My final choice is Apollo .

  1. Modify/publish configuration
  2. Configuration update notification
  3. Get the latest configuration

basic-architecture.png

The following figure is Apollo architecture modules:

overall-architecture.png

What other application scenarios?

wide range of application scenarios. As long as the software involves a local configuration file, you can use this method to achieve dynamic configuration.

You only need to implement a apollo-client . When the configuration is updated, pull the latest configuration information, and then process the configuration information into the configuration format required by the software.

summary

This article is relatively short. It mainly introduces why a configuration center is needed and what open source configuration centers are available on the market to choose from.

Apollo has a complete management interface, which I like better, haha.

Recommended reading

  1. Distributed Transactions
  2. The final consistency implementation plan of distributed transactions
  3. Distributed asynchronous communication component selection

程序员新亮
2.9k 声望1.2k 粉丝

GitHub 9K+ Star,其中适合 Go 新手的开箱即用项目 go-gin-api 5.2K Star:[链接],联系我:wx-xinliang