In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the design method of the overall architecture of SpringCloud. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
The overall core architecture of SpringClound has only one point: Rest service, that is to say, during the whole SpringCloud configuration process, all configuration processing is done around Rest. In this Rest process, there must be two sides: service provider (Provider) and service consumer (Consumer), so the structure of the entire SpringCloud infrastructure is as follows:
Since the core of SpringCloud is the Restful structure, there are a few issues to consider if you want to make better use of Rest microservices.
1. All micro-service addresses must be very large, so in order to manage these address information uniformly, and to tell users which services are not available in time, a distributed registry should be prepared, and the registry should support HA mechanism. For high-speed and convenient registration of all services, an Eureka registry is provided in SpringCloud.
For the entire Web-side architecture (SpringBoot implementation), it is easy to write WEB programs, and then use Nginx or Apache to achieve load balancing, but your WEB side has load balancing, what about the business side? It should also be provided that there are multiple business ends for load balancing. At this time, it is necessary to register all businesses that need to participate in load balancing in Eureka.
When making client calls using Rest architecture, a call address is often needed. Even if Eureka is used as a registry, it also needs a clear call address. However, if all operations are handled by the call address, the most convenient tool for program developers to apply is the interface, so now they hope that the contents of all Rest services can be called in the way of interfaces. So it also provides a Feign technology, which can be used to forge interfaces.
In the overall micro-architecture design, because the problem still belongs to RPC, we must consider the fuse mechanism. In fact, all fuses are like fuses in life. With fuses, household appliances can still be used normally after some devices fail. If there are a number of micro-services, and these micro-services can be called each other. For example, A micro service invokes B micro service, and B micro service invokes C micro service.
If the circuit breaker mechanism is not properly handled in the actual project design process, there will be an avalanche effect, so in order to prevent such problems, SpringCloud provides a Hystrix circuit breaker mechanism to ensure that a micro-service can still be used normally even if there is a problem.
Proxy users through Zuul only need to know the path of the specified route to access the information of the specified micro-service, which better withdraws the design idea of "key=value" in java, and all the micro-services are more reasonably hidden after they are proxied through zuul.
A problem has been emphasized when learning in SpringBoot: what is emphasized in SpringBoot is a concept of "zero configuration". The essence is that there is no need to configure any configuration files, but in fact this has not been fully realized, because in the whole reality, application.yml configuration files are still provided, so if in the creation of micro services Then there must be information about hundreds of microservices, so the management of these profiles becomes a problem. For example: now you suddenly have to change your host computer room one day, and the IP addresses of all services may be changed, which is very inconvenient for program maintenance. In order to solve this problem, a SpringCloudConfig program component is provided when SpringCloud is designed, which can be directly based on GIT or SVN to manage configuration files.
In the overall design, SpringCloud better realizes the architecture design of RPC, and uses Rest as the basis of communication, which is his success. Due to the extensive use of netflix's product technology, these technologies also have a reliable guarantee.
Thank you for reading! This is the end of the design method on the overall architecture of SpringCloud. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
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.