Spring Cloud - Interview Questions

Spring Cloud AWS


What is Spring Cloud AWS?

FAQ

Spring Cloud for Amazon Web Services (Spring Cloud AWS), which is a part of the Spring Cloud project, provides tools to integrate with various hosted Amazon Web Services.

Amazon provides a Java SDK to issue requests for the all services provided by the Amazon Web Service platform. But application developers still have to write a considerable amount of infrastructure code to integrate this SDK with their application.

Spring Cloud AWS alleviates this problem by providing integrated Spring-based modules which encapsulates the infrastructure related code. Application developers can use thes modules to consume Amozon web services with minimum infrastructure code.


What are the modules provided in Spring Cloud AWS?

Key Concept

Spring Cloud AWS provides the following key modules.

Spring Cloud AWS Core

Spring Cloud AWS Context

Spring Cloud AWS JDBC

Spring Cloud AWS Messaging

Spring Cloud AWS Parameter Store Configuration

Spring Cloud AWS Secrets Manager Configuration


What AWS integrations are provided by the Spring Cloud AWS Messaging module?

Key Concept

Spring Cloud AWS provides Amazon SQS (Amazon Simple Queue Service) and Amazon SNS (Amazon Simple Notification Service) integration that simplifies the publication and consumption of messages over SQS or SNS.

Amazon Simple Queue Service (SQS) is a fully managed point-to-point message queuing service provided by Amazon.

Amazon Simple Notification Service (SNS) is a fully managed publish-subscribe message queuing service provided by Amazon.


What integration modules are provided in Spring Cloud AWS for cachching?

Key Concept

Spring Cloud AWS provides Amazon SQS (Amazon Simple Queue Service) and Amazon SNS (Amazon Simple Notification Service) integration that simplifies the publication and consumption of messages over SQS or SNS.

Amazon Simple Queue Service (SQS) is a fully managed point-to-point message queuing service provided by Amazon.

Amazon Simple Notification Service (SNS) is a fully managed publish-subscribe message queuing service provided by Amazon.


What is Spring Cloud CLI?

FAQ

Spring Cloud CLI, part of the Spring Cloud platform, is a set of extensions for the Spring Boot CLI.

Spring Cloud CLI makes it possible to run Spring Cloud server apps and write Spring Cloud apps in Groovy scripts and run them from a shell.


Spring Cloud Bus


What is Spring Cloud Bus?

FAQ

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


Spring Cloud CLI


What is Spring Cloud CLI?

FAQ

Spring Cloud CLI, part of the Spring Cloud platform, is a set of extensions for the Spring Boot CLI.

Spring Cloud CLI makes it possible to run Spring Cloud server apps and write Spring Cloud apps in Groovy scripts and run them from a shell.


Spring Cloud - Cloud Foundry


What is Spring Cloud Cloudfoundry?


Spring Cloud for Cloudfoundry, part of the Spring Cloud framework, makes it easy to run Spring Cloud apps in Cloud Foundry.


Spring Cloud Commons


What is Spring Cloud Commons?


Spring Cloud Commons, part of the Spring Cloud platform, provides two feature libraries: Spring Cloud Context and Spring Cloud Commons.

Spring Cloud Context provides utilities and special services for the ApplicationContext of a Spring Cloud application (bootstrap context, encryption, refresh scope and environment endpoints).

Spring Cloud Commons is a set of abstractions and common classes used in different Spring Cloud implementations (eg. Spring Cloud Netflix vs. Spring Cloud Consul).

Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).


What are the key features provided in Spring Cloud Context library?


Spring Cloud Context library provides the following key features

Bootstrap context

TextEncryptor beans

Refresh Scope

Spring Boot Actuator endpoints for manipulating the environment


What are the key features provided in Spring Cloud Commons library?


Spring Cloud Commons library provides the following key features that are used in different Spring Cloud implementations such as Spring Cloud Netflix.

DiscoveryClient interface

ServiceRegistry interface


What is a bootstrap context?


A Spring cloud application creates a new context called the 'bootstrap' context for the main application. Bootstrap context is responsible for loading configuration properties from external sources. Bootstrap properties have higher precedence, so they cannot be overridden by local configuration.


What is the purpose of @EnableDiscoveryClient annotation?


Spring Cloud Commons library provides the @EnableDiscoveryClient annotation that looks for implementations of DiscoveryClient interface using 'spring.factories'.

Example of DiscoveryClient implementations are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.


What is the purpose of ServiceRegistey interface provided in Spring Cloud Commons library?


Spring Cloud Commons library provides the ServiceRegistry interface which provides methods to register and deregister customer services.


Spring Cloud Config


What is Spring Cloud Config?

FAQ

Spring Cloud Config, part of the Spring Cloud platform, provides server and client-side support for externalized configuration in a distributed system.

Config Server provides a central place to manage external properties for applications across all environments. As an application moves through the deployment pipeline from dev to test and into production you can manage the configuration between those environments using the config server.


What are the key server-side features provided in the Spring Cloud Config framework?

FAQ

Spring Cloud Config framework provides following features for server-side applications

1. Ability for any Spring Boot application to be embedded with config server using the annotation @EnableConfigServer

2. Ability for server application to Encrypt and decrypt property values

3. Provides a resource-based, HTTP API to manage external configuration.


What are the key client-side features provided in the Spring Cloud Config framework?

FAQ

Spring Cloud Config framework provides following features for client applications

1. Ability for client applications to bind to the Config Server and initialize Spring Environment with remote property sources

2. Ability for client applications to Encrypt and decrypt property values.


Spring Cloud Connectors


What are Spring Cloud Connectors?

FAQ

Spring Cloud Connectors, a part of Spring Cloud platform, simplifies the process of connecting to services in cloud platforms such as Cloud Foundry and Heroku.

Spring Cloud Connectors is extensible - you can use one of the provided cloud connectors or write one for your cloud platform.

Spring Cloud Connectors library provides built-in support for commonly-used services such as relational databases, MongoDB, Redis and RabbitMQ.


Spring Cloud Consul


What is Spring Cloud Consul?

FAQ

Spring Cloud Consul, a part of the Spring Cloud platform, provides Consul integrations for Spring Boot apps through autoconfiguration and bindings to the Spring Environment.

Spring Cloud Consul provides simple annotations to quickly enable and configure the common patterns inside your application and build large distributed systems with Hashicorp's Consul.

Consul is a distributed service mesh to connect, secure, and configure services across any runtime platform and public or private cloud.


Spring Cloud Contract


What is Spring Cloud Contract?

FAQ


Spring Cloud Data Flow


What is Spring Cloud Data Flow?

FAQ


Spring Cloud Function


What is Spring Cloud Function?

FAQ


Spring Cloud Gateway


What is Spring Cloud Gateway?

FAQ


Spring Cloud Netflix


What is Spring Cloud Netflix?

FAQKey Concept

Spring Cloud Netflix, part of Spring cloud platform, provides Netflix OSS integrations for Spring Boot apps.

Using annotations you can quickly enable and configure the common cloud patterns inside your application and build large distributed systems using Netflix OSS components.

The patterns supported by Spring Cloud Netflix include Service Discovery (Eureka), Circuit Breaker (Hystrix), Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon)


What are the key capabilities provided in Spring Cloud Netflix?

FAQKey Concept

Spring Cloud Netflix has the following key capabilities.

1. Service Discovery - Spring Cloud Netflix framework provides the capability to register Eureka instances, which clients can discover using spring managed beans.

2. Circuit Breaker - Spring Cloud Netflix framework provides a simple annotation-driven method decorator to build Hystrix clients.

3. Declarative REST Client - Spring Cloud Netflix framework provides support for Feign which creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations.

4. Client Side Load Balancer - Spring Cloud Netflix framework provides support for Ribbon, a client side load balancer provided in the Netflix OSS platform.

5. Router and Filter - Spring Cloud Netflix framework provides support for automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation.


What is Eureka?

FAQKey Concept

Eureka is a Service Discovery Server and Client provided in the Netflix OSS platform. Service Discovery is one of the key tenets of a microservice-based cloud architecture.


How do you include Eureka in your project?

FAQKey Concept

To include the Eureka Client in your project, use spring-cloud-starter-netflix-eureka-client dependency and @EnableEurekaClient annotation on the Spring Boot Application class.

To include the Eureka server in your project, use spring-cloud-starter-eureka-server dependency and @EnableEurekaServer annotation on the Spring Boot Application class.


What is Hystrix?

FAQKey Concept

Hystrix is a library developed by Netflix that implements the Circuit Breaker pattern.

In a microservice architecture, it is common to have multiple layers of service calls, i.e one microservice can call multiple downstream microservices. A service failure in any one of the lower level services can cause cascading failure all the way up to the user.

Circuit Breaker pattern provides a fallback mechanism, which avoids cascading of failures up to the user.


How do you include Hystrix in your project?

FAQKey Concept

To include Hystrix in your project, use spring-cloud-starter-netflix-hystrix dependency and @EnableCircuitBreaker annotation on the Spring Boot Application class.

Use the @HystrixCommand annotation on the method for which fallback method has to be applied.


What is Zuul?

FAQKey Concept

Zuul is a JVM-based router and server-side load balancer developed by Netflix and included in the Netflix OSS package.


How do you include Zuul in your project?

FAQKey Concept

To include Hystrix in your project, use the spring-cloud-starter-netflix-zuul dependency.


What are the different kinds of filters provided by Zuul?

FAQKey Concept

Zuul provides the following filter types that correspond to the lifecycle of a request.

1. PRE Filters - Filters that execute before routing to the origin server.

2.ROUTING Filters - Filters that handle routing the request to an origin. Builds HTTP Request and calls the Origin server using Apache HttpClient or Netflix Ribbon.

3. POST Filters - Filters that execute after the request has been routed to the origin.

4. ERROR Filters - Filters that execute when an error occurs during any one of the phases.


Spring Cloud Open Serevice Broker


What is Spring Cloud Open Service Broker?

FAQ


Spring Cloud OpenFeign


What is Spring Cloud OpenFeign?

FAQ


Spring Cloud Pipelines


What is Spring Cloud Pipelines?

FAQ


Spring Cloud Security


What is Spring Cloud Security?

FAQ


Spring Cloud AWS


What is Spring Cloud Sleuth?

FAQ


Spring Cloud Stream


What is Spring Cloud Stream?


Spring Cloud Stream, part of the Spring Cloud platform, is a framework to build highly scalable event-driven microservices connected with shared messaging systems.

The framework provides flexible programming model built on already established and familiar Spring patterns and best practices. Spring Cloud Stream supports persistent pub/sub semantics, consumer groups, and stateful partitions.


What are the core building blocks of Spring Cloud Stream?


Spring Cloud Stream consists of the following key components.

1. Destination Binders - Destination Binders are components responsible for integrating with external messaging systems.

2. Destination Bindings - Destination Bindings are components that provide the bridge between the external messaging systems and application provided Producers and Consumers of messages.

3. Message - Message is the payload used by producers and consumers to communicate with other applications via external messaging systems using the Destination Binders.


What external messaging systems does Spring Cloud Stream support?


Spring Cloud Stream provides binder implementations for the following messaging systems.

1. RabbitMQ

2. Apache Kafka

3. Amazon Kinesyis

4. Google PubSub

5. Solace PubSub

6. Azure Event Hub


Spring Cloud Stream App Satrters


What is Spring Cloud Stream App Starters?

FAQ


Spring Cloud Task


What is Spring Cloud Task?

FAQ


Spring Cloud App Starters


What is Spring Cloud Task App Starters?

FAQ


Spring Cloud Zookeeper


What is Spring Cloud Zookeeper?

FAQ

ZooKeeper, a project of the Apache Software Foundation, is a centralized service that provides a distributed configuration service, a synchronization service, and a naming registry for distributed systems.

Spring Cloud Zookeeper, a part of Spring Cloud platform, provides Apache Zookeeper integrations for Spring Boot apps through simple annotations, auto-configurations and bindings to the Spring Environment.

Using Spring Cloud Zookeeper you can quickly quickly enable and configure common patterns inside your application and build large distributed systems with Zookeeper.


 
Subscribe to our Newsletter

 
 
RECOMMENDED RESOURCES
Behaviorial Interview
Top resource to prepare for behaviorial and situational interview questions.

STAR Interview Example