(A) Apollo describes the Configuration Center

1、What is Apollo

1.1 Background

With the increasing complexity of program functions, the configuration program is increasing: the address switching various functions, configuration parameters, the server ......

Configuring the program expectations are also increasing: the configuration changes with immediate effect, gray publish, sub-environment sub-cluster management configuration, complete authority, audit mechanism ......

In this environment, the traditional configuration file, database, etc. has become increasingly unable to meet the needs of developers for configuration management.

Apollo distribution center came into being!

About 1.2 Apollo

Apollo (Apollo) is a research and development department Ctrip framework open source configuration management center that centralized management applications in different environments, different cluster configuration, the configuration changes can be pushed to real-time application side, and have standardized permissions, process control and other features.

Apollo supports four dimensions Management Configuration Key-Value format:

  1. application (application)
  2. environment (environment)
  3. cluster (cluster)
  4. namespace (namespace)

Meanwhile, Apollo model development based on open source, open source Address: https://github.com/ctripcorp/apollo

1.2 Configuring Basic Concepts

Since Apollo located in the distribution center, then here it is necessary to briefly explain what is configured.

As we understand it, the configuration has the following attributes:

  • Configuration is a read-only variables independent of the program
  • First, the configuration is independent of the program, there will be a program with different behavior in different configurations.
  • Second, the program is configured for read-only, by reading the configuration program to change their behavior, but the program should not have to change the configuration.
  • Common equipped with: DB Connection Str, Thread Pool Size, Buffer Size, Request Timeout, Feature Switch, Server Urls and so on.
  • Configuring accompany applications throughout the life cycle
  • Configuration throughout the entire life cycle of the application, the application to initialize at startup by reading configuration, runtime behavior depending on the configuration adjustments.
  • There are many ways you can configure load
  • Configuring there are many loading, a common procedure internal hard code, configuration files, environment variables, startup parameters, such as database-based
  • Configuration management needs
  • Access control
  • Because of the configuration change the behavior of the program, even incorrect configuration can lead to disaster, so the modification must have a better system of access control
  • Different environments, cluster configuration management
  • With a program often requires a different configuration in different environments (development, test, production), distinct clusters (such as different data centers), so we need a sound environment, cluster configuration management
  • Component configuration management framework classes
  • There is a special class configuration - class frame assembly configuration, such as CAT client configuration.
  • Although this type of framework class components developed by other teams, the maintenance, but the runtime is in the business practice, it may be part of the frame class components of the application is considered nature.
  • Such components corresponding configuration also need to have a better system of management.

2、Why Apollo

It is based on the particularity of the configuration, so from the beginning of design Apollo aspire to become a publishing platform configuration management capabilities, currently offers the following features:

  • Unified management of different environments, different cluster configuration
  • Apollo provides a unified interface, centralized management of different environments (environment), different clusters (cluster), configure different namespaces (namespace) of.
  • The same code deployed in different clusters can have different configurations, such as zookeeper address, etc.
  • You can easily support a plurality of different applications to share the namespace (namespace) with a configuration, while still allowing for a shared application configuration covering
  • Configuration changes with immediate effect (heat release)
  • After the user to modify the configuration and the Apollo released, the client in real-time (one second) receive the latest configuration and notification to the application
  • Release management
  • All configuration concept has released version, which can be easily configured to support rollback
  • Gray release
  • Supports the configuration of the gray release, such as point after release, takes effect only on the part of application examples, such as after a period of observation, no problem again and again to all application instances
  • Rights management, post audit, operational audit
  • Application and configuration management has improved rights management mechanism, the management configuration is also divided into two aspects of editing and publishing, thereby reducing human error.
  • All operations have audit logs, you can easily track down the problem
  • Client configuration information monitoring
  • You can easily see what used to be disposed at the interface Example
  • Java and .Net provide native client
  • It provides native Java and .Net client for easy application integration
  • Support Spring Placeholder, Annotation and Spring Boot of ConfigurationProperties, easy to use application (requires Spring 3.1.1+)
  • Http while providing an interface, non-Java and .Net applications can also be easy to use
  • It provides an open platform API
  • Apollo itself provides a fairly complete unified configuration management interface, support for multiple environments, multiple data center configuration management properties, rights, governance processes. But Apollo for general considerations, will not do much to change the configuration of restriction, provided that they meet the basic format will be able to save, it will not be targeted to check for different configuration values, such as the database user name, password, Redis service address, etc.
  • For this type of application configuration, Apollo parties support the application and modify the configuration of the Apollo released through an open platform API, and have a sound authorization and access control
  • Simple deployment
  • Configuration Center as a basis for service availability requirements are very high, which requires as little as possible of Apollo external dependencies
  • The only external dependency is MySQL, so deployment is very simple, as long as the installed Java and MySQL can run up to let Apollo
  • Apollo also provides packaged script, you can generate a key installation package for all needs, and supports custom run-time parameters

 

Guess you like

Origin www.cnblogs.com/lindev/p/11108554.html