history-service-test.toml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [mysql]
  2. addr = "127.0.0.1:4000"
  3. dsn = "root:@tcp(127.0.0.1:4000)/bilibili_history?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8mb4"
  4. active = 20
  5. idle = 10
  6. idleTimeout ="4h"
  7. queryTimeout = "100ms"
  8. execTimeout = "100ms"
  9. tranTimeout = "200ms"
  10. [TiDB]
  11. dsn = "root:@tcp(127.0.0.1:4000)/bilibili_history?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8mb4"
  12. active = 5
  13. idle = 2
  14. idleTimeout ="4h"
  15. queryTimeout = "1s"
  16. execTimeout = "1s"
  17. tranTimeout = "1s"
  18. [TiDB.breaker]
  19. window = "3s"
  20. sleep = "100ms"
  21. bucket = 10
  22. ratio = 0.5
  23. request = 100
  24. [redis]
  25. name = "history-service"
  26. proto = "tcp"
  27. addr = "127.0.0.1:6379"
  28. idle = 10
  29. active = 10
  30. dialTimeout = "1s"
  31. readTimeout = "1s"
  32. writeTimeout = "1s"
  33. idleTimeout = "10s"
  34. expire = "1m"
  35. [databus]
  36. [databus.merge]
  37. key = "170e302355453683"
  38. secret = "3d0e8db7bed0503949e545a469789279"
  39. group= "HistoryServiceMerge-MainCommunity-P"
  40. topic= "HistoryServiceMerge-T"
  41. action="pub"
  42. name = "history"
  43. proto = "tcp"
  44. addr = "172.18.33.50:6205"
  45. idle = 1
  46. active = 10
  47. dialTimeout = "1s"
  48. readTimeout = "1s"
  49. writeTimeout = "1s"
  50. idleTimeout = "10s"
  51. [History]
  52. [merge]
  53. MaxSize = 100
  54. Interval = "1s"
  55. Buffer = 1024
  56. # 线上要大于100 不然partion 分布不均
  57. Worker = 100
  58. Sync = false