Talk about MicroServices architecture and applications

Source: Internet
Author: User

>> Micro-service Architecture

With the development of agile development, continuous delivery and Docker-based application deployment, the MicroServices architecture is becoming more and more popular.

>> Application Architecture Evolution(1) Vertical Application Architecture

Traditional lamp architectures and spring+struts+ibatis/hibernate architectures are typical vertical application architectures, with low learning costs for vertical application architectures, fast development output, simple testing, deployment, and operations, which have been popular for the past more than 10 years.
However, with the development of the business, the vertical application architecture gradually exposes some defects, taking the spring MVC architecture as an example, the possible performance:
1. The development and maintenance costs of complex applications are increasing, testing becomes difficult, and deployment efficiency is becoming less efficient.
2. Team communication costs rise, collaboration becomes worse, it is difficult to guarantee the quality of code.
3. Similar to the barrel effect, due to the existence of some short board, the system performance is difficult to guarantee.
4. Maintenance and customization become difficult, new features on-line cycle longer, difficult to achieve rapid iteration.

(2) RPC schema

When the vertical application is more and more, the interaction between applications is unavoidable, RPC can improve the business reuse and split.
After the application of large-scale service, there are many problems in service governance.

(3) SOA service-oriented architecture

SOA is a coarse-grained, loosely-coupled service-centric architecture that communicates between interfaces through well-defined protocols and interfaces.

(4) Micro-service architecture

MicroServices are a service-based architecture style that enables decoupling of solutions by dispersing functionality across discrete services.

>> Micro-service Architecture Analysis(1) Micro-service architecture

MicroServices are the development of a single, small, but business-capable service, each with its own processing and lightweight communication mechanisms that can be deployed on a single or multiple servers.
MicroServices also refer to a kind of loosely-coupled, service-oriented architecture with a certain bounded context. That is, if each service is to be modified at the same time, then they are not microservices because they are tightly coupled.

(2) Micro-service architecture vs. SOA

The main differences between the two are as follows:
1. Granularity of service splitting
2. Service Dependency
3. Service Scale
4. Architectural Differences
5. Service governance
6. Agile Delivery


advantages and disadvantages of >> micro-service Architecture

The advantages and disadvantages of microservices are like the two sides of a coin, according to the actual situation of the project reasonable decision to choose which structure.

(1) The advantages of micro-services are obvious

1. Avoid Unlimited system expansion
Each service is simple, focused only on a business function, avoiding the original complexity of the endless accumulation. Each micro-service focuses on a single function and clearly describes the service boundary through a well-defined interface.
2. Standalone deployment
Since MicroServices have a separate running process, each microservices can also be deployed independently.
3. Micro team independent development, flat management
With its small size and low complexity, each microservices can be fully controlled by a small-scale development team, maintaining high maintainability and development efficiencies.
4. Can be developed in different programming languages and tools
The different modules do not have to be related to the specific implementation.
5. Improved scalability
Monolithic architecture applications can also be scaled-out to completely replicate the entire application to different nodes. When the different components of the application differ in the scale requirements, the MicroServices architecture demonstrates its flexibility because each service can be scaled independently according to the actual requirements.

7. Fault tolerance
When a build fails, in the traditional architecture of a single process, the failure is likely to spread within the process, resulting in the application of global unavailability. In a microservices architecture, failures are isolated in a single service. If the design is good, other services can achieve application-level fault tolerance through the mechanism of retry and smooth degradation.

(2) Some shortcomings of the microservices architecture

1. Complexity of distributed systems
As a distributed system, microservices introduce complexity and several other problems, such as network delay, fault tolerance, message serialization, unreliable network, asynchronous, versioning, load change in the application layer, and so on.

2. Code duplication
MicroServices emphasize the need for small-scale teams to develop independently, and it is not recommended to use a global public class library. will cause code duplication to some extent.

3. Testing cumbersome
The decentralized deployment of microservices makes testing cumbersome compared to vertical application architectures.

>> Micro-service architecture Best Practices(1) Use of distributed and automated micro-service operation and maintenance

The impact of large-scale micro-service on operation and maintenance system is supported by using linear growth and elastic capacity of distributed system.
The main such as distributed performance data and log acquisition system;
Distributed summarization and computation framework;
Distributed file storage service;
Distributed log retrieval service and so on.

(2) Docker-based containerized deployment

The content comes from the notes collation:
The principle and practice of Distributed Service Framework (Li Lin)
Micro-service Combat: Advantages and disadvantages of micro-service architecture

Talk about MicroServices architecture and applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.