当前位置: 首页 > news >正文

spring zuul Ribbon 配置

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

spring zuul Ribbon 配置 博客分类: java 微服务
#ribbon 配置
#https://github.com/Netflix/ribbon/blob/master/ribbon-examples/src/main/resources/sample-client.properties

# Max number of retries on the same server (excluding the first try)
sample-client.ribbon.MaxAutoRetries=1

# Max number of next servers to retry (excluding the first server)
sample-client.ribbon.MaxAutoRetriesNextServer=1

# Whether all operations can be retried for this client
sample-client.ribbon.OkToRetryOnAllOperations=true

# Interval to refresh the server list from the source
sample-client.ribbon.ServerListRefreshInterval=2000

# Connect timeout used by Apache HttpClient
sample-client.ribbon.ConnectTimeout=3000

# Read timeout used by Apache HttpClient
sample-client.ribbon.ReadTimeout=3000

# Initial list of servers, can be changed via Archaius dynamic property at runtime
sample-client.ribbon.listOfServers=www.microsoft.com:80,www.yahoo.com:80,www.google.com:80

sample-client.ribbon.EnablePrimeConnections=true

 

 

 

zuul配置
server:
  port: 9090

eureka:
  client:
    serviceUrl:
      defaultZone: http://127.0.0.1:8761/eureka/

zuul:
  #Service will be mapped under the /api URI
  prefix: /api
#  Uncomment to disable auto-registering all services read from Eureka
#  ignoredServices: '*'
  routes:
    customer-by-address:
      path: /customer-by-address/**
      url: http://localhost:9098
    customer-by-service:
      path: /customer-by-service/**
      serviceId: CUSTOMER-SERVICE
    static:
      path: /static/**
 
ribbon:
      #如果设置为1那么就是1+1=2.如果设置3那么就是3次
      MaxAutoRetries: 1 
      #MaxAutoRetriesNextServer: 1  

spring:
  application:
    name: zuul-server

 

 

  http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html

https://github.com/Netflix/ribbon/blob/master/ribbon-examples/src/main/resources/sample-client.properties

http://cloud.spring.io/spring-cloud-netflix/#quick-start

https://github.com/spring-cloud/spring-cloud-netflix

转载于:https://my.oschina.net/xiaominmin/blog/1599020

相关文章:

  • selenium 代理
  • 在Ubuntu 10.04上安装java 1.5 java 1.6
  • 超级简单:共享两个自动生成存储过程的工具
  • 拍照黑科技上线 用2000万四镜头定格跨年瞬间
  • Easyui layout设置满屏效果
  • 用算法撩妹都不会,别跟我说你是程序员
  • 掌握面试——弹出框的实现(一道题中包含布局/js设计模式)
  • 设计模式系列之「责任链模式」
  • 20 个常用的 CSS 技巧
  • 为什么要使用Gradle?
  • Docker CE 安装
  • 常用收藏与分享
  • padding和margin的区别和作用及各种场合出现的bug
  • 第 51 章 DML (Data Manipulation Language)
  • html2练习
  • 30天自制操作系统-2
  • Android 初级面试者拾遗(前台界面篇)之 Activity 和 Fragment
  • Angularjs之国际化
  • ES6系统学习----从Apollo Client看解构赋值
  • hadoop集群管理系统搭建规划说明
  • iOS动画编程-View动画[ 1 ] 基础View动画
  • laravel with 查询列表限制条数
  • miaov-React 最佳入门
  • Netty 4.1 源代码学习:线程模型
  • Python - 闭包Closure
  • React-生命周期杂记
  • select2 取值 遍历 设置默认值
  • WordPress 获取当前文章下的所有附件/获取指定ID文章的附件(图片、文件、视频)...
  • Zepto.js源码学习之二
  • 函数式编程与面向对象编程[4]:Scala的类型关联Type Alias
  • 欢迎参加第二届中国游戏开发者大会
  • 深度学习中的信息论知识详解
  • 数据可视化之 Sankey 桑基图的实现
  • 如何通过报表单元格右键控制报表跳转到不同链接地址 ...
  • ​人工智能书单(数学基础篇)
  • #AngularJS#$sce.trustAsResourceUrl
  • #传输# #传输数据判断#
  • (1)Nginx简介和安装教程
  • (20)目标检测算法之YOLOv5计算预选框、详解anchor计算
  • (C#)if (this == null)?你在逗我,this 怎么可能为 null!用 IL 编译和反编译看穿一切
  • (pojstep1.1.1)poj 1298(直叙式模拟)
  • (笔试题)合法字符串
  • (编程语言界的丐帮 C#).NET MD5 HASH 哈希 加密 与JAVA 互通
  • (附源码)ssm高校社团管理系统 毕业设计 234162
  • (一)eclipse Dynamic web project 工程目录以及文件路径问题
  • (一)基于IDEA的JAVA基础10
  • .360、.halo勒索病毒的最新威胁:如何恢复您的数据?
  • .equal()和==的区别 怎样判断字符串为空问题: Illegal invoke-super to void nio.file.AccessDeniedException
  • .net 流——流的类型体系简单介绍
  • .net 重复调用webservice_Java RMI 远程调用详解,优劣势说明
  • .net网站发布-允许更新此预编译站点
  • :“Failed to access IIS metabase”解决方法
  • [ element-ui:table ] 设置table中某些行数据禁止被选中,通过selectable 定义方法解决
  • [2010-8-30]
  • [AHOI2009]中国象棋 DP,递推,组合数