Understand microservice architecture from multiple aspects

Definitional aspect

The microservices architectural style is a methodof developing a single application as a set of small services, each running on its own into

In the process, communication between services adoptslightweight communication mechanism (usually using HTTP resource API). These services are built around business capabilities and can

Deploy independently througha fully automated deployment mechanism. These services share a minimal, centralized management and can be opened in different languages

development, using different data storage technologies.

conceptual aspect

Microservices are at the design level, generally consideringhow to logically split the system, that is, vertical splitting. Microservices can

It is distributed, which means that different services can be deployed on different computers. Of course, if the amount is small, it can also be deployed on a single machine.

problem solving

Microservices solvesystem complexity problems: Generally speaking, they arebusiness problems a> means that you have too many responsibilities in a system and need

It needs to be broken up,to facilitate understanding and maintenance, thereby improving the development efficiency and operating efficiency of the system. Microservices are generally targeted at applications. Level

of.

Deployment

Microservice applications can be deployed on the same server, and do not necessarily need to be scattered on multiple servers. Microservice architecture is a project in the cloud

New technologies for deploying applications and services in . Microservice architecture isan architectural pattern whichdivides a complex large application into multiple >

microservices, these small services are running in their own independent processes.

In terms of coupling

Compared with distributed services, microservices have smaller granularity and lower coupling between services. Since each Microservices are composed of independent small

The team is responsible, so it is more agile,Distributed services will eventually evolve to microservice architecture, which is a trend, But service

The challenges brought about by microservices are also obvious. For example, the service granularity is small and the quantity is large, and later operation and maintenance will be difficult.

The relationship between SOA architecture and microservice architecture

SOA is "Service-oriented architecture", which is acomponent model . SOA architectureorganizes different functional units (called services) of the application

Split, these servicesare connected through well-defined interfaces.

  • Services communicate with each other through mutual dependence or through communication mechanisms, and ultimately provide a series of functions. A service usually exists in an independent form and in the operating system process. Each service is called through the network.

  • ESB is the scaffolding for module connection, which is used to connect various service nodes. It does the conversion, interpretation and routing of messages, allowing different services to interconnect.

Finish point

1.

2. ServiceThe interface protocol is not fixed, which is not conducive to system maintenance.

Microservice architecture isan upgraded version of SOA architecture, solves the problem between modules in SOA architecture The problem of possible access errors, microservice architectureuses a single module as

Develop and deploy an independent application, because each application is independent and the coupling between themis very low< /span>, you can flexibly use different programming languages ​​for development.

advantage:

  • Microservice architecture automatic deployment

  • Centralized management of services

  • Support circuit breaker mechanism

  • Very low coupling

Distributed and microservice relationships

Distributed belongs to microservices. Microservices means splitting the module into an independent service unit to implement data through interfaces

interaction. Butmicroservices are not necessarily distributed, because the application of microservices is not necessarily scattered on multiple servers, it can also be

same server. This is also a nuance of distributed and microservices.

Microservices framework

Common mainstream microservice frameworks, such as:Dubbo, Spring Cloud, Spring Cloud Alibaba, etc.

Guess you like

Origin blog.csdn.net/qq_30713721/article/details/134865078