Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce CNAME monitoring feature #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhill-holoplot
Copy link

@mhill-holoplot mhill-holoplot commented Oct 29, 2024

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.

This change introduces the feature that octo-proxy can close connections
when it detects a failover based on a change to a CNAME record.

It is occasionally desirable to failover traffic from one target to
another. A popular way of doing this failover is by changing a CNAME.
The next connection that is made will use the updated DNS records to
resolve so new connections will me made to the newly desired targets.
Existing connections will remain intact unless otherwise disconnected;
this behaviour may or may not be desirable depending on the application.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant