NET Distributed System: micro-Service architecture

Source: Internet
Author: User
Tags app service

Because of the busy work, take the time to the framework encountered problems and framework upgrade design records.

I. Background & ISSUES

The previous framework was a distributed framework based on SOA thought design. Each application is provided by the service mode, and the communication between services is called by RPC method, and the concrete implementation is based on. NET's WCF communication platform. The framework has the following 2 issues:

1, high concurrency processing capacity is insufficient. When a high concurrent request, there may be multiple services pending processing, resulting in a bottleneck throughout the system.

2, with the mobile side widely used, services can not flexibly support app applications.

3, System continuous integration deployment is too cumbersome, the problem is not good positioning.

Based on the above existing problem upgrade framework, combined with the current mainstream architectural ideas, the system of Service thinking, is the "micro-service architecture."

Second, micro-service architecture

The MicroServices architecture (MicroServices Architecture) is the split system into multiple services, commonly known as application services. Application services enable single, specific business application capabilities, support standalone deployment maintenance, and build multiple application services into a system. Application services are carried out through a lightweight communication framework, and support for application services is implemented with different technologies or platforms. MicroServices architecture is another way of implementing SOA architecture design ideas. The MicroServices architecture has the following features:

 1. Micro-Service Architecture Benefits

(1) Scale-out application service to enhance the system concurrency processing ability

(2) Application service independent deployment maintenance, facilitate iterative development and upgrade continuous deployment

(3) Flexible architecture to support multiple technology implementations

(4) Enabling high availability of application services

2, micro-service architecture is insufficient

(1) The system design has certain requirements, especially the Separation Technology Application service Interface

(2) Improve the complexity of system implementation

(3) need to ensure system data consistency mechanism

(4) lead to system maintenance requirements and cost improvement

Whether the system needs to be built with a microservices architecture is determined by the project requirements. Using MicroServices architecture to design and build systems, the ability of team members is higher than traditional requirements, especially the design ability.

Three, the Framework design principles

1, extensible: Support does not modify the system functions, on-demand expansion of server resources.

2, High Availability: support distributed deployment of dual-machine hot standby mechanism to meet the requirements of high availability of the system.

3, High concurrency: Support the rapid expansion of application services processing capacity, improve the system processing capacity to meet concurrent requests.

4, Security: Access security through unified authentication access, information security through encryption and decryption, signature transmission, network security through network isolation and firewalls, data security through scheduled backup and high fault-tolerant ability.

5, consistency: the adoption of the final data consistency strategy.

Four, the framework of the overall design

    

Figure 1-System architecture

, the system architecture is based on the idea of SOA architecture design and is designed and built using a microservices architecture approach. Separates the system rendering from the data. System rendering is implemented based on Web page, and supports various front-end UI framework integration and custom development; Data is provided by app service and is used uniformly through the Gateway API. The architecture supports high availability and concurrent processing capability through Network layer, application layer load balancing middleware, etc. Architecture constructs some basic public functions to be built into middleware.

1, Gateway API: application services through the Gateway API to provide unified external services. The Gateway API is based on the HTTP protocol, provides the unified service interface in a restful manner, contracts the interface Communication protocol, supports the system rendering function, and satisfies the different clients in a lightweight way of communication. The Gateway API implements unified data access control, routing application services, and current limiting functions.

2, Message platform: Responsible for updating the synchronization information between application services, the original system architecture Distributed transaction Call Update information, adjust to the message asynchronous publish/subscribe processing, to ensure the final consistency of data, application services to reduce coupling and strong dependency relationship. High concurrency capability, the cache function is obtained.

3, the Service Registration Monitoring center: Responsible for the application service registration published registration, while monitoring the application Service interface operation, support the dynamic Control application service to receive requests, to achieve "de-centralized" service control. Components to achieve service registration, monitoring and other functions.

4, Certification Center: Responsible for the structure of access to unified identity authentication. Access is controlled through user passwords and permissions. With "Gateway API" to achieve secure access, current limit and other functions, while implementing page management functions.

5, log Management system: Responsible for recording system logs, providing service interfaces and components, the business code through the asynchronous transfer of log information to the "message platform", the log management system subscribes to the "message platform" log information for processing storage. Also provides log management capabilities

6, the Cache Center: based on the Redis distributed memory database, the Architecture Unified Cache Center, provides the unified cache service.

Five, software architecture design

Diagram Software Architecture

, the system architecture is developed in the form of micro-service architecture, and the vertical independent development of each application service from the aspect observation is divided into four levels from top to bottom, which are the web layer, the Service interface layer, the business logic layer and the data access layer respectively. The web layer is mainly responsible for the presentation of system functions, directly facing the users; The service interface layer is mainly responsible for providing standardized service interfaces, interfacing with the presentation layer, and the business logic layer mainly implements the application business logic, which is the core part of application service; The data access layer is responsible for data persistence and supports the business logic layer. The isolation between the layers through the interface facilitates subsequent maintenance expansion and reduces dependencies and impacts.

The application service completes the development after the integration is deployed. The web layer is integrated into the Web application container according to the conventions, the remaining layers are built for deployment to the app service, and the service interface is used for registration and publishing.

Vi. Conclusion

Infrastructure design In this way, you also need to consider implementation deployment, you can consider the cloud platform elastic resources, and then combined with Docker container technology.

The following step introduces the design and implementation principle of the related basic components. The technical framework focuses on solving problems, designing dependent requirements, and sourcing actual business scenarios.

Author: Liu Zaitao
Source: Http://www.cnblogs.com/Andon_liu
About the focus on Microsoft Platform Project architecture, management. Familiar with design patterns, domain drivers, architecture design, agile development and project management. is mainly engaged in ASP, Wcf/web API, SOA, MSSQL, Redis aspects of project development, architecture, management work. If you have questions or suggestions, please learn to discuss together!
This article is copyrighted by the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link.
If you have questions, you can email: [Email protected] contact me, thank you.

NET Distributed System: micro-Service architecture

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.