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

Add Close() to types.Connection to allow the server to close a connection #91

Closed
andykellr opened this issue Jun 9, 2022 · 0 comments · Fixed by #129
Closed

Add Close() to types.Connection to allow the server to close a connection #91

andykellr opened this issue Jun 9, 2022 · 0 comments · Fixed by #129

Comments

@andykellr
Copy link
Contributor

andykellr commented Jun 9, 2022

It can be useful to close an agent connection to the server and I propose that a Close() method be added to the types.Connection interface.

The agent may quickly reconnect, but in a server cluster with multiple nodes, periodically closing connections can help with rebalancing the cluster.

Consider the case of 100 agents connected to a 2-node cluster and assume a load balancer splits them 50/50 between the 2 nodes. If one node is terminated, 50 agents will reconnect and now all 100 agents will be connected to a single node. If a node is added, there will still be 100 agents connected to a single node and the new node will have 0 agents.

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 a pull request may close this issue.

1 participant