java version b2b2c social electricity supplier Spring Cloud to build micro Services Architecture - Service registration and discovery

About Spring Cloud
Spring Cloud is a cloud-based application development tool Spring Boot achieve, it is a cloud-based configuration management application developers involved in the JVM, service discovery, circuit breakers, intelligent routing, micro broker, a control bus, a global lock, decision-making campaign, distributed and clustered session state management and other operations provides a simple way of development.

Spring Cloud contains a number of sub-projects (for distributed systems involved in a number of different open source products), such as: Spring Cloud Config, Spring Cloud Netflix, Spring Cloud0 CloudFoundry, Spring Cloud AWS, Spring Cloud Security, Spring Cloud Commons, Spring Cloud Zookeeper, Spring Cloud CLI and other projects.

Micro Services Architecture
"micro Services Architecture" in the past few years is very hot, so that on the micro-architecture services related to open source products are repeatedly mentioned (for example: netflix, dubbo), Spring Cloud also due to strong visibility and impact of the Spring community force has also been the majority of architects and developers concern.

So what is the "micro Services Architecture" mean? Simply put, micro Services Architecture is a complete application from the data storage start vertical split into multiple different services, each service can be deployed independently, separate maintenance, an independent extension, such as room service and service by the RESTful API way to call each other.

For the "micro Services Architecture", you can search the Internet to many research articles related to the introduction and to learn and understand. Ancestor may also read Martin Fowler's "Microservices" (Chinese version translated click to see), we do not do more introduction and description.

Service Governance
After a brief introduction to Spring Cloud and micro-service architecture, following the return thrust of this article, how to use Spring Cloud to implement service governance.

Since the Spring Cloud made abstract interface layer service management, so in Spring Cloud applications can support many different services governance framework, such as: Netflix Eureka, Consul, Zookeeper. Under the influence of Spring Cloud service management abstraction layer, we can achieve seamless switching service governance, and does not affect any other service registration, service discovery, service calls and other logic.

So, let's appreciate the benefits of this layer of abstraction Spring Cloud brought realize introduce two service governance through.

Spring Cloud Eureka
First, let's try to use Spring Cloud Eureka to implement service governance.

Spring Cloud Eureka is a service management module in the Spring Cloud Netflix project. The project is one of Netflix Spring Cloud Spring Cloud subprojects, the main contents of the package is a series of open source products company Netflix, which offers Netflix OSS integration of self-configuration for Spring Boot application. With a few simple annotations, developers can quickly configure it in the application module and used to build large distributed systems. The main module include: service discovery (Eureka), circuit breaker (Hystrix), intelligent routing (Zuul), client load balancing (Ribbon) and so on.
From now on, I will be here to build process and the essence of the recent development of micro-services cloud architecture springcloud record, have a friend help more interested in spring cloud development framework, I hope to help more good scholars. We come together to explore the process of spring cloud architecture to build and how to apply enterprise projects.
Social e-commerce platform source code, please add penguin beg: three four five three six II qi II fifty-nine

Guess you like

Origin www.cnblogs.com/itcode-code/p/11198741.html