Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are microservices and spring cloud?

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail what microservices and spring cloud are. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

First, micro-service architecture

1. What is a microservice?

The concept of microservices originated from an article "Microservices" written by Martin Fowler in March 2014.

Micro-service architecture is an architectural model, which advocates dividing a single application into a group of small services, which coordinate and cooperate with each other to provide users with the ultimate value. Each service runs in its own independent process, and the service and the service communicate with each other using a lightweight communication mechanism (usually a HTTP-based RESTful API). Each service is built around a specific business and can be independently deployed to a production environment, class production environment, and so on. In addition, a unified and centralized service management mechanism should be avoided as far as possible. for a specific service, we should choose the appropriate language and tools to build it according to the business context.

Micro-service is an architectural style. A large and complex software application consists of one or more micro-services. Each micro-service in the system can be deployed independently, and each micro-service is loosely coupled. Each microservice focuses only on completing a task and accomplishing that task well. In all cases, each task represents a small business capability.

2. Architectural features:

3. Traditional development of micro-service vs

Micro services have been used for some time, and this development model is very different from the traditional development model.

The division of labor is different. In the past, we may have been a module, but now it may be a system for each person.

Different architecture, the split of services is a highly technical issue, whether the split is reasonable or not has a great impact on the future development.

Deployment methods are different, and if deployment is estimated to be exhausting as before, automated operation and maintenance is necessary.

Different from disaster recovery, a good micro-service can isolate faults to avoid the overall down of the service, while a bad micro-service design can still cause a chain reaction due to a problem with a sub-service.

Second, brief introduction of Spring Cloud

1. Brief introduction

The official website of the Spring Cloud project: http://projects.spring.io/spring-cloud/

Spring Cloud is an ordered collection of frameworks. It makes use of the development convenience of Spring Boot to skillfully simplify the development of distributed system infrastructure, such as service discovery registration, configuration center, message bus, load balancing, circuit breaker, data monitoring and so on. It can be started and deployed with one button with the development style of Spring Boot. Spring Cloud does not repeat manufacturing wheels, it just combines the more mature service frameworks developed by various companies that can stand the actual test, and shields the complex configuration and implementation principles through Spring Boot style re-encapsulation, and finally leaves a set of distributed system development kits that are easy to understand, easy to deploy and easy to maintain.

Introduction to the system of Spring Cloud

Introduction to the name spring-cloud-aws is used to simplify the integration of Amazon Web Service components spring-cloud-bus events, message buses, and to propagate state changes or events in the cluster. Spring-cloud-cli is used to create Spring Cloud applications on the Groovy platform. The mode of spring-cloud-commons service discovery, load balancing and circuit breaker mechanism provides a general abstraction layer for Spring Cloud clients. Spring-cloud-contract contract testing. Spring-cloud-config configuration management tool, supports the use of git, svn and other storage configuration files. And support the refresh of client configuration information, encryption and decryption configuration content and so on. Spring-cloud-netflix core components, integration of multiple Netflix OSS open source suites. Spring-cloud-security Security Toolkit. Spring-cloud-cloud foundry integrates support for Pivotal Cloudfoundry, the industry's first open source PaaS cloud platform launched by Vmware. Distributed tracking implementation of spring-cloud-consul service discovery and configuration management tool spring-cloud-sleuthSpring Cloud application. Spring-cloud-stream is a message microservice implemented by Redis, RabbitMQ, and Kafka. Spring-cloud-zookeeper service discovery and configuration management components based on ZooKeeper. Spring-boot simplifies the initial construction and development process of Spring applications, and the basic spring-cloud-task developed by springCloud is used to quickly build data processing applications. Spring-cloud-vaultSpring Cloud Vault Config provides client support for externalized configurations in distributed systems. Integration implementation related to spring-cloud-gatewaySpring Cloud gateway. Spring Cloud Data Flow is a cloud-local program and operation model that makes up data microservices on a structured platform. Spring Cloud Connectors facilitates PaaS applications to connect to back-end image databases and message brokerage services on a variety of platforms. Spring Cloud... The number is still increasing.

3 Core functions of Spring Cloud:

Distributed / versioned configuration

Service registration and discovery

Routin

Invocation between services and services

Load balancing

Circuit breaker

Distributed message delivery

From the previous two figures, let's take a look at the running process of each component configuration:

1. Request unified access to internal services through API Gateway (Zuul).

2. After receiving the request, the gateway obtains the available services from the registry (Eureka).

3. After the load is balanced by Ribbon, it is distributed to specific instances at the backend.

4. Microservices communicate with each other through Feign.

5. Hystrix is responsible for handling service timeout circuit breakers.

6. Turbine monitoring service invocation and circuit breaker related indicators

7. Sleuth carries out the requested link tracking and monitoring

Third, sum up

Micro-service is a concept of architecture, which puts forward the design principles of micro-service and provides a guiding ideology for the landing of specific technology from the theory.

So much for sharing about what microservices and spring cloud are. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report