slb icon indicating copy to clipboard operation
slb copied to clipboard

slb server pending only grows when no servers

Open wodog opened this issue 7 years ago • 1 comments

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

wodog avatar Feb 14 '18 13:02 wodog

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 👍 .

JackyChiu avatar Feb 18 '18 21:02 JackyChiu