slb
slb copied to clipboard
slb server pending only grows when no servers
I start up slb server
but not start up servers
.
Found pending
only grows. think error should not grow pending
➜ slb git:(master) go run cmd/slb/slb.go -config config.json
2018/02/14 21:03:25 balancing from port :8000
2018/02/14 21:03:29
Host with pending tasks:
{host:localhost:9000 index:0 pending:1}
{host:localhost:9001 index:1 pending:0}
{host:localhost:9002 index:2 pending:0}
{host:localhost:9003 index:3 pending:0}
Avg Load: 0.25 | Std Dev: 0.43
2018/02/14 21:03:30 http: proxy error: dial tcp [::1]:9000: getsockopt: connection refused
2018/02/14 21:03:31
Host with pending tasks:
{host:localhost:9000 index:0 pending:1}
{host:localhost:9001 index:1 pending:1}
{host:localhost:9002 index:2 pending:0}
{host:localhost:9003 index:3 pending:0}
Avg Load: 0.50 | Std Dev: 0.50
2018/02/14 21:03:31 http: proxy error: dial tcp [::1]:9001: getsockopt: connection refused
2018/02/14 21:12:08
Host with pending tasks:
{host:localhost:9000 index:0 pending:1}
{host:localhost:9001 index:1 pending:1}
{host:localhost:9002 index:2 pending:1}
{host:localhost:9003 index:3 pending:0}
Avg Load: 0.75 | Std Dev: 0.43
2018/02/14 21:12:08 http: proxy error: dial tcp [::1]:9002: getsockopt: connection refused
2018/02/14 21:12:13
Host with pending tasks:
{host:localhost:9000 index:0 pending:1}
{host:localhost:9001 index:1 pending:1}
{host:localhost:9002 index:2 pending:1}
{host:localhost:9003 index:3 pending:1}
Avg Load: 1.00 | Std Dev: 0.00
2018/02/14 21:12:13 http: proxy error: dial tcp [::1]:9003: getsockopt: connection refused
Right, I was going to add a smoke test step to ping the hosts in the config file before adding them to the pool. Haven't gotten around to that yet.
Thanks for pointing that out 👍 .