In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
It is believed that many inexperienced people do not know what to do about the construction method of micro-service SpringCloud project architecture. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The version adopted this time is Spring Cloud version and Finchley.RELEASE version.
First, SpringCloud project introduction
Spring cloud:
It provides developers with some tools to quickly build distributed systems, including configuration management, service discovery, circuit breakers, routing, micro-agents, event buses, global locks, decision campaigns, distributed sessions, and so on. It runs in a simple environment and can run on developers' computers.
Spring Boot:
Aims to simplify the creation of production-level Spring applications and services, simplifies configuration files, uses embedded web servers, and contains many out-of-the-box micro-service features (spring cloud is based on springboot, so you need to have some understanding of springboot in development).
II. Introduction of SpringCloud subproject
Netflix Eureka: similar to zookeeper, it is a component for service registration and discovery, which is mainly divided into EurekaServer and EurekaClient,EurekaServer are service registries, and EurekaClient is the client of Eureka (either producer or consumer)
Feign: a declarative pseudo-Http client that makes it easier to write a Http client. With Feign, you only need to create an interface and annotate it. Feign integrates Ribbon by default and combines with Eureka to achieve the effect of load balancing by default.
Spring Cloud Config: configuration management development kit that allows you to place configurations on remote servers, currently supporting local storage, Git, and Subversion.
Spring Cloud Bus: event, message bus, used to propagate state changes in a cluster (for example, configuration change events) and can be hot deployed in conjunction with Spring Cloud Config.
Spring Cloud Netflix: a development kit for a variety of Netflix components, including Eureka, Hystrix, Zuul, Archaius, etc.
Netflix Hystrix: fault-tolerant management tool designed to provide greater fault tolerance for delays and failures by controlling the nodes of services and third-party libraries
Netflix Zuul: edge service tool, which provides dynamic routing, monitoring, resilience, security and other edge services.
Netflix Archaius: configuration management API, including a series of configuration management API, providing dynamically typed properties, thread-safe configuration operations, polling framework, callback mechanism and other functions.
Spring Cloud for CloudFoundry: binding services to CloudFoundry,CloudFoundry through the Oauth3 protocol is an open source PaaS cloud platform launched by VMware.
Spring Cloud Sleuth: log collection toolkit that encapsulates Dapper,Zipkin and HTrace operations.
Spring Cloud Data Flow: big data operation tool, through the command line to operate the data flow.
Spring Cloud Security: security toolkit to add security controls to your application, mainly referring to OAuth3.
Spring Cloud Consul: encapsulates Consul operations. Consul is a service discovery and configuration tool that integrates seamlessly with Docker containers.
Spring Cloud Zookeeper: a toolkit for manipulating Zookeeper for service registration and discovery using zookeeper.
Spring Cloud Stream: data flow operation development kit that encapsulates sending and receiving messages with Redis,Rabbit, Kafka, etc.
Spring Cloud CLI: based on Spring Boot CLI, it allows you to quickly build cloud components on the command line.
III. Elements of micro-service development
1. Codebase: deploy from one code base to multiple environments.
2. Dependencies: use explicit declarations to isolate dependencies, that is, modules run separately and can explicitly manage dependencies.
3. Config: stores configuration information outside the system.
4. Backing Services: treat supporting services as resources, including databases, message queues, buffering servers, etc.
5. Build, release, run: strictly divide the compilation, build, and run phases, each of which is managed by tools.
6. Processes: applications are executed as stateless.
7. Port binding: export services via port binding, and HTTP API is preferred as the general integration framework.
8. Concurrency: concurrency is implemented using horizontal scaling. For web, it is implemented by horizontally extended web applications.
9. Disposability: service disposability, any service can be terminated or started at will.
10. Dev/prod parity: highly consistent development and production environments with one-click deployment.
11. Logs: logs are managed as a stream of events, and all participating services process logs in this way.
12. Admin processes: administrative tasks run as an one-time process (using scripts to manage the service to start and stop).
After reading the above, have you mastered the method of building the architecture of the microservice SpringCloud project? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.