Skip to content

Commit

Permalink
set log interval 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev committed Dec 21, 2023
1 parent 9bff3f1 commit 1fbf30f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ load_balancer:
ttl: 600
logger:
bunch_size: 1000
pool_interval_seconds: 10
pool_interval_seconds: 1
metrics:
enabled: true
host: 0.0.0.0:9000
Expand Down
4 changes: 4 additions & 0 deletions balancers/iphash.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (b *ipHashBalancer) Next(c echo.Context) *middleware.ProxyTarget {
return b.targets[0]
}

if c.Get("retry") != nil {
return b.retryTarget
}

ctx := c.Request().Context()
ip := []byte(c.RealIP())
got, err := b.store.Get(ctx, ip)
Expand Down
2 changes: 1 addition & 1 deletion tzproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ load_balancer:
ttl: 600
logger:
bunch_size: 1000
pool_interval_seconds: 10
pool_interval_seconds: 1
metrics:
enabled: true
host: 0.0.0.0:9000
Expand Down
2 changes: 1 addition & 1 deletion utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var defaultConfig = &ConfigFile{
},
Logger: Logger{
BunchSize: 1000,
PoolIntervalSeconds: 10,
PoolIntervalSeconds: 1,
},
RateLimit: RateLimit{
Enabled: false,
Expand Down

0 comments on commit 1fbf30f

Please sign in to comment.