What is Spring Cloud, what are its advantages

Carvia Tech | April 22, 2019 | 2 min read | 97 views


What is Spring Cloud? What are advantages of using Spring Cloud?

There are lot of challenges in developing distributed microservices without a proper framework support, which includes: service discovery issues, latency overhead, redundancy handling, load-balancing issues, security issues and finally deployment and logging issues.

Spring team has integrated number of battle-tested open source projects from companies like Pivotal, Netflix, HashiCorp, etc into a Spring project known as Spring Cloud. Spring Cloud provides libraries & tools to quickly build some of the common design patterns of distributed system, including the following:

Service discovery

JVM and non JVM services can register themselves into service registry and easily discover other services available in the ecosystem. Spring Cloud Netflix Eureka or Consul can be used for this purpose.

Distributed configuration

Centralized external configuration management backed by a git repository. The configuration resources map directly to Spring Environment but could be used by non-Spring applications if desired.

Client side loadbalancing

Load balancing improves the distribution of workloads across multiple services. Spring Cloud provides Ribbon - a client side load balancer that talks to Service Registry and makes load balancing easy.

Circuit Breaker

Circuit breaker allows graceful degradation of functionality when a method call on a service fails. Use of the Circuit Breaker pattern can allow a microservice to continue operating when a related service fails, preventing the failure from cascading and giving the failing service time to recover. Spring Cloud provides Hystrix which is a implementation for circuit breaker pattern.

Routing

Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor.

Log Tracing

Spring cloud provides Zepkin and Sleuth that can be used for Log Correlation and Tracing. This is very helpful in real production environment for in depth troubleshooting.

Security

Spring cloud provides support for OAuth2 server and resource service by use of few annotations. Authorization and Authentication can be easily implemented using these libraries.


Top articles in this category:
  1. Cracking Spring Microservices Interviews - question bank
  2. Top 50 microservices architecture interview questions for Java developers
  3. What is Spring Boot and what are its advantages
  4. Why Microservices are better than Monoliths
  5. Is it a good practice to deploy multiple microservices in a single tomcat container
  6. How will you Partition a typical e-shop into Microservices Architecture



Find more on this topic:
Microservices image
Microservices

Microservices Architecture and its implementation using Spring Framework

Last updated 1 week ago


Recommended books for interview preparation:

This website uses cookies to ensure you get the best experience on our website. more info