location-example.toml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. filePath = "./source"
  2. ipv4Name = "mydata4vipday4.ipdb"
  3. ipv6Name = "mydata6vipday4.ipdb"
  4. anonymFileName = "GeoIP2-Anonymous-IP.mmdb"
  5. anonymKey = "cOp1pc4JZRpf"
  6. filterZone = ["共享地址","局域网","本机地址"]
  7. [host]
  8. maxmind = "https://download.maxmind.com"
  9. bvcip = "http://bvc-nerve.bilibili.co"
  10. [log]
  11. dir = "/data/log/location-service/"
  12. [db]
  13. [db.zlimit]
  14. name = "127.0.0.1:3306"
  15. dsn = "root:test@tcp(127.0.0.1:3306)/bilibili_oversea?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  16. active = 5
  17. idle = 5
  18. idleTimeout ="4h"
  19. queryTimeout = "1s"
  20. execTimeout = "1s"
  21. tranTimeout = "1s"
  22. [db.zlimit.breaker]
  23. window ="3s"
  24. sleep ="100ms"
  25. bucket = 10
  26. ratio = 0.5
  27. request = 100
  28. [redis]
  29. [redis.zlimit]
  30. name = "location-service"
  31. proto = "tcp"
  32. addr = "172.18.33.61:6812"
  33. #addr = "172.16.33.54:6379"
  34. idle = 10
  35. active = 10
  36. dialTimeout = "1s"
  37. readTimeout = "1s"
  38. writeTimeout = "1s"
  39. idleTimeout = "10s"
  40. expire = "10s"
  41. [bm]
  42. [bm.inner]
  43. addr = "0.0.0.0:6291"
  44. timeout = "1s"
  45. [bm.local]
  46. addr = "0.0.0.0:6292"
  47. timeout = "1s"
  48. [rpcServer2]
  49. [[rpcServer2.servers]]
  50. proto = "tcp"
  51. addr = "0.0.0.0:6293"
  52. weight = 10
  53. [rpcServer2.zookeeper]
  54. root = "/microservice/location-service/"
  55. addrs = ["172.18.33.172:2181"]
  56. timeout = "30s"
  57. [wardenServer]
  58. addr = "0.0.0.0:9000"
  59. timeout = "1s"
  60. [liveZK]
  61. addrs = ["172.22.33.130:2181"]
  62. timeout = "30s"
  63. [httpClient]
  64. key = "e7482d29be4a95b8"
  65. secret = "9e803791cdef756e75faee68e12b7442"
  66. dial = "80ms"
  67. timeout = "100ms"
  68. keepAlive = "60s"
  69. [httpClient.breaker]
  70. window = "1s"
  71. sleep = "100ms"
  72. bucket = 10
  73. ratio = 0.5
  74. request = 100
  75. [httpClient.Host]
  76. "api.live.bilibili.co" = {timeout = "200ms"}
  77. [httpClient.url]
  78. "http://api.bilibili.co/x/internal/v2/fav/video" = {timeout = "500ms"}