Backend Development 11 min read

Comparative Overview of Distributed Configuration Centers for Spring Boot Microservices

This article introduces the need for dynamic configuration in Spring Boot microservices, compares popular open‑source configuration centers such as Apollo, Nacos, Spring Cloud Config, Disconf, and Diamond, and provides detailed features, a comparison table, and code examples for integrating Apollo.

Full-Stack Internet Architecture
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Comparative Overview of Distributed Configuration Centers for Spring Boot Microservices

Spring Boot is a mainstream microservice framework with a mature ecosystem, and many projects need a fast way to integrate common middleware such as RPC, caching, message queues, sharding, service registry, and distributed configuration.

Traditional configuration approaches store settings in XML or properties files and require a full application redeployment for any change, which lacks flexibility especially in environments with multiple stages (development, testing, pre‑release, production).

To avoid time‑consuming releases for configuration updates, a distributed configuration center is required.

Several open‑source distributed configuration frameworks are listed:

Apollo – released by Ctrip in May 2016, offers permission control and governance.

Spring Cloud Config – released in September 2014, integrates seamlessly with the Spring Cloud ecosystem.

Disconf – Baidu’s solution from July 2014, now unmaintained.

Nacos – Alibaba’s solution from June 2018, also provides DNS and RPC service discovery.

Diamond – originated from Taobao, still maintained.

A detailed feature comparison table follows, covering static/dynamic configuration, multi‑environment support, local cache, configuration lock, validation, effective time, push updates, pull intervals, permission management, audit, version control, compliance detection, instance monitoring, gray release, and alert notifications.

Feature

Importance

spring‑cloud‑config

Apollo

disconf

Nacos

Static configuration management

High

Based on file

Supported

Supported

Supported

Dynamic configuration management

High

Supported

Supported

Supported

Supported

Unified management

High

None, needs GitHub

Supported

Supported

Supported

Multi‑environment

Medium

None, needs GitHub

Supported

Supported

Supported

Local configuration cache

High

None

Supported

Supported

Supported

Configuration lock

Medium

Supported

Not supported

Not supported

Not supported

Configuration validation

Medium

None

None

None

None

Effective time

High

Restart or manual refresh

Real‑time

Real‑time

Real‑time

Update push

High

Manual trigger required

Supported

Supported

Supported

Scheduled pull

High

None

Supported

Event‑driven, client restart or server push

Supported

User permission management

Medium

None, needs GitHub

Supported

Supported

Supported

Authorization, review, audit

Medium

None, needs GitHub

Supported

None

Supported

Version management

High

Git

UI provides history and rollback

DB records without query API

UI supports rollback

Compliance detection

High

Not supported

Supported (needs improvement)

Supported

Instance monitoring

High

Requires Spring Admin

Supported

Supported, shows which machines load each config

Supported

Gray release

Medium

Not supported

Supported

Partial update not supported

Supported

Alert notification

Medium

Not supported

Email supported

Email supported

Supported

Nacos supports many file formats (yaml, json, xml, properties, etc.) but its parsing is not as user‑friendly as Apollo, which, despite supporting fewer formats, provides intuitive editing and strong permission management, making it suitable for department‑level configuration centers.

Apollo, developed by Ctrip, offers centralized management of configurations across environments and clusters, real‑time push, permission control, and governance features, and runs on Spring Boot and Spring Cloud without requiring additional containers.

Key features of Apollo include unified management, hot‑publish, version control, gray release, permission and audit, client monitoring, Java/.Net native clients, open API, and simple deployment.

To integrate Apollo, add the following Maven dependency:

<dependency>
    <groupId>com.ctrip.framework.apollo</groupId>
    <artifactId>apollo-client</artifactId>
    <version>1.4.0</version>
</dependency>

Configure the client in application.yaml :

apollo:
  meta: http://127.0.0.1:8080
  bootstrap:
    enabled: true
app:
  id: spring-boot-bulking-apollo

Example Java component that listens for dynamic configuration changes:

@Component
public class ApolloConfig {
    private static final String USER_TIMEOUT = "user.timeout";

    @PostConstruct
    public void init() {
        Config config = ConfigService.getAppConfig();
        config.addChangeListener(changeEvent -> {
            ConfigChange configChange = changeEvent.getChange(USER_TIMEOUT);
            PropertyChangeType changeType = configChange.getChangeType();
            if (PropertyChangeType.ADDED.equals(changeType) || PropertyChangeType.MODIFIED.equals(changeType)) {
                System.out.println(String.format("Dynamic refresh new value. key:%s , value:%s", USER_TIMEOUT, configChange.getNewValue()));
            }
        }, Sets.newHashSet(USER_TIMEOUT));
        String userTimeoutValue = config.getProperty(USER_TIMEOUT, null);
        System.out.println(String.format("First fetch. key:%s , value:%s", USER_TIMEOUT, userTimeoutValue));
    }
}

The Apollo console (e.g., http://localhost:8070/config.html?#/appid=spring-boot-bulking-apollo ) allows real‑time modification of configuration items such as user.timeout , and the client receives updates instantly.

First fetch. key:user.timeout  , value:1000
Dynamic refresh new value. key:user.timeout  , value:500
Dynamic refresh new value. key:user.timeout  , value:1000
...

Demo code is available at https://github.com/aalansehaiyang/spring-boot-bulking .

JavamicroservicesNacosSpring BootApolloDistributed Configuration
Full-Stack Internet Architecture
Written by

Full-Stack Internet Architecture

Introducing full-stack Internet architecture technologies centered on Java

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.