cloudflare / cloudflare/cloudflared
Exponential backoff for Access
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm currently using ./cloudflared access for both TCP and RDP applications. Unlike the tunnel server, it uses exponential backoff if it disconnects from CF's POP.
```
ERROR[2020-10-22T11:57:10Z] Serve tunnel error: tls: use of closed connection
INFO[2020-10-22T11:57:10Z] Retrying connection 0 in 1s seconds
INFO[2020-10-22T11:57:11Z] Connection 0 registered with CDG using ID
ERROR[2020-10-22T11:57:11Z] Serve tunnel error: tls: use of closed connection
INFO[2020-10-22T11:57:11Z] Retrying connection 1 in 1s seconds
INFO[2020-10-22T11:57:13Z] Connection 1 registered with CDG using ID
```
However, this does not apply to Access. If the POP fails (websocket: bad handshake, tcp disconnects, connection timeout), it will keep retrying which spike my network bandwidth (burst up to 200mbps for 1-2 minutes)..
Logs example:
```
ERROR[2020-10-22T14:05:09Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:09Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
ERROR[2020-10-22T14:05:10Z] failed to connect to https://tunnel. with error: websocket: bad handshake
```
maybe exponential backoff support for access? 🙏
Contributor guide
Assessment
This issue has not been assessed yet.