application-prod.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. server:
  2. port: 8080
  3. # gRPC 服务端配置
  4. grpc:
  5. server:
  6. # KeepAlive 配置(与客户端配合使用)
  7. keep-alive-time: 20s
  8. keep-alive-timeout: 5s
  9. permit-keep-alive-without-calls: true
  10. permit-keep-alive-time: 10s
  11. # 连接生命周期管理(服务端配置)
  12. max-connection-idle: 300s # 5分钟空闲后关闭连接
  13. max-connection-age: 3600s # 1小时后强制关闭连接
  14. max-connection-age-grace: 5s # 关闭前宽限期,让进行中的请求完成
  15. # 线程池监控配置
  16. thread:
  17. pool:
  18. monitor:
  19. enabled: true
  20. interval: 30
  21. thread:
  22. threshold: 0.8
  23. queue:
  24. threshold: 0.8
  25. eureka:
  26. instance:
  27. prefer-ip-address: true #是否优先使用IP地址作为主机名的标识,默认false
  28. instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port} #注册到eureka上的唯一实例ID
  29. lease-renewal-interval-in-seconds: 10 #表示eureka client发送心跳给server端的频率,默认30
  30. lease-expiration-duration-in-seconds: 30 #表示eureka server至上一次收到client的心跳之后,等待下一次心跳的超时时间,在这个时间内若没收到下一次心跳,则将移除该instance,默认90
  31. client:
  32. registry-fetch-interval-seconds: 5 #定时从Eureka Server拉取服务注册信息的间隔时间
  33. serviceUrl:
  34. defaultZone: http://eureka-internal.piaoquantv.com/eureka/
  35. spring:
  36. redis:
  37. hostName: r-bp1pi8wyv6lzvgjy5z.redis.rds.aliyuncs.com
  38. port: 6379
  39. password: Wqsd@2019
  40. timeout: 5000 # 增加到5秒,防止批量查询超时
  41. lettuce:
  42. pool:
  43. # 增大连接池容量,防止高并发时连接等待
  44. max-active: 64
  45. max-wait: 2000
  46. max-idle: 32
  47. min-idle: 8
  48. tair:
  49. hostName: r-bp1pi8wyv6lzvgjy5z.redis.rds.aliyuncs.com
  50. port: 6379
  51. password: Wqsd@2019
  52. timeout: 5000 # 增加到5秒,防止批量查询超时
  53. lettuce:
  54. pool:
  55. max-active: 64
  56. max-wait: 2000
  57. max-idle: 32
  58. min-idle: 8
  59. apollo:
  60. meta: http://apolloconfig-internal.piaoquantv.com
  61. aliyun:
  62. log:
  63. endpoint: cn-hangzhou-intranet.log.aliyuncs.com
  64. accessKeyId: LTAIP6x1l3DXfSxm
  65. accessKeySecret: KbTaM9ars4OX3PMS6Xm7rtxGr1FLon
  66. project: recommend-feature