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/01 Report--
Most people do not understand the knowledge points of this "spring cloud interview questions and answers" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "spring cloud interview questions and answers" article.
Question 1: tell me about 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 is a combination of relatively mature service frameworks developed by various companies that can stand the actual test. Through the re-encapsulation of Spring Boot style, it shields the complex configuration and implementation principles, and finally gives developers a set of distributed system development toolkits that are easy to understand, easy to deploy and easy to maintain.
Question 2: what are the advantages of using Spring Cloud?
When using Spring Boot to develop distributed microservices, we are faced with the following problems:
The complexity of ① associated with distributed systems-this overhead includes network problems, latency overhead, bandwidth issues, and security issues.
② Service Discovery-the service discovery tool manages how processes and services in the cluster find and talk to each other. It involves a service directory in which services are registered, and then you can find and connect to services in that directory.
③ redundancy-redundancy issues in distributed systems.
④ load balancing-load balancing improves the distribution of workloads across multiple computing resources, such as computers, computer clusters, network links, central processing units, or disk drives.
⑤ performance-A performance problem due to various operational overhead.
⑥ deployment complexity-requirements for Devops skills.
Question 3: the core components of Spring Cloud and how they work
Eureka: when each service starts, Eureka Client registers the service with Eureka Server, and Eureka Client can in turn pull the registry from Eureka Server to know where the other services are
Ribbon: when initiating a request between services, load balancing is based on Ribbon. Select one of the multiple machines of a service.
Feign: a Feign-based dynamic proxy mechanism that splices request URL addresses and initiates requests according to annotations and selected machines
Hystrix: requests are initiated through the thread pool of Hystrix. Different services take different thread pools, which realizes the isolation of different service calls and avoids the problem of service avalanche.
Zuul: if the backend system is called by the frontend and mobile end, the Zuul gateway is used to enter, and the Zuul gateway forwards the request to the corresponding service.
Question 4: what does service registration and discovery mean? how is Spring Cloud implemented?
When we start a project, we usually do all the configuration in the properties file. As more and more services are developed and deployed, adding and modifying these properties becomes more complex. Some services may decline, while some locations may change. Manually changing properties can cause problems.
Eureka service registration and discovery can help in this case. Because all services are registered on the Eureka server and lookup is done by calling the Eureka server, there is no need to handle any changes and processing of the service location.
Question 5: what is the significance of load balancing?
In computing, load balancing can improve workload distribution across a variety of computing resources, such as computers, computer clusters, network links, central processing units or disk drives. Load balancing is designed to optimize resource usage, maximize throughput, minimize response time, and avoid overloading any single resource.
Using multiple components for load balancing rather than a single component may improve reliability and availability through redundancy. Load balancing usually involves specialized software or hardware, such as multilayer switches or domain name system server processes.
Question 6: what is Netflix Feign? What are its advantages?
Feign is a java client binder inspired by Retrofit,JAXRS-2.0 and WebSocket. The first goal of Feign is to unify the complexity of the constraint denominator to http apis, regardless of its stability. In the case of employee-consumer, we use the REST service that employee-producer exposes using the REST template.
But we have to write a lot of code to perform the following steps
① uses the ribbon for load balancing.
② gets the service instance and then gets the basic URL.
③ uses the REST template to use the service.
The above is about the content of this article "what are the spring cloud interview questions and answers?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
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.