Documente Academic
Documente Profesional
Documente Cultură
Microservices
Benefit
- Reduce the complexity because of the decomposition (Each service can be maintained
separately)
- Each service has its own task and its own DB
- Individual service easier to understand and maintain
- Deploy faster
- Scaled independently
- Each service can use different technologies as long as the API adhere the contract
- Continuous deployment becomes possible
Drawback
- Microservice distributed system increase the complexity
- Invoking a service from one to another via language-level method/procedure calls is more
complex
- There is challenge on partitioned database architecture
- Based on the article, we should use eventual consistency approach more challenging for
developers
- Testing is more complex
- Deploying is more complex
Decompose pattern
- By Business capability
- By subdomain
Database per service pattern how each service has its own database to ensure loose
coupling
Service Discovery
Why use service discovery? In order to make a request, the code needs to know the network
location (IP Address & Port) of a service instance.
Traditional application (running on physical hardware)
Network locations of service instances are relatively static Just read the network locations
from a configuration file that is occasionally updated.
Modern cloud-based microservices application (more difficult problem to solve)
Service instances have dynamically assigned network locations. The set of service
instances changes dynamically because of autoscaling, failures, and upgrades.
Consequently, the client code needs to use a more elaborate service discovery mechanism.
Service Registry
is a database containing the network locations of service instances. A service registry needs to
be highly available and up to date.
Data Management
Single Service per Host & Multiple Services per Host patterns
- deployment strategies
Testing patterns:
- Service Component Test & Service Integration Contract Test
Circuit Breaker
Access Token
Observability patterns
- Log Aggregation
- Application metrics
- Audit logging
- Distributed tracing
- Exception tracking
- Health check API
- Log deployments and changes
UI patterns:
- Server-side page fragment composition
- Client-side UI composition