Top Spring Cloud Interview Questions (2020) | CodeUsingJava








Top Spring Cloud Interview Questions (2020)



What is need for Cloud?

  • Cloud has taken over most of the hosting servers into a single large server space.
  • Cloud computing is similar to traditional hosting, which makes use of the single dedicated server, while cloud computing uses virtualization technology to pool or share resources from the underlying network of the physical servers.
  • It is the kind of computing that relies on shared computing resources instead of local servers and personal devices.


need for Cloud

What are the benefits of using cloud ?

  • It is cost effective. Economies of scale in acquisition of equipment, utilities and maintaining.
  • Abstracts infrastructure complexity. We can use or resources on our application functional requirements instead of maintaining infrastructure or platforms.
  • It provides Scalability so that no matter how efficient is your provider and your IT team, using cloud providers we can scale dynamically.
  • Cloud providers offer a better service level than the best private infrastructure we could afford.


What is Spring Cloud ?

  • Cloud is used in every business organization for hosting. It was important to introduce cloud in the path of Spring too.
  • Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems.
  • A short-lived microservices framework to quickly build applications that perform finite amounts of data processing.


What are the features of Spring Cloud?

Spring Cloud has the following features:
  • Versioned and distributed configuration.
  • Discovery of service registration.
  • Service to service calls.
  • Routing.
  • Circuit breakers and load balancing.
  • Cluster state and leadership election.


What is the use of Spring Cloud stream ?

  • Spring cloud stream allows to integrate microservices with message brokers.


Spring Cloud benefits

What are benefits of using Spring Cloud?

    It offers many benefits such as:
  • Complexity associated with distributed systems
  • Service Discovery
  • Redundancy
  • Loadbalancing
  • Deployment complexities


What does one mean by Service Registration and Discovery? How is it implemented in Spring Cloud ?

  • When we start a project, we usally have all the configurations in the properties file.
  • When more and more services are developed and deployed then adding and modifying these properties become more complex.
  • Some services might go down, while some the location might change. This manual changing of properties may create problems.
  • Eureka Service Registration and Discovery helps in such cases.
  • As all services are registered to the Eureka server and lookup done by calling the Eureka Server, any change in service locations need not be handled and is taken care of Microservice Registration and Discovery with Spring cloud using Netflix Eureka.


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

What is Netflix Feign? What are its advantages?

Feign is a java to http client binder inspired by Retrofit, JAXRS-2.0, and WebSocket. Feign's first goal was reducing the complexity of binding Denominator uniformly to http apis regardless of restfulness. Previous examples in the employee-consumer we consumed the REST services exposed by the employee-producer using REST Template

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.