[mysql] addr = "127.0.0.1:4000" dsn = "root:@tcp(127.0.0.1:4000)/bilibili_history?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8mb4" active = 20 idle = 10 idleTimeout ="4h" queryTimeout = "100ms" execTimeout = "100ms" tranTimeout = "200ms" [TiDB] dsn = "root:@tcp(127.0.0.1:4000)/bilibili_history?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8mb4" active = 5 idle = 2 idleTimeout ="4h" queryTimeout = "1s" execTimeout = "1s" tranTimeout = "1s" [TiDB.breaker] window = "3s" sleep = "100ms" bucket = 10 ratio = 0.5 request = 100 [redis] name = "history-service" proto = "tcp" addr = "127.0.0.1:6379" idle = 10 active = 10 dialTimeout = "1s" readTimeout = "1s" writeTimeout = "1s" idleTimeout = "10s" expire = "1m" [databus] [databus.merge] key = "170e302355453683" secret = "3d0e8db7bed0503949e545a469789279" group= "HistoryServiceMerge-MainCommunity-P" topic= "HistoryServiceMerge-T" action="pub" name = "history" proto = "tcp" addr = "172.18.33.50:6205" idle = 1 active = 10 dialTimeout = "1s" readTimeout = "1s" writeTimeout = "1s" idleTimeout = "10s" [History] [merge] MaxSize = 100 Interval = "1s" Buffer = 1024 # 线上要大于100 不然partion 分布不均 Worker = 100 Sync = false