Size: 1882
Comment:
|
Size: 1895
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 17: | Line 17: |
* service registry (service instances locations) * service instance (instances on demand) * api gateway (route requests to service instances) |
* service registry (service instances locations) eureka * service instance (instances on demand) * api gateway (route requests to service instances) zuul |
MicroServices
Monolithic architecture - architect an application as a single deployable unit
Microservice architecture - architect an application as a collection of loosely coupled, services
Decompose by business capability - define services corresponding to business capabilities
Remote Procedure Invocation - use an RPI-based protocol for inter-service communication (RMI, .Net Remoting , REST (JSON), SOAP (XML)
Messaging - use asynchronous messaging for inter-service communication (JMS, RabbitMQ, Message broker)
API gateway - a service that provides each client with unified interface to services
Client-side discovery - client queries a service registry to discover the locations of service instances
Server-side discovery - router queries a service registry to discover the locations of service instances
Service registry - a database of service instance locations
Self registration - service instance registers itself with the service registry
Circuit Breaker - invoke a remote service via a proxy that fails immediately when the failure rate of the remote call exceeds a threshold
Command Query Responsibility Segregation (CQRS) - Split the application into two parts: the command-side and the query-side. The command-side handles create, update, and delete requests and emits events when data changes. The query-side handles queries by executing them against one or more materialized views that are kept up to date by subscribing to the stream of events emitted when data changes. CRUD, command handles CUD and query the R.
Base components
- service registry (service instances locations) eureka
- service instance (instances on demand)
- api gateway (route requests to service instances) zuul