Apollo architecture components¶
Apollo is a reliable, distributed configuration management center that separates configuration from code to facilitate microservice delivery^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]. It is designed to centrally manage application configurations, supporting different environments such as testing and production^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Core Architecture¶
Apollo is built upon Spring Cloud Config^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]. The architecture is composed of several key components that interact to provide configuration management, distribution, and updates.
Config Service¶
The Config Service is the core component serving configuration data to client applications^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Function: It acts as the interface for client applications to retrieve their specific configurations^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Mechanism: It uses a "push-pull" combination model to interact with clients^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Storage: It reads configuration from the Config DB^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Service Discovery: Typically registers with Eureka to allow for high availability and discovery by Admin Service and clients^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Admin Service¶
The Admin Service manages configuration modifications and persists them to the database^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Function: It receives configuration change requests (e.g., creating or updating namespaces, properties) from the Portal^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Storage: It writes these changes to the Config DB^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Discovery: It registers itself with the Config Service via Eureka^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Portal¶
The Portal provides the user interface for managing configurations^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Function: It serves as the management dashboard where users can create projects, define namespaces, modify configuration parameters, and publish changes^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Interaction: It communicates with the Admin Service to synchronize modifications to the Config DB^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Config DB¶
The Config DB stores the actual configuration data^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Structure: In distributed deployments, distinct databases are typically used for different environments (e.g.,
ApolloConfigTestDBfor testing,ApolloConfigProdDBfor production)^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]. - User Management: Access to the configuration data is often managed through specific database users (e.g.,
apolloconfig) rather than using the root database user^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Apollo Portal DB¶
The Apollo Portal DB is used to store metadata and user information for the Portal itself^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
- Content: It contains tables such as
App,AppNamespace, andServerConfig^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]. - Configuration: It stores settings like supported organizations and the list of manageable environments (e.g.,
fat,pro)^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Client Integration¶
Client applications integrate with Apollo to dynamically receive configurations.
- Connection: Clients connect to the Config Service endpoint (e.g.,
http://config.od.com)^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md]. - Configuration: Client applications are typically configured with environment variables or JVM options such as
Denv(to specify the environment) andDapollo.meta(to specify the Config Service URL)^[400-devops-06-kubernetes-k8s-paas-06k8sapollo.md].
Related Concepts¶
- ConfigMap
- [[Microservices]]
- [[Service discovery]]
Sources¶
- 400-devops-06-kubernetes-k8s-paas-06k8sapollo.md