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 is the microservice of Spring Cloud?

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

Share

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

1. What is microservice architecture? microservice architecture is a design style in system architecture that splits large systems into N small services, all of which run in their own threads and communicate with each other through the HTTP protocol. Its own data storage, business development, automated testing and independent deployment mechanisms can be written in different languages.

Summary: the idea of micro-service architecture not only stays in the development stage, but also runs through the software life cycle of design, research and development, testing, release, operation and maintenance.

two。 Architecture and system

Example architecture:

2.1 Microservice release-continuous integration

3. Nine characteristics of micro-service architecture: service componentization

Components are units that can be replaced and upgraded independently. Just like the memory in PC, CPU. Organize teams by business

-- the attitude of requiring personnel to do "products" with full-stack skills

-- responsible for the entire product life cycle, rather than doing "project" delivery attitude smart endpoints and dumb pipes

-- the mode of communication between microservices:

-RESTful API of HTTP

-MessageMQ message queue decentralized governance

Not every problem is a nail, not every solution is a hammer. Decentralized data management

-- maintain the data storage of each service independently, make "nothing" invocation between services as far as possible, and automate the infrastructure for maintaining data consistency through compensation mechanism.

-- automated testing

-- Fault-tolerant design for automated deployment

Each service implements monitoring and logging components, such as service status, circuit breaker status, throughput, network data and other key data dashboard evolutionary design

-- initial monomer, gradually split, extract common components 4. Micro-service selection

Dubbo is the technical crystallization of Alibaba's years of building production-level distributed micro-services. It has rich service governance capabilities and has a great influence in the domestic technology community. Currently, there are more than 16k stars on github. Dubbo is essentially a Java-based RPC framework, and Dangdang Dubbox extends the ability of Dubbo to support RESTful interface exposure.

Dubbo is mainly oriented to Java technology stack, lack of cross-language support is one of its weaknesses, in addition, because governance capabilities are so rich that this framework is relatively heavy, the threshold to make full use of this framework is relatively high, but if your enterprise basically invests in Java technology stack, choosing Dubbo allows you to stand on a higher starting point in the service framework, whether it is performance or enterprise-level service governance capabilities, Dubbo does very well.

Sina Weibo's open source Motan (GitHub 4k stars) is also good, and its function is similar to Dubbo, so it can be thought of as a lightweight cut version of Dubbo.

5. Spring Cloud introduction

The Spring Cloud technology stack provides about most of the common modules and functions needed in distributed systems and micro-services

The emergence of Spring Cloud can be said to be a huge support and strong backing for micro-service architecture.

Using Spring Cloud is like buying a brand machine directly. With the integration of the Spring community, you have done a lot of compatibility tests and have better stability.

6. Spring Cloud version management

Http://projects.spring.io/spring-cloud/

7. Spring Cloud component micro-service basic micro-service construction Spring Boot service governance Spring Cloud Eureka client load balance Spring Cloud Ribbon service fault-tolerant protection Spring Cloud Hystrix declarative service invocation Spring Cloud FeignApi gateway service Spring Cloud Zuul distributed configuration center Spring Cloud Config message bus Spring Cloud Bus message-driven micro-service Spring Cloud Stream distributed service tracking Spring Cloud Sleuth

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