Microservices (MSA)
Microservices (MSA)
Microservices Architecture
1. Overview of Microservices Architecture (MSA), the Core of Agile Digital Transformation
flowchart LR
A["Large monolithic structure"] -- "Transition to independent deployment & loose coupling" --> B["Microservices (MSA)"]
Definition: A software architecture style that decomposes a single large application into small, independently deployable service units that interact with one another through APIs.
Characteristics: (Loose coupling) Services can be deployed and scaled independently, enabling fault isolation and minimizing the impact of change. (Polyglot) Supports a polyglot architecture in which each service can freely choose its own optimal technology stack. (Cloud-native) Optimized for containerized, orchestrated environments, naturally aligning with cloud-native strategy.
2. Architectural Structure and Core Technologies of MSA
A. MSA Components and Interaction Model (Inner/Outer Architecture)
flowchart LR
A["Monolithic structure<br/>(tight coupling)"] -->|"Challenge<br/>(failure propagation / deployment bottleneck)"| B{"Transition strategy"}
B -->|"Service decomposition"| C["MSA structure<br/>(independent services)"]
B -->|"Communication standardization"| D["API Gateway<br/>(operational efficiency)"]
C --> E["Agile digital transformation<br/>(scale & agility)"]
D --> E
| Category | Key Component | Role |
|---|---|---|
| API Gateway | Entry Point | Authentication, authorization, routing, rate limiting |
| Service Discovery | Registry | Automatic identification of service locations (e.g., Netflix Eureka) |
| Config Server | Centralized Config | Unified management of per-service configuration values (e.g., Spring Cloud Config) |
| Circuit Breaker | Fault Tolerance | Prevents propagation of service failures (e.g., Resilience4j) |
B. Monolithic vs. Microservices (MSA) Comparison (Evolutionary Perspective)
flowchart LR
subgraph A["Existing System (Monolithic)"]
A1["Tight coupling"]
A2["Single technology stack"]
end
subgraph TRANS["Transition Strategy (Evolution)"]
direction TB
T1["Service decomposition"]
T2["Operational automation (DevOps)"]
end
subgraph B["Target System (MSA)"]
B1["Independent services"]
B2["Polyglot"]
end
A --> TRANS
TRANS --> B
| Comparison Item | Monolithic Architecture | Microservices Architecture |
|---|---|---|
| Deployment unit | Entire application (single) | Individual services (many) |
| Scalability | Scale the whole system | Scale only the services that need it |
| Failure impact | Can propagate across the whole system | Failure isolation is easy |
| Data management | Centralized DB | Decentralized, per-service DB |
3. MSA Adoption Strategy and Success Considerations
| Category | Key Strategy and Considerations | Expected Benefit |
|---|---|---|
| Domain-Driven Design | Strategic design (Bounded Context) | Establishes clear service boundaries centered on business domains |
| DevOps & Automation | Infrastructure automation is essential | A CI/CD system is essential for deploying and operating numerous services |
| Distributed data consistency | Use of the Saga pattern and event sourcing | Resolves data consistency issues in distributed environments |
| Observability | Distributed tracing (Zipkin, Jaeger) | Visualizes complex inter-service call flows and diagnoses issues |