SlideShare une entreprise Scribd logo
1  sur  18
Agenda
1. Hystrix
2. Eureka
3. Zuul – Router & filter
4. Ribbon
5. Feign client
6. Spring Cloud Config server
7. Spring Cloud Bus
8. Q & A?
Why Hystrix?
Hystrix – Circuit breaker
pattern
Hystrix is a latency and fault tolerance library designed
to isolate points of access to remote systems, services
and 3rd party libraries, stop cascading failure and
enable resilience in complex distributed systems where
failure is inevitable.
Service Discovery:
Eureka Server
1. Eureka is the Netflix Service Discovery Server and Client.
The server can be configured and deployed to be highly
available, with each server replicating state about the
registered services to the others.
2. When a client registers with Eureka, it provides meta-
data about itself such as host and port, health indicator
URL, home page etc
3. Eureka receives heartbeat messages from each instance
belonging to a service. If the heartbeat fails over a
configurable timetable, the instance is normally removed
from the registry.
4. @EnableEurekaClient to enable Eureka client.
Eureka Server peer-peer
communication
Eureka can be made even more resilient and available by running multiple instances and
asking them to register with each other
spring:
profiles: peer1
eureka:
instance:
hostname: peer1
client:
serviceUrl:
defaultZone: http://peer2/eureka/
eureka:
instance:
hostname: peer2
client:
serviceUrl:
defaultZone: http://peer1/eureka/
Router and Filter: Zuul
1. Zuul is a JVM based router and server side load balancer by Netflix.
2. Zuul is the front door for all requests from devices and web sites to the backend of the
Netflix streaming application.
3. Could also be used a reverse proxy server
4. Netflix uses Zuul for the following
1. Authentication
2. Insights
3. Stress Testing
4. Canary Testing
5. Dynamic Routing
6. Service Migration
7. Load Shedding
8. Security
9. Static Response handling
10. Active/Active traffic management
Configuration
application.yml :
1. zuul:
routes:
users: /myusers/**
This means that http calls to "/myusers" get forwarded to the "users"
service (for example "/myusers/101" is forwarded to "/101")
2. zuul:
routes:
users:
path: /items/price**
url: http://example.com/price_service_v2
- http calls to "/items/price/**" get forwarded to above URL.
Client Side Load Balancer:
Ribbon
1. A central concept in Ribbon is that of the named client.
2. Ribbon could be used in conjunction with Eureka server.
3. Ribbon could also be used independently by providing
servers list as shown below
stores:
ribbon:
listOfServers: example.com,google.com
Usage
@Configuration
@RibbonClient(name = "foo", configuration =
FooConfiguration.class)
public class TestConfiguration {
}
Feign Client
1. Feign is a declarative web service client. It makes
writing web service clients easier.
2. Feign could be used in conjunction with Ribbon to
locate host names.
Config Server
1. A central place to manage external properties for
applications across all environments.
2. Exposes REST APIs (could be consumed by any
language).
3. Backed by Git.
Spring Cloud Bus
1. Spring Cloud Bus links nodes of a distributed system
with a lightweight message broker.
2. Could be used as a communication channel
between apps.
3. The only implementation currently is with an AMQP
broker as the transport
Configuration & End points
1. Configuration in application.yml :
spring:
rabbitmq:
host: mybroker.com
port: 5672
username: user
password: secret
2. /bus/env - sends key/values pairs to update each nodes Spring
Environment.
/bus/refresh - will reload each application’s configuration, just as if
they had all been pinged on their /refresh endpoint.
/bus/refresh?destination=customers:9000 - where the destination
is an ApplicationContext ID
Spring Cloud and Netflix Components
Spring Cloud and Netflix Components

Contenu connexe

Tendances

Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLee Calcote
 
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSDenis Danov
 
Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Red Hat Developers
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsPeter Ss
 
Kubernetes your next application server
Kubernetes  your next application serverKubernetes  your next application server
Kubernetes your next application serverRed Hat Developers
 
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQL
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQLKafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQL
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQLconfluent
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on DockerDocker, Inc.
 
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for MicroservicesCloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for MicroservicesMatt Stine
 
Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos WSO2
 
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...Orkhan Gasimov
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gatewayChengHui Weng
 
Spring cloud Service-Discovery
Spring cloud Service-DiscoverySpring cloud Service-Discovery
Spring cloud Service-DiscoveryNikhil Hiremath
 
New Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 betaNew Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 betaGiragadurai Vallirajan
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesSreenivas Makam
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David AndersonVerverica
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkRed Hat Developers
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleSudhir Tonse
 
Lifecycle of a pod
Lifecycle of a podLifecycle of a pod
Lifecycle of a podHarshal Shah
 
Hacking on OpenStack\'s Nova source code
Hacking on OpenStack\'s Nova source codeHacking on OpenStack\'s Nova source code
Hacking on OpenStack\'s Nova source codeZhongyue Luo
 

Tendances (20)

Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
 
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSS
 
Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...Serverless and Servicefull Applications - Where Microservices complements Ser...
Serverless and Servicefull Applications - Where Microservices complements Ser...
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment models
 
Kubernetes your next application server
Kubernetes  your next application serverKubernetes  your next application server
Kubernetes your next application server
 
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQL
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQLKafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQL
Kafka Summit SF 2017 - Kafka Stream Processing for Everyone with KSQL
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
 
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for MicroservicesCloud Foundry Diego: Modular and Extensible Substructure for Microservices
Cloud Foundry Diego: Modular and Extensible Substructure for Microservices
 
Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos
 
Crafting Kubernetes Operators
Crafting Kubernetes OperatorsCrafting Kubernetes Operators
Crafting Kubernetes Operators
 
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
Cloud Native Spring - The role of Spring Cloud after Kubernetes became a main...
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gateway
 
Spring cloud Service-Discovery
Spring cloud Service-DiscoverySpring cloud Service-Discovery
Spring cloud Service-Discovery
 
New Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 betaNew Features of Kubernetes v1.2.0 beta
New Features of Kubernetes v1.2.0 beta
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scale
 
Lifecycle of a pod
Lifecycle of a podLifecycle of a pod
Lifecycle of a pod
 
Hacking on OpenStack\'s Nova source code
Hacking on OpenStack\'s Nova source codeHacking on OpenStack\'s Nova source code
Hacking on OpenStack\'s Nova source code
 

En vedette

Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016Matt Raible
 
Hands-on Hystrix - Best Practices und Stolperfallen
Hands-on Hystrix - Best Practices und StolperfallenHands-on Hystrix - Best Practices und Stolperfallen
Hands-on Hystrix - Best Practices und Stolperfalleninovex GmbH
 
Using Hystrix to Build Resilient Distributed Systems
Using Hystrix to Build Resilient Distributed SystemsUsing Hystrix to Build Resilient Distributed Systems
Using Hystrix to Build Resilient Distributed SystemsMatt Jacobs
 
How we sleep well at night using Hystrix at Finn.no
How we sleep well at night using Hystrix at Finn.noHow we sleep well at night using Hystrix at Finn.no
How we sleep well at night using Hystrix at Finn.noHenning Spjelkavik
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudBen Wilcock
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudEberhard Wolff
 
Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways Kong Inc.
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 InstancesBrendan Gregg
 
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...Chris Richardson
 

En vedette (12)

Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
 
Hands-on Hystrix - Best Practices und Stolperfallen
Hands-on Hystrix - Best Practices und StolperfallenHands-on Hystrix - Best Practices und Stolperfallen
Hands-on Hystrix - Best Practices und Stolperfallen
 
Using Hystrix to Build Resilient Distributed Systems
Using Hystrix to Build Resilient Distributed SystemsUsing Hystrix to Build Resilient Distributed Systems
Using Hystrix to Build Resilient Distributed Systems
 
How we sleep well at night using Hystrix at Finn.no
How we sleep well at night using Hystrix at Finn.noHow we sleep well at night using Hystrix at Finn.no
How we sleep well at night using Hystrix at Finn.no
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloud
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
Edge architecture ieee international conference on cloud engineering
Edge architecture   ieee international conference on cloud engineeringEdge architecture   ieee international conference on cloud engineering
Edge architecture ieee international conference on cloud engineering
 
Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
 

Similaire à Spring Cloud and Netflix Components

Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaJoe Stein
 
Application layer
Application layer Application layer
Application layer anonymous
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...VMware Tanzu
 
Microservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eurekaMicroservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eurekaBinit Pathak
 
AWS Serverless Introduction
AWS Serverless IntroductionAWS Serverless Introduction
AWS Serverless Introductionarconsis
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileEmily Jiang
 
Troubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationTroubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationUniface
 
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARING
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARINGSURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARING
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARINGEditor IJMTER
 
Hacking Zy Xel Gateways
Hacking Zy Xel GatewaysHacking Zy Xel Gateways
Hacking Zy Xel Gatewaysphanleson
 
Consul and docker swarm cluster
Consul and docker swarm clusterConsul and docker swarm cluster
Consul and docker swarm clusterEueung Mulyana
 
Information System Security
Information System Security Information System Security
Information System Security Elijah Konzo
 

Similaire à Spring Cloud and Netflix Components (20)

Microservices with Spring
Microservices with SpringMicroservices with Spring
Microservices with Spring
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
 
Zuul_Intro.pdf
Zuul_Intro.pdfZuul_Intro.pdf
Zuul_Intro.pdf
 
Application layer
Application layer Application layer
Application layer
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
 
Microservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eurekaMicroservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eureka
 
AWS Serverless Introduction
AWS Serverless IntroductionAWS Serverless Introduction
AWS Serverless Introduction
 
AWS Serverless Introduction
AWS Serverless IntroductionAWS Serverless Introduction
AWS Serverless Introduction
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profile
 
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
 
Consul and Consul Pusher
Consul and Consul PusherConsul and Consul Pusher
Consul and Consul Pusher
 
Troubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationTroubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx Presentation
 
Microservices
MicroservicesMicroservices
Microservices
 
Eventsggx
EventsggxEventsggx
Eventsggx
 
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARING
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARINGSURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARING
SURVEY ON KEY AGGREGATE CRYPTOSYSTEM FOR SCALABLE DATA SHARING
 
MODULE-5_CCN.pptx
MODULE-5_CCN.pptxMODULE-5_CCN.pptx
MODULE-5_CCN.pptx
 
Hacking Zy Xel Gateways
Hacking Zy Xel GatewaysHacking Zy Xel Gateways
Hacking Zy Xel Gateways
 
spring-cloud.pptx
spring-cloud.pptxspring-cloud.pptx
spring-cloud.pptx
 
Consul and docker swarm cluster
Consul and docker swarm clusterConsul and docker swarm cluster
Consul and docker swarm cluster
 
Information System Security
Information System Security Information System Security
Information System Security
 

Spring Cloud and Netflix Components

  • 1.
  • 2. Agenda 1. Hystrix 2. Eureka 3. Zuul – Router & filter 4. Ribbon 5. Feign client 6. Spring Cloud Config server 7. Spring Cloud Bus 8. Q & A?
  • 4.
  • 5. Hystrix – Circuit breaker pattern Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
  • 6. Service Discovery: Eureka Server 1. Eureka is the Netflix Service Discovery Server and Client. The server can be configured and deployed to be highly available, with each server replicating state about the registered services to the others. 2. When a client registers with Eureka, it provides meta- data about itself such as host and port, health indicator URL, home page etc 3. Eureka receives heartbeat messages from each instance belonging to a service. If the heartbeat fails over a configurable timetable, the instance is normally removed from the registry. 4. @EnableEurekaClient to enable Eureka client.
  • 7. Eureka Server peer-peer communication Eureka can be made even more resilient and available by running multiple instances and asking them to register with each other spring: profiles: peer1 eureka: instance: hostname: peer1 client: serviceUrl: defaultZone: http://peer2/eureka/ eureka: instance: hostname: peer2 client: serviceUrl: defaultZone: http://peer1/eureka/
  • 8. Router and Filter: Zuul 1. Zuul is a JVM based router and server side load balancer by Netflix. 2. Zuul is the front door for all requests from devices and web sites to the backend of the Netflix streaming application. 3. Could also be used a reverse proxy server 4. Netflix uses Zuul for the following 1. Authentication 2. Insights 3. Stress Testing 4. Canary Testing 5. Dynamic Routing 6. Service Migration 7. Load Shedding 8. Security 9. Static Response handling 10. Active/Active traffic management
  • 9.
  • 10. Configuration application.yml : 1. zuul: routes: users: /myusers/** This means that http calls to "/myusers" get forwarded to the "users" service (for example "/myusers/101" is forwarded to "/101") 2. zuul: routes: users: path: /items/price** url: http://example.com/price_service_v2 - http calls to "/items/price/**" get forwarded to above URL.
  • 11. Client Side Load Balancer: Ribbon 1. A central concept in Ribbon is that of the named client. 2. Ribbon could be used in conjunction with Eureka server. 3. Ribbon could also be used independently by providing servers list as shown below stores: ribbon: listOfServers: example.com,google.com
  • 12. Usage @Configuration @RibbonClient(name = "foo", configuration = FooConfiguration.class) public class TestConfiguration { }
  • 13. Feign Client 1. Feign is a declarative web service client. It makes writing web service clients easier. 2. Feign could be used in conjunction with Ribbon to locate host names.
  • 14. Config Server 1. A central place to manage external properties for applications across all environments. 2. Exposes REST APIs (could be consumed by any language). 3. Backed by Git.
  • 15. Spring Cloud Bus 1. Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. 2. Could be used as a communication channel between apps. 3. The only implementation currently is with an AMQP broker as the transport
  • 16. Configuration & End points 1. Configuration in application.yml : spring: rabbitmq: host: mybroker.com port: 5672 username: user password: secret 2. /bus/env - sends key/values pairs to update each nodes Spring Environment. /bus/refresh - will reload each application’s configuration, just as if they had all been pinged on their /refresh endpoint. /bus/refresh?destination=customers:9000 - where the destination is an ApplicationContext ID