This is the 17th day of my participation in the August Challenge

I. Official definition

  • Microservices are small services made up of a single application
  • With its own processes and lightweight processing, services are designed according to business functions
  • Deploy in a fully automated manner
  • Communicate with other services using the HTTP API
  • At the same time, services will use the minimum scale of centralized management (such as Docker) technology, services can be used in different programming languages and databases, etc.

2. Single application before microservice

advantages

  • Low learning cost and quick development
  • It is convenient for testing, deployment, operation and maintenance
  • One man can Carry the field

disadvantages

  • Inefficient deployment
  • Team development is expensive
  • The system high availability is poor
  • Online publishing is slow

Third, service

Problem solved

  • Born for the shortcomings of monomer applications
  • Solve single application expansion, team expansion high coupling degree, low cooperation efficiency

concept

The local method call generated by JAR package dependency in traditional stand-alone application is transformed into method call generated by RPC interface.

4. Micro services

concept

Since 2014, with

  • The continuous expansion of mobile Internet scale
  • Agile development
  • Continuous interaction
  • The maturity of containerization technology represented by Docker
  • And the rise of DevOps culture
  • The idea of servitization evolved further

Monomers evolved into what we know today as microservices, as opposed to monomers

  • Service separation is more granular

    Microservices can be said to be the servitization of finer dimensions, as small as a sub-module, as long as the module depends on resources unrelated to other modules, then it can be split into a microservice

  • Independent service deployment

    Each microservice strictly follows the principle of independent packaging and deployment, and does not affect each other. For example, a physical machine can deploy multiple Docker instances, and each Docker instance can deploy a microservice code

  • Service independent maintenance

    Each microservice can be developed, tested, released, and operated by a small team or even an individual, and is responsible for its entire life cycle

  • Service governance capability is highly required

    After being split into micro-services, the number of services increases, so a unified service governance platform is required to manage each service.

To highlight

Don’t expect microservices to help you solve complex business problems that can’t be solved alone.