Top Spring Cloud Interview Questions

More Java interview questions and answers...

What is Spring Cloud?

Spring Cloud provides implements to expeditiously build common patterns in distributed systems such as: 
  • Configuration management
  • Service discovery
  • Circuit breaker
  • Intelligent routing
  • Micro-proxy
  • A control bus 
  • Global locks etc...
Coordination of these systems leads to boilerplate patterns and utilizing Spring Cloud we can expeditiously engender applications that implement those patterns.


What are the advantages of using Spring Cloud?

  • Cloud-native predicated development
  • Service Discovery
  • Loadbalancing
  • Microservice-predicated architecture
  • Inter-service communication
  • Follows the Spring Boot model
  • It is cloud-agnostic

What is load balancing?

Load balancing is a technique used to ameliorate the distribution of network traffic across multiple servers. This ascertains no single server bears too much demand. By spreading the work evenly, load balancing ameliorates application responsiveness. It withal increases the availability of applications and websites for users. We can implement load balancing in the Spring cloud using Netflix Ribbon.

What is ZUUL?

Zuul is the front door for all requests from contrivances and websites to the backend of the Netflix streaming application. We can integrate Zuul with other Netflix projects like Hystrix for fault tolerance and Eureka for service discovery, or utilize it to manage routing rules, filters, and load balancing across your system. 

What is the use of Eureka?

Eureka Server is an application that holds information about all client-service applications. Every Microservice will register into the Eureka server and the Eureka server kens all the client applications running on each port and IP address. Eureka Server is additionally kenned as Discovery Server.

What is Hystrix?

Hystrix is a latency and fault tolerance java library designed to isolate points of access to remote systems, services, and 3rd-party libraries in a distributed environment. It avails to stop cascading failure and enable resilience in intricate distributed systems where failure is inevitable.

Explain Netflix feign? Why do we use Netflix feign?

The Feign is a declarative web service (HTTP client) developed by Netflix. Its aim is to simplify the HTTP API clients. It is a Java to HTTP client binder. If we want to utilize Feign, engender an interface, and annotate it. It provides pluggable annotation support, including Feign annotations and JAX-RS annotations.

What is Spring Cloud Bus?

Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be acclimated to broadcast state changes (e.g. configuration changes) or other management instructions.

What are some common Spring cloud annotations?

1) @EnableConfigServer: The @EnableConfigServer annotation makes your Spring Boot application act as a Configuration Server.

2) @EunableEurekaServer: The @EnableEurekaServer annotation is used to make your Spring Boot application acts as a Eureka Server.

3) @EnableDiscoveryClient: @EnableDiscoveryClient annotation can work with any Discovery Client implementations implement in our project ( Eureka, Consul, Zookeeper ).

4) @EnableCircuitBreaker: @EnableCircuitBreaker to implement the circuit breaker pattern with Hystrix or an alternative circuit breaker implementation.

What is the difference between SpringBoot and SpringCloud?

SpringBoot focuses on the rapid and convenient development of individual microservices.
Spring Cloud provides implements to expeditiously build common patterns in distributed systems such as: 
  • Configuration management
  • Service discovery
  • Circuit breaker
  • Intelligent routing
  • Micro-proxy
  • A control bus 
  • Global locks etc...
Coordination of these systems leads to boilerplate patterns and utilizing Spring Cloud we can expeditiously engender applications that implement those patterns.

More Java interview questions and answers...

Popular posts from this blog

Spring boot video streaming example-HTML5

Learn Java 8 streams with an example - print odd/even numbers from Array and List

Spring Boot + Mockito simple application with 100% code coverage

Spring Boot + OpenCSV Export Data to CSV Example

Custom Exception Handling in Quarkus REST API

DataTable-Pagination example with Spring boot, jQuery and ajax

Registration and Login with Spring Boot + Spring Security + Thymeleaf

Node JS mini projects with source code - free download

Spring boot web project free download:User Registration System

Java - Blowfish Encryption and decryption Example