You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add some tcp keeperalive options to the stolon proxy:
Enable tcpkeepalive by default (like done by postgres) on incoming connections
Add some options to tune tcp keepalive. I'd like to support linux settings at first being able to tune all three settings (time, probe number and interval).
For the latter: using the golang stdlib ttps://golang.org/pkg/net/#TCPConn.SetKeepAlivePeriod doesn't permit a fine grained setting since it's a common function between different OSes where you can only define an interval that will have different effects depending on the OS. On Linux this will leave the probe value untouched and set time and interval to the same value.
So we need to directly call a setsockopt syscall to the fd owned by a TCPConn, for doing this we have to access the private fd. These could be done with 2 tricks both having different problems:
Get a cloned fd using conn.File(), apply the socket options and then put it back in nonblocking mode like done by https://github.com/felixge/tcpkeepalive . I don't like this way since it's not the right use of File().
We should add some tcp keeperalive options to the stolon proxy:
For the latter: using the golang stdlib ttps://golang.org/pkg/net/#TCPConn.SetKeepAlivePeriod doesn't permit a fine grained setting since it's a common function between different OSes where you can only define an interval that will have different effects depending on the OS. On Linux this will leave the probe value untouched and set time and interval to the same value.
So we need to directly call a setsockopt syscall to the fd owned by a TCPConn, for doing this we have to access the private fd. These could be done with 2 tricks both having different problems:
We could implement both 2 and 3 depending on the go version.
The text was updated successfully, but these errors were encountered: