0% found this document useful (0 votes)
3 views

Spring_Cloud_Interview_Problems

Spring Cloud is a suite of tools designed for building resilient microservices, featuring service discovery, client-side load balancing, and circuit breakers. The Spring Cloud Config Server centralizes application configuration, addressing issues of duplication and inconsistency across environments. Eureka enables service discovery by allowing services to register and locate each other dynamically, while Spring Cloud Gateway offers a modern, reactive alternative to Zuul with enhanced performance and features.

Uploaded by

pbecic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Spring_Cloud_Interview_Problems

Spring Cloud is a suite of tools designed for building resilient microservices, featuring service discovery, client-side load balancing, and circuit breakers. The Spring Cloud Config Server centralizes application configuration, addressing issues of duplication and inconsistency across environments. Eureka enables service discovery by allowing services to register and locate each other dynamically, while Spring Cloud Gateway offers a modern, reactive alternative to Zuul with enhanced performance and features.

Uploaded by

pbecic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Spring Cloud for Strong Senior Developers

What is Spring Cloud and how does it support microservice architecture?


 Spring Cloud is a suite of tools that enables building resilient, scalable microservices.
 Key features:
 Service discovery (Eureka), client-side load balancing (Ribbon), config management
(Config Server), circuit breakers (Resilience4J/Hystrix), and API gateways
(Zuul/Gateway).
 Supports distributed tracing, centralized logging, and fault tolerance.
 Enables seamless integration with Spring Boot for rapid development.

How does Spring Cloud Config Server work and what problems does it solve?
 Spring Cloud Config Server externalizes application configuration.
 Central source of truth for configuration across environments (dev/staging/prod).
 Backed by Git, Vault, JDBC, etc.
 Clients fetch config via HTTP or auto-refresh using Spring Cloud Bus (with
RabbitMQ/Kafka).
 Solves problems of duplication, inconsistency, and manual deployment of configuration.

What is the role of Eureka in Spring Cloud and how does it enable service
discovery?
 Eureka is a service registry — it allows services to register and discover each other.
 Each service registers with Eureka and periodically sends heartbeats.
 Clients use Eureka Client or DiscoveryClient to discover other services.
 Enables dynamic scaling — services can come and go without hardcoded URLs.
 Commonly paired with Ribbon for client-side load balancing.

How does Spring Cloud Gateway differ from Zuul and what are its advantages?
 Spring Cloud Gateway is the modern, reactive alternative to Zuul (based on Spring
WebFlux).
 Advantages:
 Built on Project Reactor — non-blocking and high-performance.
 Supports route filters, predicates, rate limiting, path rewriting, and CORS out of the box.
 First-class support for Spring Security and Resilience4J.
 Better integration with reactive microservices compared to Zuul 1 (which is servlet-
based).

What are common fault tolerance mechanisms in Spring Cloud and how do you
implement them?
 Spring Cloud supports fault tolerance via:
 Circuit Breakers (Resilience4J), retries, timeouts, bulkheads.
 Implementation using Resilience4J:
 @Retry, @CircuitBreaker, @RateLimiter, @Bulkhead annotations.
 Fallback methods to handle failure scenarios.
 Configuration via application.yml — set thresholds, wait durations, exception filters.
 Circuit breakers prevent cascading failures by short-circuiting repeated failures.

You might also like