Definitions

Small autonomous services that work together - Sam Newman -

In short, the microservices architectural style is an approach to developing a single application as a suite of small services, each running in it’s own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies - James Lewis & Martin Fowler -

Consider somethings about Microservices

  • REST
  • Small deploy units
  • Cloud enabled
    • Each single microservice able to have multiple instances.
    • Easy to scale up & down an instance of microservice when needed (This should not involved a lot of configuration).

Challenges

  1. Bounded Context
    • How to identify right boundaries each microservice todo (what should it do or not), follow the Domain Driven Design (DDD).
  2. Configuration Management
    • Handle multiple environments among microservices.
  3. Dynamic Scale Up & Down
    • Bring up the instance when high load and bring down when not really needed.
    • Dynamic load balancing to distribute among instances.
  4. Visibility
    • Capability to identify the problem among microservice instances, need to have centralized log to identify the problem.
    • Monitoring around the microservices (able identify which microservice down).
  5. Pack of Cards
    • Fault tolerance in around microservices to prevent impact between microservices (prevent taking down all microservices when one service goes down).

Java approach Solutions

  1. Spring Boot
  2. Spring Cloud
  3. Netflix Eureka Server
  4. Netflix Zuul
  5. MQ/ Kafka
  6. Zipkin/ Elasticsearch
References: