“This is the 18th day of my participation in the August Gwen Challenge.

1. Monomer application

The ones that we use are idea-based, monolithic applications,

Pain points of monomer application:

During the on-line testing of the monolithic system, we will project

1. Resolve conflict

2. Test launch (regression test)

3. Before creating a new feature –> possibly testing the previous version of the code,

Code conflicts — merges — regression testing of full functionality, which is time-consuming,

4. It is difficult to cooperate among teams, with few test servers and low efficiency;

About five people, maintenance of a single application, we can understand;

Another is technical version iteration, which may cause big problems with other people’s code; (At risk)

Summary: Punching in a day, about singleton applications that only apply to a few people on the maintenance team, may appear

  • 1. Frequent conflicts and conflict resolution
  • 2. Carry out tests. If no function is updated, all tests should be carried out before launching.
  • 3. Low efficiency and long time consumption between different groups
  • 4, want to do technical upgrade, may have the potential risk to others’ code

So, we introduced microservices, a single service, independence, separate functionality and architecture upgrades,

2. Technical evolution of domestic Internet BAT microservice architecture:

Microservice architecture design:

  1. Independence, increased flexibility

  2. The efficiency of r&d will increase a lot

  3. Low coupling, high cohesion of their own methods,

  4. Test, go live, and increase efficiency during invocation

  5. Multi-environment isolation:

Test environment service A, can only call the test environment service B,(can not call the production environment or pre-environment service)

Registration Center:

Equivalent to service address lists, service discovery and service registration;

The framework of RPC: remote calls

2.1 Components of microservices:

   

  • Configuration center: Configuration files in each service take effect immediately after modification
  • Monitoring center: compare each service, IO, disk network, whether the service call times, whether the service exists, downtime, etc
  • Link monitoring: calls between services, time between links, etc
  • Log center: Logs of each service are stored by category
  • Service governance: (Service governance, governance, and)

Dubbo +zookeeper; Service invocation and as a registry

After the application of a single unit is directly divided into multiple services, problems such as efficiency and maintenance of the single unit can be solved. However, the domestic Internet giants are all self-developed technical solutions.

Small and medium-sized companies generally use Dubbo + ZooKeeper as the foundation to implement microservices

3. Development of microservices architecture in Silicon Valley abroad

Netflix, as Spring Cloud, is integrated into the Spring community, Eureka is the registry for Netflix’s launch, Zool is a gateway, and Config is a configuration center

Distributed transactions — now many companies are using some of the Redisson, Zookeeper from Ali Open source

After dubbo was restarted, Ali developed a set of components based on spring Cloud open source, which is called Spring Cloud Alibaba’s technical components based on Spring Cloud system and standards.

  • Registry: NACOS –>Eureka
  • RPC framework: Dubbo –> Feign +ribbon
  • Distributed transactions: seATA –> None
  • Limit current/fuse/degrade: Sentinel –> Hystrix
  • API gateway: None –>zuul

Luca summary

I personally prefer to:

Spring Cloud Alibaba’s technology stack (can be reported to Alibaba’s leg, self-developed, with data verification)+ domestic open source components,(APOLLP, CAT)+Prometheus (system monitoring)

ELK(Log)+ Spring Cloud Gateway(nginx + Lua, Kong, Zuul,API Gateway)

Microservices are more cohesive to their own functions, with lower coupling and higher performance, but then we need to consider data security, performance, and maintainability of multiple services calling each other