组件:
- discovery-server-01: standalone 启动
- time-server-01: 服务提供者
- 启动时添加参数:server.port 4444 和 server.port 5555 启动两个
- time-client-01: 服务消费者
组件:
- discovery-server-02: 集群启动
- 启动时添加参数:spring.active.profile discovery1 和 spring.active.profile discovery2 启动两个
- time-server-02: 服务提供者
- 启动时添加参数:server.port 4444 和 server.port 5555 启动两个
- time-client-02: 服务消费者
具体看 discovery-server-02 和 time-server-02 中的配置信息
组件:
- feign01: 启动后不需要服务注册,直接访问即可
访问地址:localhost:9090/search/github?str=spring-cloud-dubbo
组件:
- discovery-server-01: standalone 启动
- feign-client-02: feign 的客户端
- feign-client-02: feign 的服务端
- 替换默认的 http 客户端 --> HttpClient or OkHttp
- Feign Get 多参数
- Feign 拦截器的使用 -- 传递 token
组件:
- hystrix-basic-01
实验样例:
- 同步调用testSynchronous
- 同步安静失败testSynchronousFailSilently
- 同步快速失败testSynchronousFailFast
- 异步调用testAsynchronous
- 响应式调用testObservable
- 缓存调用testWithCacheHist
组件:
- hystrix-basic-02
是一个模拟交易的实例:
---> GetUserAccount ---> GetPaymentInfo ---> GetOrder ---> PayCreditCard
组件:
- discovery-server-01: standalone 启动
- hystrix-feign-01 作为 feign 的客户端,并启用 Hystrix
- feign-service-02 作为 feign 的服务端
实验有关 feign,hystrix,ribbon 超时与重试的相关配置
组件:
- discovery-server-01: standalone 启动
- hystrix-feign-01 作为 feign 的客户端,并启用 Hystrix
- feign-service-02 作为 feign 的服务端
- hystrix-dashboard-01 作为 hystrix dashboard 的单独应用
组件:
- discovery-server-01: standalone 启动
- hystrix-feign-01 作为 feign 的客户端,并启用 Hystrix
- feign-service-02 作为 feign 的服务端,启动两个实例,两个端口
- 8081
- 8082
- hystrix-turbines-01 作为 turbine 和 hystrix dashboard 的应用
访问: http://localhost:9001/turbine.stream?cluster=hystrix-feign-service
然后将 http://localhost:9000/turbine.stream?cluster=hystrix-feign-service 这个地址放到 Hystrix Dashboard (http://localhost:9001/hystrix)上去