The open-capacity-platform recommended in this issue is an enterprise-level microservice framework based on layui+springcloud (user rights management, configuration center management, application management…). )
Project Brief Introduction
open-capacity-platform is an enterprise-level microservice framework based on layui+springcloud, its core design goals are to separate the front and back ends, rapid development and deployment, simple learning, powerful functions, and provide quick access to core interface capabilities, and its goal is to help enterprises build a framework similar to Baidu’s capability opening platform;
Peculiarity:
Enterprise-level microservice architecture based on Layui front-end and back-end separation
Compatible with Spring Cloud Netflix & Spring Cloud Alibaba
Optimize the internal implementation of Spring Security to achieve a unified exit of API calls and a permission authentication authorization center
It provides complete enterprise microservice traffic monitoring and log monitoring capabilities
A common microservices architecture applies non-functional (NFR) requirements and is easier to reuse across different projects
Provide a complete stress testing program
Provides a complete grayscale release solution
Provide a complete microservice deployment solution
Code structure
Get started quickly
Environment Version:
JDK Installation:
yum install java-1.8.0-openjdk* -y
Mysql:
wget http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm
yum localinstall mysql57-community-release-el6-8.noarch.rpm
Project Import:
Select From
https://gitee.com/owenwangwen/open-capacity-platform Download to your local address
Select open-capacity-platform, right mouse button, run as maven build…
Enter clean package install to compile the installation
The IDEA project import process is in more documentation
Start the project
Registry
register-center/eureka-server
API Gateway (ingress of global routing)
api-gateway and new-api-gateway
One is to use Zuul, and the other is to use SpringCloudGateway, which will be introduced in a later document, just choose one of them to start
Certification Center
Business Center
Web management
Architectural design diagram
Technical architecture
Technical architecture request process
System processes
General introduction
The OCP capability platform meets the non-functional requirements (NFR) of microservice architecture applications, and the non-functional requirements are not related to the application itself, and the experience related to non-functional requirements accumulated in project development can be more easily reused in different projects.
Service management
Through the OCP capability platform, you can call various management interfaces provided by the registry to implement service management. In my experience, service management generally includes the following operations:
Services are available online and offline. When a new service is launched, you can add a new service by calling the service add interface of the registry, and when you want to take down an existing service, you can also delete a service by calling the service cancellation interface of the registry.
Node addition/removal. When you need to add a new node to a service, you can call the node registration API of the registry to add a new node to the service. When a faulty node appears or you want to temporarily take some nodes offline, you can call the node anti-registration API of the registry to delete the node.
Service Inquiries. This operation will call the service query interface of the registry, which can query how many services are registered in the current registry and the detailed information of each service.
Service node query. This operation will call the node query interface of the registry to query the total number of nodes under a service.
Service governance
Through the OCP capability platform, you can call the APIs provided by the configuration center and dynamically modify various configurations to implement service governance. In my experience, common service governance methods include the following:
Rate limiting. Generally, when the system fails, for example, Weibo may multiply the traffic several times in a short period of time due to the occurrence of hot emergencies, exceeding the maximum capacity of the system. In this case, you need to call the interface of the configuration center to modify the rate limiting threshold of non-core services, so as to reduce the call of non-core services and leave sufficient redundancy for core services.
Demote. Like throttling, degradation is a response in the event of a system failure. Either because of the arrival of sudden traffic, the capacity of the system is insufficient, and some non-core services can be downgraded to increase the redundancy of the system. Either the system is slowed down due to some dependent service problems, and you can downgrade the call to the dependent service to avoid being dragged to death.
Service monitoring
The OCP capability platform generally includes two levels of monitoring. One is the overall monitoring, such as the service dependency topology diagram, which visualizes the invocation relationship and dependency between services in the entire system; One is the monitoring of specific services, such as QPS, AvgTime, P999 and other monitoring metrics of the service. The overall monitoring can be displayed using the service dependency topology diagram provided by the service tracking system, and the specific service monitoring can be displayed through the monitoring system UI such as Grafana.