Six categories of microservice patterns

  • Core development patterns
    • Service granularity
    • Communication protocols
    • Interface design
    • Configuration management
    • Event processing
  • Routing patterns
    • Service discovery: abstracts away the physical location of the service from the client. New microservice instances can be added to scale up, and unhealthy service instances can be transparently removed from the service.
    • Service routing: gives the microservice client a single logical URL to talk to and acts as a policy enforcement point for things like authorization, authentication, and content checking.
  • Client resiliency patterns
    • Client-side load balancing: the service client caches microservice endpoints retrieved from the service discovery and ensures that the service calls are load balanced between instances.
    • Circuit breakers pattern(fail fast): ensures that a service client does not repeatedly call a failing service. Instead, a circuit breaker "fails fast" to protect the client.
    • Fallback pattern
    • Bulkhead pattern
  • Security patterns
    • Authentication
    • Authrization
    • Credential management and propagation
  • Logging and tracing patterns
    • Log correlation: all service log entries have a correlation ID that ties the log entry to a single transaction.
    • Log aggregation: an aggregation mechanism collects all of the logs from all the services instances.
    • Mircoservice tracing: can query the log data to find individual transactions and see the flow of all services involved in a transaction.
  • Build and deployment patterns
    • Build and deployment pipeline: continuous integration and continuous delivery pipeline
      • Code compiled
      • Unit and integration tests run
      • Run-time artifacts created
      • Machine image baked
      • Image committed to repo
    • Infrastructure as code: when the microservice is compiled and packaged, we immediately bake and provision a virtual server or container image with the microservice installed on it.
    • Immutable servers: after an image is baked and deployed, no developer or system administrator is allowed to make modifications to the servers.
    • Phoenix servers

猜你喜欢

转载自www.cnblogs.com/HeCG95/p/11797189.html
six
今日推荐