Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces the feature that octo-proxy can close connections when it detects a failover based on a change to a CNAME record.
When
monitor
is set octo-proxy will continuously resolve the record. The record is expect to be a CNAME. If the record is not a CNAME then it is equivalent to the CNAME containing an empty value. The feature keeps a copy of the last value it resolved and compares it against the new value in each cycle. If the new value and the last value are different then the proxy will close connections forcing a reconnect.This functionality is desired as a solution to failing over long lived connections. Traditional DNS fail over works well for frequent short connections where the DNS record is being resolved each time. The problem this feature aims to solve is that connections only resolve DNS once, therefore without this feature a DNS fail over would have no effect on a long lived connection, the proposed solution is to monitor the DNS and force re-connection.