Micro Spring Cloud Services Development: Getting Started, Advanced and source code analysis - 1.3 Spring Cloud middleware

1.3 Spring Cloud middleware

1.3.1 What are the middleware

In recent years, more and more areas have been inseparable from the computer, network technology and general technology. And with the rapid development of computer technology, more software is required operating on many different network protocols, different hardware manufacturers and different network platforms. So this leads to developers need to face the discrete data, operational difficulties, low degree of matching system and the need to develop a variety of application programs to achieve the purpose of operations. Therefore, to produce middleware, reducing the burden on developers to a great extent, making the software run more efficiently. Middleware application system brings, not just a simple development, shorten the development cycle, but also reduces system maintenance, operation and management of workload, but also reduce the overall cost of the computer input.

Middleware is a general term for a class of software, is not a separate software. Software to provide a connection between the system software and application software, to facilitate communication between the various software components, application software for a particular set of software logic system, is an independent software program or service, a distributed software application With this software to share resources between different technologies.

In other words, about middleware, we can be understood as: a class can cooperate to exchange one or more applications, resource sharing mention, while also providing related services for application software. The nature of middleware can be classified as technical architecture, there is a common middleware service management middleware, distribution center, the whole link monitoring, distributed transactions, distributions are regular tasks, messaging middleware, API gateway, distributed caching, database center and the like.

The direction of development of middleware technology, will focus on the elimination of information silos, promote borderless flow of information, support an open, dynamic, changing internet environment, complex application system to achieve a variety of self-government information resources distributed over the Internet ( simple computing resources, data resources, services, resources, software resources), the standard, fast, flexible, credible, high-performance and low-cost integrated, coordinated and comprehensive utilization, increase business agility organization's IT infrastructure, reduce overall operation and maintenance costs, facilitate the matching between IT and business. Middleware is showing operational, service, integration, virtualization, and many other important new trends.

1.3.2 What is Spring Cloud

Spring Cloud From the literal meaning, is dedicated to distributed systems, cloud services framework. Spring Cloud Spring is a whole family of new members, recent popular cloud service is the inevitable outcome.

Spring Cloud provides developers with the tools to quickly build distributed systems some common patterns (such as configuration management, service discovery, circuit breakers, intelligent routing, micro broker, a control bus, a one-time token, global lock, leadership elections, distribution type session, cluster status). Spring Cloud developers can use to quickly stand up and realize these patterns of services and applications. They apply to any distributed environment, including the developer's own laptops, bare metal data center and Cloud Foundry and other hosting platform.

1.3.3 Spring Cloud project module

Spring Cloud provides some common-mode components to quickly build a distributed system developers:

Component Name View project Components Category
Eureka spring-cloud-netflix Registry
Feign spring-cloud-openfeign Declarative HTTP client
Ribbon spring-cloud-netflix Load Balancing
Hystrix spring-cloud-netflix Fuse
Zuul spring-cloud-netflix The first generation of gateways
Sleuth spring-cloud-sleuth Link Trace
Config spring-cloud-config Configuration Center
Gateway spring-cloud-gateway The second generation gateway

1.3.4 Spring Cloud Components Introduction

1.Eureka

Action: Cloud discovery service, a REST-based services, for location services, the intermediate layer in order to achieve the cloud service discovery and failover.

Description: Spring Cloud Eureka is a service management module in the Spring Cloud Netflix project. There are two components that make up: Eureka Eureka server and client. Eureka server as a service registry, supports cluster deployment; Eureka client is a java client for handling service registration and discovery. When the application starts, Eureka clients register their service information to the server, while the server-side caching service information locally. The client and server interact periodic heartbeat to update the service lease and service information.

2.Feign

Role: java http client makes writing easier.

Description: Feign is declarative, templated Netflix HTTP client development using Feign in Spring Cloud, you can do it using an HTTP request to access remote services like local method call, like, a developer which is completely imperceptible in the remote method invocation, but not perceive request access to HTTP.

3.Ribbon

Role: provide cloud load balancing, load balancing a variety of strategies to choose from, and with the use of service discovery and circuit breakers.

Description: Spring Cloud Ribbon is based on HTTP and TCP client load balancing tool, which is based Netflix Ribbon achieved. By Spring Cloud package, it allows us to easily service-oriented REST template automatically converted to service calls requesting client load balancing.

4.Hystrix

Role: fuse, fault management tool designed to control third-party library services and nodes by fusing mechanism, thereby providing a more robust fault tolerance for delay and failure.

Description: In order to ensure availability, single service often cluster deployment. As the network reasons or for their own reasons, the service does not guarantee 100% available, if a single service issue arise, to call this service will be thread is blocked, at this time if the influx of a large number of requests, Servlet container thread resources will be consumed completed , resulting in paralysis of service. Dependencies between services and service failures will spread, will service the entire micro system have serious consequences disastrous, this is the "avalanche" effect service failure.

5.Zuul

Role: Zuul is available on the cloud platform, dynamic routing, monitoring, frame flexibility, security and other edge services.

Description: In order to ensure availability, single service often cluster deployment. As the network reasons or for their own reasons, the service does not guarantee 100% available, if a single service issue arise, to call this service will be thread is blocked, at this time if the influx of a large number of requests, Servlet container thread resources will be consumed completed , resulting in paralysis of service. Dependencies between services and service failures will spread, will service the entire micro system have serious consequences disastrous, this is the "avalanche" effect service failure.

6.Spring Cloud Sleuth

Action: log collection kit, a package Dapper and log-based tracking, and Zipkin and HTrace operation, implemented for a distributed application SpringCloud tracking solution.

7.Spring Cloud Config

Role: Configuration Management Toolkit, so you can put into a remote server configuration, centralized management cluster configuration currently supports local storage, Git and Subversion.

Description: SpringCloud Config providing server and client. The default storage backend server implementations use git, so it is easy to support label version of the configuration environment, and can access a variety of tools for managing content. This is static, it was with Spring Cloud Bus dynamic configuration updates.

8.Spring Cloud Gateway

Role: Spring Cloud official launch of the second generation gateway framework to replace the Zuul gateway. As the gateway traffic, in micro-services system has very role of the gateway routing and forwarding features are common, rights verification, current limit control and so on.

Description: Spring Cloud Gateway as an ecosystem Spring Cloud gateway, designed to provide a simple and effective service for the micro-architecture of unified API routing management, unified access interface, based on the way Filter chain provides the basic functions of a gateway.

Published 151 original articles · won praise 1340 · Views 130,000 +

Guess you like

Origin blog.csdn.net/meteor_93/article/details/104020000