Convert Figma logo to code with AI

apolloconfig logoapollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.

29,055
10,202
29,055
153

Top Related Projects

29,056

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.

External configuration (server and client) for Spring Cloud

Library for configuration management API

28,222

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

47,330

Distributed reliable key-value store for the most critical data of a distributed system

Quick Overview

Apollo is an open-source configuration management system designed for distributed environments. It provides a reliable way to manage configurations across different applications and services, offering features like real-time configuration changes, version control, and access control.

Pros

  • Centralized configuration management for distributed systems
  • Real-time configuration updates without service restarts
  • Supports multiple environments and clusters
  • Provides a user-friendly web interface for configuration management

Cons

  • Requires additional infrastructure setup and maintenance
  • Learning curve for teams new to centralized configuration management
  • May introduce a single point of failure if not properly configured
  • Limited built-in support for some programming languages

Code Examples

  1. Fetching a configuration value:
Config config = ConfigService.getAppConfig();
String someKey = config.getProperty("someKey", "defaultValue");
  1. Listening for configuration changes:
config.addChangeListener(new ConfigChangeListener() {
    @Override
    public void onChange(ConfigChangeEvent changeEvent) {
        for (String key : changeEvent.changedKeys()) {
            ConfigChange change = changeEvent.getChange(key);
            System.out.println(String.format(
                "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s",
                change.getPropertyName(), change.getOldValue(),
                change.getNewValue(), change.getChangeType()));
        }
    }
});
  1. Creating a new namespace:
String appId = "your-app-id";
String namespaceName = "your-namespace";
String apolloMetaServerAddress = "http://config-service-url";

ApolloConfig apolloConfig = ApolloConfig.builder()
    .appId(appId)
    .namespace(namespaceName)
    .apolloMetaServerAddress(apolloMetaServerAddress)
    .build();

Config config = ConfigService.getConfig(apolloConfig);

Getting Started

  1. Add Apollo Client dependency to your project:
<dependency>
    <groupId>com.ctrip.framework.apollo</groupId>
    <artifactId>apollo-client</artifactId>
    <version>2.1.0</version>
</dependency>
  1. Configure Apollo Meta Server address in app.properties:
apollo.meta=http://your-meta-server:8080
  1. Initialize Apollo in your application:
Config config = ConfigService.getAppConfig();
  1. Use the configuration values in your code:
String someValue = config.getProperty("someKey", "defaultValue");

Competitor Comparisons

29,056

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.

Pros of Apollo

  • More comprehensive documentation and user guides
  • Larger community and ecosystem with more contributions
  • Better support for multi-language environments

Cons of Apollo

  • Higher complexity and steeper learning curve
  • Requires more resources to set up and maintain
  • May be overkill for smaller projects or simpler use cases

Code Comparison

Apollo:

ConfigService.getAppConfig().getProperty("someKey", "defaultValue");

Apollo>:

Config config = ConfigService.getConfig("application");
String value = config.getProperty("someKey", "defaultValue");

Summary

Apollo is a more feature-rich and widely adopted configuration management system, offering extensive documentation and multi-language support. However, it comes with increased complexity and resource requirements. Apollo>, on the other hand, appears to be a simplified version or fork of the original Apollo project, potentially offering a more streamlined experience at the cost of some advanced features and community support.

Both projects use similar APIs for retrieving configuration values, with Apollo> requiring an additional step to specify the configuration namespace. The choice between the two would depend on the specific needs of the project, with Apollo being more suitable for larger, complex applications and Apollo> potentially better for simpler use cases or projects with limited resources.

External configuration (server and client) for Spring Cloud

Pros of Spring Cloud Config

  • Seamless integration with Spring Boot applications
  • Supports a wide range of backend storage options (Git, Vault, JDBC)
  • Built-in support for encryption and decryption of sensitive properties

Cons of Spring Cloud Config

  • Limited built-in UI for configuration management
  • Lacks advanced features like grayscale release and configuration inheritance
  • Requires additional setup for high availability and scalability

Code Comparison

Apollo:

Config config = ConfigService.getAppConfig();
String someKey = config.getProperty("someKey", "defaultValue");

Spring Cloud Config:

@Value("${someKey:defaultValue}")
private String someKey;

Additional Notes

Apollo offers a more comprehensive solution with features like a user-friendly UI, grayscale releases, and configuration inheritance. It also provides real-time configuration updates without requiring application restarts.

Spring Cloud Config, being part of the Spring ecosystem, integrates seamlessly with Spring Boot applications and leverages existing Spring concepts. It's more lightweight but may require additional components for advanced features.

Both solutions support various deployment models and can be used in microservices architectures. The choice between them often depends on specific project requirements and the existing technology stack.

Library for configuration management API

Pros of Archaius

  • Mature project with extensive documentation and community support
  • Seamless integration with other Netflix OSS components
  • Built-in support for dynamic property updates

Cons of Archaius

  • Less active development compared to Apollo
  • Limited out-of-the-box support for distributed configurations
  • Steeper learning curve for non-Java developers

Code Comparison

Apollo configuration example:

Config config = ConfigService.getAppConfig();
String someKey = "someKey";
String someDefaultValue = "someDefaultValue";
String value = config.getProperty(someKey, someDefaultValue);

Archaius configuration example:

DynamicStringProperty myProperty = DynamicPropertyFactory.getInstance()
    .getStringProperty("my.property", "default");
String value = myProperty.get();

Both Apollo and Archaius are configuration management systems, but they have different approaches and features. Apollo offers a more modern, distributed configuration management solution with a user-friendly console, while Archaius provides robust integration with Netflix's ecosystem and dynamic property updates. Apollo may be more suitable for microservices architectures, while Archaius excels in Java-based Netflix OSS environments. The choice between the two depends on specific project requirements, existing infrastructure, and development team preferences.

28,222

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Pros of Consul

  • More comprehensive service mesh capabilities, including service discovery and health checking
  • Broader ecosystem with integrations for various cloud providers and tools
  • Multi-datacenter support out of the box

Cons of Consul

  • Steeper learning curve due to its extensive feature set
  • Higher resource consumption, especially in large-scale deployments
  • More complex setup and configuration process

Code Comparison

Apollo configuration example:

spring:
  application:
    name: your-app-name
apollo:
  meta: http://config-service-url
  bootstrap:
    enabled: true
    eagerLoad:
      enabled: true

Consul configuration example:

service {
  name = "your-service-name"
  port = 8080
  check {
    http     = "http://localhost:8080/health"
    interval = "10s"
  }
}

Both Apollo and Consul offer configuration management solutions, but they have different focuses. Apollo is primarily designed for centralized configuration management, while Consul provides a broader range of features including service discovery, health checking, and key-value storage.

Apollo excels in simplicity and ease of use, making it a good choice for projects that primarily need configuration management. Consul, on the other hand, offers a more comprehensive solution for microservices architectures, but comes with increased complexity and resource requirements.

When choosing between the two, consider your specific needs, the scale of your project, and the level of complexity you're willing to manage.

47,330

Distributed reliable key-value store for the most critical data of a distributed system

Pros of etcd

  • Highly reliable distributed key-value store with strong consistency
  • Supports automatic leader election and cluster management
  • Widely adopted in large-scale distributed systems (e.g., Kubernetes)

Cons of etcd

  • Limited to key-value data model, less flexible for complex configurations
  • Requires more infrastructure setup and management
  • Steeper learning curve for non-distributed systems developers

Code Comparison

etcd usage example:

cli, _ := clientv3.New(clientv3.Config{Endpoints: []string{"localhost:2379"}})
defer cli.Close()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
_, err := cli.Put(ctx, "key", "value")
cancel()

Apollo usage example:

Config config = ConfigService.getAppConfig();
String someKey = config.getProperty("someKey", "defaultValue");
config.addChangeListener(new ConfigChangeListener() {
    public void onChange(ConfigChangeEvent changeEvent) {
        // Handle configuration changes
    }
});

Key Differences

  • etcd is a distributed key-value store, while Apollo is a more comprehensive configuration management system
  • Apollo provides a user-friendly web interface for configuration management, whereas etcd typically requires command-line or programmatic interaction
  • etcd focuses on distributed consensus and high availability, while Apollo emphasizes feature-rich configuration management and dynamic updates

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

apollo-logo

English | 中文

Apollo - A reliable configuration management system

Build Status GitHub Release Maven Central Repo codecov.io License

Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios.

The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat.

The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments.

The .Net SDK does not rely on any framework and can run in all .Net runtime environments.

For more details of the product introduction, please refer Introduction to Apollo Configuration Center.

For local demo purpose, please refer Quick Start.

Demo Environment:

Screenshots

Screenshot

Features

  • Unified management of the configurations of different environments and different clusters

    • Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces
    • The same codebase could have different configurations when deployed in different clusters
    • With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations
    • Multiple languages is provided in user interface(currently Chinese and English)
  • Configuration changes takes effect in real time (hot release)

    • After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application
  • Release version management

    • Every configuration releases are versioned, which is friendly to support configuration rollback
  • Grayscale release

    • Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem
  • Authorization management, release approval and operation audit

    • Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors
    • All operations have audit logs for easy tracking of problems
  • Client side configuration information monitoring

    • It's very easy to see which instances are using the configurations and what versions they are using
  • Rich SDKs available

    • Provides native sdks of Java and .Net to facilitate application integration
    • Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+)
    • Http APIs are provided, so non-Java and .Net applications can integrate conveniently
    • Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc
  • Open platform API

    • Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance
    • However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved.
    • In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified
    • There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match
    • For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in
  • Simple deployment

    • As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible
    • Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed
    • Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters

Usage

SDK

Design

Development

Deployment

Release Notes

FAQ

Presentation

Publication

Community

License

The project is licensed under the Apache 2 license.

Known Users

Sorted by registration order,users are welcome to register in https://github.com/apolloconfig/apollo/issues/451 (reference purpose only for the community)

携程 青石证券 沙绿 航旅纵横 58转转
蜂助手 海南航空 CVTE 明博教育 麻袋理财
美行科技 首展科技 易微行 人才加 凯京集团
乐刻运动 大疆 快看漫画 我来贷 虚实软件
网易严选 视觉中国 资产360 亿咖通 5173
沪江 网易云基础服务 现金巴士 锤子科技 头等仓
吉祥航空 263移动通信 投投金融 每天健康 麦芽金服
蜂向科技 即科金融 贝壳网 有赞 云集汇通
犀牛瀚海科技 农信互联 蘑菇租房 狐狸金服 漫道集团
怪兽充电 南瓜租房 石投金融 土巴兔 平安银行
新新贷 中国华戎科技集团 涂鸦智能 立创商城 乐赚金服
开心汽车 乐赚金服 普元信息 医帮管家 付啦信用卡管家
悠哉网 梧桐诚选 拍拍贷 信用飞 丁香园
国槐科技 亲宝宝 华为视频直播 微播易 欧飞
迷说 一下科技 DaoCloud 汽摩交易所 好未来教育集团
猎户星空 卓健科技 银江股份 途虎养车 河姆渡
新网银行 中旅安信云贷 美柚 震坤行 万谷盛世
铂涛旅行 乐心 亿投传媒 股先生 财学堂
4399 汽车之家 面包财经 虎扑 搜狐汽车
量富征信 卖好车 中移物联网 易车网 一药网
小影 彩贝壳 YEELIGHT 积目 极致医疗
金汇金融 久柏易游 小麦铺 搜款网 米庄理财
贝吉塔网络科技 微盟 网易卡搭 股书 聚贸
广联达bimface 环球易购 浙江执御 二维火 上品
浪潮集团 纳里健康 橙红科技 龙腾出行 荔枝
汇通达 云融金科 天生掌柜 容联光辉 云天励飞
嘉云数据 中泰证券网络金融部 网易易盾 享物说 申通
金和网络 二三四五 恒天财富 沐雪微信 温州医科大学附属眼视光医院
联通支付 杉数科技 分利宝 核桃编程 小红书
幸福西饼 跨越速运 OYO 叮咚买菜 智道网联
雪球 车通云 哒哒英语 小E微店 达令家
人力窝 嘉美在线 极易付 智慧开源 车仕库
太美医疗科技 亿联百汇 舟谱数据 芙蓉兴盛 野兽派
凯叔讲故事 好大夫在线 云幂信息技术 兑吧 九机网
随手科技 万谷盛世 云账房 浙江远图互联 青客公寓
东方财富 极客修 美市科技 中通快递 易流科技
实习僧 达令家 寺库 连连支付 众安保险
360金融 中航服商旅 贝壳 Yeahmobi易点天下 北京登云美业网络科技有限公司
金和网络 中移(杭州)信息技术有限公司 北森 合肥维天运通 北京蜜步科技有限公司
术康 富力集团 天府行 八商山 中原地产
智科云达 中原730 百果园 波罗蜜 Xignite
杭州有云科技有限公司 成都书声科技有限公司 斯维登集团 广东快乐种子科技有限公司 上海盈翼文化传播有限公司
上海尚诚消费金融股份有限公司 自如网 京东 兔展智能 竹贝
iMile(中东) 哈罗出行 智联招聘 阿卡索 妙知旅
程多多 上汽通用五菱 乐言科技 樊登读书 找一找教程网
中油碧辟石油有限公司 四川商旅无忧科技服务有限公司 懿鸢网络科技(上海)有限公司 稿定科技 搵樓 - 利嘉閣
南京领行科技股份有限公司 北京希瑞亚斯科技有限公司 印彩虹印刷公司 Million Tech 果果科技
昆明航空 我爱我家 国金证券 不亦乐乎 惠农网
成都道壳 澳优乳业 河南有态度信息科技有限公司 智阳第一人力 上海保险交易所
万顺叫车 收钱吧 宝尊电商 喜百年供应链 南京观为智慧软件科技有限公司
在途商旅 哗啦啦 优信二手车 每刻科技 杭州蛮牛
翼支付 魔筷科技 畅唐网络 准时达 早道网校
万店掌 推文科技 Lemonbox 保利票务 芯翼科技
浙商银行 易企银科技 上海云盾 苏州盖雅信息技术有限公司 爱库存
极豆车联网 伴鱼少儿英语 锐达科技 新东方在线 金康高科
soul 驿氪 慧聪 中塑在线 甄云科技
追溯科技 玩吧 广州卡桑信息技术有限公司 水滴 酷我音乐
小米 今典 签宝科技 广州趣米网络科技有限公司 More...

Awards

The most popular Chinese open source software in 2018

Stargazers over time

Stargazers over time