Springcloud understand the article
I. Overview of MICRO Services1, what is micro-service
The current micro-service does not have a unified standard, is generally divided into business to the traditional one-stop application, split into a service, completely to the coupling, a micro-service is a single-function business, only do one thing.
The opposite of the micro-service is called the boulder.
2. Micro-service and micro-service architecture
- MicroServices are an architectural pattern or an architectural style that advocates dividing a single application into a small set of services = = Standalone Deployment = =, the services are coordinated and co-ordinated, and each service runs in its own = = Process = =.
- Lightweight communication between services and services, such as the RESTful API for HTTP
- Avoid a unified, centralized service management mechanism
3. Advantages and disadvantages of micro-service
Advantages
- Each service is cohesive enough to be small enough to focus easily
- Development is simple and efficient, and a service only does one thing
- Development team small, generally 2-5 people enough (of course, according to the actual subject)
- MicroServices are loosely coupled, both development and deployment can be done independently
- Micro-services can be developed in different languages
- Easy and third-party integration, microservices allow easy and flexible automated integration deployments (continuous integration tools with Jenkins,hudson,bamboo, etc.)
- MicroServices are easily understood, modified, and maintained by developers, allowing small teams to focus more on their work, without having to work together to reflect value
- MicroServices allow you to incorporate the latest technology
- = = MicroServices are just code for business logic and do not fuse = = with html,css or other interface components.
- = = Each micro-service can have its own storage capacity, the database can be owned or unified, very flexible = =.
Disadvantages
- Developers to deal with the complexities of distributed systems
- Multi-service operational difficulty, with the increase in service, operation and maintenance of pressure will also increase
- Dependent System Deployment
- Cost of inter-service communication
- Consistency of data
- System Integration Testing
- The difficulty of performance monitoring
4, micro-service technology stack
Micro-Service entry |
Landing Technology |
Service development |
Springboot,spring,springmvc |
Service Configuration and Management |
Netflix's Archaius, Ali's diamond, etc. |
Service Registration and Discovery |
Eureka, Consul, zookeeper, etc. |
Service invocation |
Rest, RPC, GRPC |
Service Fuse |
Hystrix, envoy, etc. |
Load Balancing |
Ribbon, Nginx, etc. |
Service Interface Invocation (a simplified tool for client invocation of services) |
Feign, etc. |
Message Queuing |
Kafka, RabbitMQ, ACTIVEMQ, etc. |
Service Configuration Center Management |
Springcloudconfig, chef, etc. |
Service Routing (API Gateway) |
Zuul, etc. |
Service Monitoring |
Zabbix, Nagios, Metrics, specatator, etc. |
Full Link Tracking |
Zipkin, brave, dapper, etc. |
Service Deployment |
Docker, OpenStack, kubernetes, etc. |
Data Flow Operations Development Package |
Springcloud Stream (Package and Redis,rabbit,kafka, etc. send to receive messages) |
Event message Bus |
Springcloud Bus |
Ii. Overview of Springcloud Introduction
Spring's three main modules: Springboot (build), Spring Cloud (orchestration), Spring Cloud Data Flow (Connect)
1. What is Springcloud?
- Simplified version of Distributed Systems (official introduction)
- Springcloud provides a complete suite of microservices solutions based on Springboot, including service registration and Discovery , Configuration Center , full link monitoring , service Gateway , load Balancing , fuses and other components , in addition to the high-abstraction package based on Netflix's open source components, there are some types of neutral open source components
- Springcloud simplifies the infrastructure development of distributed systems with the development convenience of Springboot, Springcloud provides developers with tools to quickly build distributed systems, including configuration management, service discovery, circuit breakers, routing, micro-proxies, event busses, Global, decision-making, distributed sessions, and so on, they can be started and deployed with Springboot development style.
- = = In a nutshell: Springcloud is a one-stop solution under the distributed micro-service architecture, and it is the geometry of each microservices architecture landing technology, commonly known as the Micro service family bucket = =
2. The relationship between Springcloud and Springboot
Springboot: Focus on rapid and convenient development of individual micro-services (focus on micro)
Springcloud: Focus on the global micro-service Coordination governance framework, the springboot development of a single micro-service group management together (focus on macro)
Note : Springboot can leave springcloud for standalone use, but Springcloud can not leave Springboot, which is a dependency
3,Dubbo and Springcloud comparison
|
Dubbo |
Spring |
Service Registration Center |
Zookeeper |
Spring Cloud NETFILX Eureka |
Service invocation Mode |
Rpc |
REST API |
Service Monitoring |
Dubbo-monitor |
Spring Boot Admin |
Circuit Breaker |
Not perfect |
Spring Cloud Netflix Hystrix |
Service Gateway |
No |
Spring Cloud Netflix Zuul |
Distributed configuration |
No |
Spring Cloud Config |
Service tracking |
No |
Spring Cloud Sleuth |
Message bus |
No |
Spring Cloud Bus |
Data flow |
No |
Spring Cloud Stream |
Bulk tasks |
No |
Spring Cloud Task |
Maximum Difference
(1) Spring cloud discards RPC traffic and uses an HTTP-based rest approach. Spring Cloud sacrifices the performance of service invocations, but it also avoids the problems caused by native RPC. Rest is more flexible than RPC, there is no code-level strong dependency, and the emphasis on rapid evolution
Micro-service environment, it is clearly more appropriate.
(2) Dubbo-like Assembly machine, Spring cloud-like all-in-one machine
(3) Community support and strength: Dubbo has been suspended for 5 years, although restarted, but the new demand for technology development, or the need for developers to expand their own, for small and medium-sized companies, it seems more time-consuming and laborious, there is not necessarily a strong ability to modify the source code
Summarize
The problem domain is not the same: Dubbo is positioned as an RPC framework, and the goal of Spring Cloud is a one-stop solution under the microservices architecture
think too much, do too little, the middle of the gap is trouble. Want to have no trouble, either don't think, or do more. Lieutenant Colonel "8"
"Springcloud" (1)---springcloud introductory article