Spring Cloud

Spring cloud is not a single project 

there are wide variety of project under umbrela of spring cloud 


Most Important project is 

Spring Cloud Netflix: Netflix one of the organization which stated working on microservice architechture in very early stage of microservice, there are wide range of componenets that Netflix has open sourced (means freely available) under the project Spring cloud Netflix.
there are some importatnt Netflix OSS components are (Eureka, Hystrix, Zuul, Archalus, etc)

Spring Cloud Config : also one of the majorly use Spring Cloud project which is to provide a centralized configuration management.

Spring Cloud Bus: This enables the microservices and the infrastructure component thinks like config server thinks like API Gateway to talk to each other


Solution of Our Previous Turorial Challanges are 

  1. Congifuratoin Managment 
    1. Spring Cloud Config Server: provides and approach where you can store all the configuration, for all the different environment of all the microservices in a Git Repository so you can store all the configuration for different environment or different microservices, in just one place , in a centralized location,
    2. Spring Cloudn Configuration server can userd to expose that configuration to all the microservices
    3. Spring Cloudn Configuration helps us to keep the configuration in one place and that makes it to easy to maintain the configuration for all microservices



     2. Dynamic Scale Up and Scale Down:
  •         Naming Server (Eureka)
  •         Ribbon (Client Side Load Balancing)
  •         Feign (Easier REST Clients)


In this Example you are looking at there is a microservice called CurrencyClaculationService which is talking to the currencExchangeService as you can see in the diagram there are multiple instances of the currencyExchange Service and it is possible that at any point in time new instances can be added in or removed out and we would want to currencyCalculationService to be able to districuge the Load, between all the instances of the currencyExchangeService we would want to be able to dynamicaly check what are the available instances of the currencyExchangeService? and make sure that their load is distributed among all of them ,

so the solution is Naming Server which is eureka so all the instances of all miroservices would register with the naming server so the naming server has two important feature s

  1.  Service Register : So all microservices can register with the microservice
  2.  Service Discovery
So in this example  the CurrencyCalculationService can ask the Eureka Naming server  hey naming server give me the current instance of CurrencyExchangeService, and the naming service would provide those URL's to the currencyCalculationServices this help to establish dynamic Relationship between the currencyCalculationservice and the instances of the currencyExchangeService 1,2,3
we will user Ribbon for Client side Load Balancing, that means the currencyCalculationService will host Ribbon and if would make sure that the load is evenly distributed among the existing instances that it gets fron the naming server Eureka 
We will also user Feign in the CurrencyCalculationService as a mechanism to write simple RESTFull clients 
3.  Visibility and Monitoring solution 
  1.    Zipkin Distributed Tracing
  2.     Netflix API Gateway
1. Zipkin Distributed Tracing server: we would use spring cloud sleuth to assign a ID to a request across multiple components, and we would use zipkin distributed tracing  to trace request  across multiple components
one of the imporatant thing about microservices is these microservices have a lot of common features for example , logging security, analytics and thinkgs like that , you dont want to implements all these common features in every microservices
Api Gateway provide greate solution to this kind of challanges we will use a Netflix zuul Gateway in this course, 

4. Fault Tolerance:
    1. Hystrix: we would implements fault tolerance using Hystrix, if a service is down Hystrix helps us to configure a default response



Comments

Popular posts from this blog

Microservice with Java Spring Cloud

STEP 10 Configure Porfile for Limit service

STEP 9 Connect Limit service to Spring Cloud Config Server