Javatpoint Logo
Javatpoint Logo

Features of Spring Cloud

The great part about Spring Cloud is that it builds the concept of Spring Boot. Spring cloud is built upon some of the common building blocks of Spring framework which are as follows:

  • Intelligent routing and service discovery
  • Service-to-Service Call
  • Load Balancing
  • Leadership Election
  • Global Locks
  • Distributed Configuration
  • Distributed Messaging

Intelligent Routing and Service discovery

When building a microservices on Spring Cloud, there is a primary concern to deal with the first two primary microservices: configuration service and the discovery service.

Features of Spring Cloud

The above figure represents the set of four microservices. The connection between each service indicates dependency. All services are dependent on each other. The configuration service lies at the top, and the discovery services at the bottom. There are two microservices in-between which are Recommendation Service and Movie Service.

Service-to-Service calls

It is the process of "how a microservice communicates with other dependent microservices via service registry or Eureka server." There is a sequence which follows in the service-to-service call.

  • Registering the service
  • Fetching the Registry
  • Finding the downstream service
  • Resolving the Underlying IP address
  • Call the rest Endpoint

Load Balancing

Load balancing efficiently distributes network traffic to multiple backend servers or server pool. The objective of load balancing is to maximize throughput, minimize response time, increase efficiency, and optimize resource uses. It avoids overload of any single resource. Using multiple components with load balancing may increase reliability and availability through redundancy.

Leadership Election

Leadership election allows the application to work with other application via a third-party system. The leadership election is used to provide global state or global ordering without sacrificing availability.

Global Locks

Global locks are used to ensure that no two thread simultaneously access the same resource at the same time. The programmer uses a mechanism to remove such situation, is called a lock. Each thread first cquires the lock, operate on the resources, and release the lock for other thread.

Distributed Configuration

Distributed configuration is to configure every instance of all microservices. "Spring cloud config server" provides client-side support for externalized configuration in a distributed system. With the distributed configurations, we have a central place to manage external properties for applications across all environment.

Distributed Messaging

The distributed messaging system provides the benefit of reliability, scalability, and persistence. The messaging pattern follows the Publish-Subscribe (Pub-Sub) model. In the Pub-Sub model, the sender of the message is called publisher and receiver of the message is called subscribers. Apache Kafka and RabbitMQ are the popular high throughput messaging system.






Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA