Spring Cloud-based Application Configuration Management with Alibaba Cloud ACM

Standard Configuration Management Methods and Problems in Spring Cloud

Spring Cloud provides the Spring Cloud Config component to manage the configuration by default.

  • The user updates and commits the configuration in Git.
  • Spring Cloud Config Server gets the latest configuration by using the callback function.
  • The user performs a configuration refresh operation on any of the servers (“post /bus/refresh” as shown in the diagram).
  • The target server (App A) pulls the latest configuration from the Config Server, and sends a message to the message bus to notify other servers that the configuration has been changed.
  • After all other servers are informed of the configuration update through the message bus, they pull the latest configuration from the Config Server.
  • The standard solution relies on Git. Although other storage options are available, the standard Git solution is controversial. After all, Git is not commonly used in the industry and is rarely used in critical production environments (with the exceptions of the development and test environments);
  • Configuration changes rely on Cloud Bus. The architecture is complex and there are configuration consistency issues.
  • The timeliness of the entire process is low. It has a lengthy publishing process which involves multiple asynchronous operations. From the publishing of the configuration change to the time when the configuration takes effect on all servers, the delay could be minutes.

Alibaba Cloud ACM Optimizes Configuration Management for Spring Cloud

Alibaba Cloud Application Configuration Management Service (ACM), as a cloud implementation of Nacos, can optimize the preceding configuration management problems. With ACM, the configuration modification becomes extremely simple and efficient, as shown in the following diagram.

  • The user modifies the configuration in ACM;
  • ACM dynamically pushes the modification to all applications.
  • High configuration change push performance. According to the internal performance statistics from Alibaba, in most cases, the configuration push takes effect within 0.5 seconds. In 99.9% of cases, a configuration change can be pushed to thousands of machines within 3 seconds.
  • Simple operation and maintenance. No additional Git storage or Cloud Bus components are required. A single configuration API can implement all configuration center functions.
  • Following the open source spirit, ACM is the cloud based implementation of Nacos, and does not require additional cost to use any of its functions.

How Can We Quickly Deploy ACM?

For Spring Cloud users who need to switch from Spring Cloud Config to Alibaba Cloud ACM, no additional changes to the business code is required. Spring Cloud’s @Value annotation is valid in ACM. Users only need to modify two compilation configuration files of the Spring Cloud application.

Spring Cloud Code and Configuration Change

The /echo API returns the value of the dynamic configuration parameter configValue.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

4.97K Followers

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com