Spring Cloud Interview Questions and Answers
by Sachin, on Aug 8, 2022 10:10:31 PM
Q1. What is Spring Cloud?
Spring cloud is a set of tools that can be used by developers to quickly build some common patterns in distributed systems such as service discovery, configuration management, intelligent routing, etc.
Q2. What are the common features of Spring cloud?
c) Service to service calls
d) Distributed and versioned configuration
e) load balancing and circuit breakers
Q3. What are the advantages of using Spring Cloud?
- Complexity associated with distributed systems-
This overhead includes network issues, Latency overhead, Bandwidth issues, security issues.
- Service Discovery-
Service discovery tools manage how processes and services in a cluster can find and talk to one another. It involves a directory of services, registering services in that directory, and then being able to lookup and connect to services in that directory.
Redundancy issues in distributed systems.
Load balancing improves the distribution of workloads across multiple computing resources, such as computers, a computer cluster, network links, central processing units, or disk drives.
- Performance issues-
Performance issues due to various operational overheads.
- Deployment complexities-
Requirement of Devops skills.
Q4. What is load balancing?
Load balancing is a technique used to improve the distribution of workloads across several computing resources, such as a computer cluster, CPUs, network lines, and disk drives.
Q5. What is the meaning of Service registration and discovery?
Q6. What is Hystrix?
Hystrix is a fault-tolerance and latency library designed for isolating points of access to remote systems, third-party libraries, services, stopping cascading failures, and enabling resilience in complex distributed systems where failure is common and cannot be avoided.
Q7. Explain Netflix feign.
It is a Java to HTTP client binder. It is inspired by JAXRS-2.0, WebSocket, and Retrofit.
Q8. What are some common Spring cloud annotations?
Q9. What is the major difference between Spring Cloud and Spring boot?
Spring cloud is a microservice management and coordination framework used to integrate and manage individual microservices while Spring boot is used to develop these microservices.
Q10. What is Spring Cloud Consul?
Consul is one of the products of HashiCorp. Spring consul provides an easy way by which one can register instances as consul agent and that instances can be further discovered by clients using spring beans. There are sveral features provided by consul. Some of them includes configuration management with the use of Key/Value store , health checking etc. are provided by the consul.
Q11. What are the spring cloud framework components?
- Configuration. This component provides client-side and server-side support for external configuration in distributed systems.
- API Gateway. It allows sending API requests to connect services.
- CI Testing and Pipeline.
- Service Discovery.
- Circuit Breakers.
- Routing and Messaging.
Q12. What is spring Cloud function?
Spring Cloud Function is a project with the following high-level goals: Promote the implementation of business logic via functions. Decouple the development lifecycle of business logic from any specific runtime target so that the same code can run as a web endpoint, a stream processor, or a task.
Q13. What is spring Cloud config server?
Q14. Which design pattern are used in Microservices ?
- Aggregator Microservice Design Pattern
- Proxy Microservice Design Pattern
- Chained Microservice Design Pattern
- Branch Microservice Design Pattern
- Shared Data Microservice Design Pattern
- Asynchronous Messaging Microservice Design Pattern
Q15. What is Eureka in Spring Cloud ?
- Eureka Server is an application which holds the information about all client-service applications.
- Every Micro service will register into the Eureka server and Eureka server knows all the client applications running on each port and IP address.
Q16. Name the features of using Spring Boot?
- Starter dependency
- Spring initializer
Q17. What is RAD model?
The Rapid Application Development model is based on prototyping and iterative model with less specific planning. In general, RAD approach to software development means putting lesser emphasis on planning tasks and more emphasis on development and coming up with a prototype.
RAD should be used only when a system can be modularized to be delivered in an incremental manner. It should be used only if the budget permits use of automated code generating tools.
Q18. What is spring Cloud microservices?
Spring Cloud is a framework for building robust cloud applications and it provides a solution to the commonly encountered patterns when developing a distributed system. Spring Cloud framework provides tools for developers to quickly build both cloud applications and microservice-based applications.
Q19. What is a service fuse? What is service degradation?
The fuse mechanism is a microservice link protection mechanism that responds to the avalanche effect. When a microservice is unavailable or the response time is too long, the service will be downgraded, and then the call of the microservice of the node will be fused, and the error response information will be quickly returned.
Service degradation is generally considered from the overall load. That is, when a service is broken, the server will no longer be called, at this time the client can prepare a local fallback callback and return a default value. In doing so, although the level drops, it is still available anyway, which is better than just hanging it out.
Q20. What is the use of the Spring cloud bus?
Spring Cloud Bus links the nodes of a distributed system with a lightweight message broker.A key idea is that the bus is like a distributed actuator for a Spring Boot application that is scaled out.It can also be used as a communication channel between apps.
Spring Cloud is a framework for building robust cloud applications.Applications that run with microservices architecture aim to simplify development, deployment, and maintenance. The decomposed nature of the application allows developers to focus on one problem at a time.