Skip to content

Commit

Permalink
proxy Version 1.5.5 (#49)
Browse files Browse the repository at this point in the history
1. change pinger as long connection.
  • Loading branch information
wayslog authored and felixhao committed Jan 25, 2019
1 parent 1d99915 commit 1474dee
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 63 deletions.
64 changes: 4 additions & 60 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,9 @@
# Overlord

## Version 2.0.0
1. add apiserver: http front end
2. add cmd/executor: mesos executor
3. add cmd/scheduler: mesos framework
4. add mesos support: mesos library
5. add job library: job is a work progress abstraction(support balance/create now)
6. add lib/myredis: myredis is a simple redis client.
7. add lib/etcd: etcd is the etcd helper based on etcd api/v1
8. add front-end: front-end design and completed
# proxy

## Version 1.5.4
1. ping timeout 100ms.
2. fix max connection limit.
Latest Version 1.5.5 [history](proxy/CHANGELOG.md)

## Version 1.5.3
1. fix pipe read when one err.
# platform

## Version 1.5.2
1. max redirects 5.

## Version 1.5.1
1. reset sub message only in need.

## Version 1.5.0
1. refactor message pipeline.
2. non-persistent connection for cluster redirect.

## Version 1.4.0
1. add redis cluster support.

## Version 1.3.2
1. change round-chan to race-chan.

## Version 1.3.1
1. hot fix reconn.

## Version 1.3.0
1. add executor interface.
2. add pinger interface.
3. add MsgBatchAlloctor for one node WR.

## Version 1.2.2
1. fix batchdone err.
2. add node reconn.

## Version 1.2.1
1. fix message and request reuse bug.

## Version 1.2.0
1. add redis protocol support.

## Version 1.1.0
1. add memcache binary protocol support.
2. add conf file check.

## Version 1.0.0
1. compitable consist hash with twemproxy.
2. reduce object alloc (by using Pool).
3. recycle using of request and response memory.
4. batch message execute to reduce conflict of command channel.
5. using writev to reduce syscall times.
6. synchronously send and wait of message.
7. zero copy of request and response data at all.
Latest Version 2.0.0 [history](platform/CHANGELOG.md)
2 changes: 1 addition & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
// VERSION version
VERSION = "1.5.4"
VERSION = "1.5.5"
)

var (
Expand Down
11 changes: 11 additions & 0 deletions platform/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Overlord-platform

## Version 2.0.0
1. add apiserver: http front end
2. add cmd/executor: mesos executor
3. add cmd/scheduler: mesos framework
4. add mesos support: mesos library
5. add job library: job is a work progress abstraction(support balance/create now)
6. add lib/myredis: myredis is a simple redis client.
7. add lib/etcd: etcd is the etcd helper based on etcd api/v1
8. add front-end: front-end design and completed
58 changes: 58 additions & 0 deletions proxy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Overlord-proxy

## Version 1.5.5
1. change pinger as long connection.

## Version 1.5.4
1. ping timeout 100ms.
2. fix max connection limit.

## Version 1.5.3
1. fix pipe read when one err.

## Version 1.5.2
1. max redirects 5.

## Version 1.5.1
1. reset sub message only in need.

## Version 1.5.0
1. refactor message pipeline.
2. non-persistent connection for cluster redirect.

## Version 1.4.0
1. add redis cluster support.

## Version 1.3.2
1. change round-chan to race-chan.

## Version 1.3.1
1. hot fix reconn.

## Version 1.3.0
1. add executor interface.
2. add pinger interface.
3. add MsgBatchAlloctor for one node WR.

## Version 1.2.2
1. fix batchdone err.
2. add node reconn.

## Version 1.2.1
1. fix message and request reuse bug.

## Version 1.2.0
1. add redis protocol support.

## Version 1.1.0
1. add memcache binary protocol support.
2. add conf file check.

## Version 1.0.0
1. compitable consist hash with twemproxy.
2. reduce object alloc (by using Pool).
3. recycle using of request and response memory.
4. batch message execute to reduce conflict of command channel.
5. using writev to reduce syscall times.
6. synchronously send and wait of message.
7. zero copy of request and response data at all.
7 changes: 5 additions & 2 deletions proxy/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ func (f defaultForwarder) processPing(p *pinger) {
err error
del bool
)
p.ping = newPingConn(p.cc, p.addr)
for {
p.ping = newPingConn(p.cc, p.addr)
err = p.ping.Ping()
p.ping.Close()
if err == nil {
p.failure = 0
if del {
Expand All @@ -204,7 +203,11 @@ func (f defaultForwarder) processPing(p *pinger) {
}
time.Sleep(pingSleepTime(false))
continue
} else {
_ = p.ping.Close()
p.ping = newPingConn(p.cc, p.addr)
}

p.failure++
if log.V(3) {
log.Warnf("ping node:%s addr:%s fail:%d times with err:%v", p.alias, p.addr, p.failure, err)
Expand Down

0 comments on commit 1474dee

Please sign in to comment.