- Discussion
- Useful Resources
- Quick Guide
- Blue Green Deployment
- Circuit Breaker
- Service Discovery
- External Configuration
- Health Check
- Distributed Tracing
- Performance Metrics
- Log Aggregation
- Event Sourcing
- Aysynchronous Messaging
- Saga
- Command Query Responsibility Segregator
- Shared Database per Service
- Database per Service
- Branch
- Chain Of Responsibilities
- Client Side UI Composition
- Proxy
- Aggregator
- API Gateway
- Decompose by Strangler
- Decompose by Subdomain
- Decompose by Business Capability
- Microservices Design Patterns - Overview
- Microservices Design Patterns - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
External Configuration
Problem Statement
Microservice architecture structures an apppcation as a set of loosely coupled microservices and each service can be developed independently in agile manner to enable continous depvery/deployment. These services often interacts with infrastructure services or 3rd party services.
Insfrastructure services may include a service registry, a message broker, database server. 3rd party services can be payment services, email services, messaging services. Apart from varying services, environments often vary. Consider the following cases −
Configuration Data − Configurations to external/3rd party services should be provided to the micro services e.g. database credentials, network urls etc.
Multiple Environments − There are often varying environments pke dev, qa, test, staging or pre-prod and production. A service should be deployed on each environments without any code modifications.
Varying configuration data − Configurations to external/3rd party services also varies from dev to production e.g. dev databse to production database, test payment processor vs original payment processor services.
Solution
We can externapze all configurations from database credentials to network urls. Service will read the configuration data during startup e.g. from a properties file/ system environment variables or using command pne arguments. This pattern helps in deploying the microservices without any modification/recompilation needed.
Advertisements