Spring Cloud is a hot topic in recent years, many large companies are also gradually transforming the use of spring cloud to improve the various development models, I think mainly by the spring team development, so that there will be so many users, in the Java field No one does not know spring , spring boot is designed to simplify some of the cumbersome configuration development spring and also to prepare for the spring cloud build. Spring cloud reduces the need to build large systems from a technical architecture, enabling us to build an efficient, distributed, fault-tolerant platform at a very low cost.
What is Spring Cloud ????
Spring Cloud is a spring boot-based cloud application development tool for configuration management, service discovery, circuit breakers, intelligent routing, micro-agents, control buses, global locks, decision-making campaigns, Operations such as distributed sessions and cluster state management provide a simple way to develop.
MicroServices are service units that can be deployed independently, horizontally scaled, independently accessible (or have a separate database), Springcloud is the butler of these microservices, and with the micro-service architecture, the number of projects can be very large, and Springcloud as a big housekeeper needs to manage these microservices, Nature needs a lot of little brother to help.
The main younger brothers are: Spring Cloud Config, Spring Cloud Netflix (Eureka, Hystrix, Zuul, Archaius ... ), Spring Cloud Bus, Spring Cloud for Cloud Foundry, Spring Cloud Cluster, Spring Cloud Consul, Spring Cloud Security, Spring Cl Oud Sleuth, Spring Cloud Data Flow, Spring Cloud Stream, Spring Cloud Task, Spring Cloud Zookeeper, Spring cloud connectors, SPR ing cloud starters, Spring Cloud CLI, each younger brother with a unique stunt martial arts strength below to do a brief introduction.
The heart of the Big Brother
Spring Cloud Netflix
This is a big boss, second only to the boss, the boss of various services rely on it, with a variety of Netflix OSS components integration, the core of the micro-service, its younger brother mainly have Eureka, Hystrix, Zuul, Archaius ... Too much
Netflix Eureka
Service Center, Cloud service discovery, a REST-based service for locating services to enable mid-tier service discovery and failover in the cloud. This is springcloud the most nose of the younger brother, service center, any younger brother need to support anything from here to take, the same you have what unique martial arts have hurried over the report, convenient for other younger brother to call; its advantage is that you do not need to find all kinds of little brother support, Just need to go to the service center to pick up, do not need to know the support of the other brother where, or a few younger brother to support, anyway to use on the line, service center to ensure stability and quality.
Netflix Hystrix
fuses, fault-tolerant management tools, designed to control the nodes of services and third-party libraries through a fusing mechanism, providing greater fault tolerance for latency and failure. For example, suddenly a younger brother is ill, but you also need its support, and then after the call it does not respond, you do not know, has been waiting for this response; there may be other younger brother is also calling your martial arts stunt, then when the request is more, there will be serious obstruction affecting the overall plan of the boss. This time hystrix come in handy, when Hystrix found a little brother not in the state of instability immediately immediately let it off the line, let other younger brother come to the top, or to you said don't have to wait for this younger brother today certainly not, why do hurry to do not in this queue.
Netflix Zuul
Zuul is a framework for providing dynamic routing, monitoring, resiliency, security and other edge services on cloud platforms. Zuul corresponds to the front door of all requests from the Web site backend of the device and Netflix streaming app. When other door sent to look for eldest brother must first go through the Zuul, see if there is a knife or something to intercept back, or need to find that little brother directly to take the past.
Netflix Archaius
The Configuration Management API, which includes a series of configuration management APIs, provides features such as dynamic typed properties, thread-safe configuration operations, polling frameworks, callback mechanisms, and more. can achieve dynamic access to the configuration,
The principle is that every 60s (by default, configurable) reads the content from the configuration source once, so that modifying the configuration file does not require a restart of the service to make the modified content effective, provided that the Archaius API is used to read.
Spring Cloud Config
Commonly known as the configuration Center, the Configuration Management Toolkit lets you put the configuration on a remote server, centralize the management of the cluster configuration, and currently supports local storage, git, and subversion. Is that after all the weapons, guns fire what things are concentrated put together, do not casually take their own, convenient later unified management, upgrade equipment.
Spring Cloud Bus
event, message bus, used to propagate state changes in a cluster (for example, configuration change events), which can be combined with Spring Cloud config for hot deployment. Equivalent to the water margin in the day 800 in the Dai Zong of God, to ensure that the message between the younger brother keep unblocked.
Spring Cloud for Cloud Foundry
Cloud Foundry is the industry's first open source PAAs cloud platform from VMware, supporting a broad range of frameworks, languages, runtime environments, cloud platforms, and application services, enabling developers to deploy and scale applications in seconds without worrying about any infrastructure issues
In fact, it is a set of solutions integrated with Cloudfoundry, embracing the thighs of cloud foundry.
Spring Cloud Cluster
Spring Cloud cluster will replace spring integration. Provide the basic function support of the cluster in the distributed system, such as: election, state consistency of cluster, global lock, tokens and other common state pattern abstraction and implementation.
If you organize different gangs into a unified whole, Spring Cloud cluster has provided you with a lot of handy tools for organizing.
Spring Cloud Consul
Consul is a service software that supports distributed, highly available service discovery and configuration sharing in multiple datacenters, developed by Hashicorp in the Go language, and open source based on the Mozilla Public License 2.0 protocol. Consul supports health checks and allows HTTP and DNS protocol call APIs to store key-value pairs.
Spring Cloud Consul encapsulates Consul operations, and Consul is a service discovery and Configuration tool that integrates seamlessly with Docker containers.
Involvement with spring boot
Spring boot is a set of spring's fast-provisioning scaffolding that enables rapid development of a single microservices based on spring boot, and Spring cloud is a spring boot-based cloud application development tool; Spring boot focuses on fast, A single individual that is easy to integrate, Spring Cloud is a global service governance framework; Spring boot uses a default greater than the configuration concept, many integration options have been chosen for you, can not be configured without configuration, a large part of Spring cloud is based on spring Boot to implement, can not be based on spring boot? No.
Spring boot can leave spring cloud to use the development project independently, but spring cloud is dependent on spring boot.
Spring, Spring booot > Spring Cloud.
The benefits of Spring cloud
Micro-service Framework so many such as: Dubbo, Kubernetes, why should you use Spring cloud?
- Spring in the production of the family, spring in the enterprise-level development framework of no one can rival, a big, can guarantee the subsequent update, perfect. For example, Dubbo is almost dead now.
- Spring boot this independent gan can save a lot of things, big and small live spring boot are doing quite well.
- As a micro-service governance of the big guy, considered very comprehensive, almost all aspects of service governance are taken into account, easy to develop out of the box.
- Spring Cloud is highly active, the tutorials are rich, and it's easy to find a solution when you encounter problems
- A few lines of code to complete the fuse, the balance of responsibility, service center of the various platform functions
Spring Cloud also has a drawback, which can only be developed using Java, and is not suitable for small, standalone projects.
Spring Cloud (i) takes you into a distributed