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.
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
*: support clustering #112
*: support clustering #112
Changes from 1 commit
b8b17a4
f93e752
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make it so complicated, are other components also like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is common for etcd and other cloud native applications. Other pingcap components relies on the central PD(they only need PD).
PD only provide
bootstrapClusters
options, and a sugar option ofbootstrapCluster
by-join xxx:2380
if you don't want to write all clusters by hands. I have no plan to include that sugar option in this PR.Honestly, discovery or dns is more convenient.
To use
--initial-clusters
, you need to specify all nodes. To use-join
, the cluster must be bootstraped already. Whatever you need to pass different options fot different PD and probably follow some orders(-join
).Operator has implemented some very complex code. But I hope I can start all
tiproxy
nodes by some etcd discovery like./bin/tiproxy --bootstrap-discovery-etcd xxxx
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my option, there's even no need to merge this PR, right? Proxies don't need to know each other, except for updating configurations. But updating configurations can be achieved by configuring the etcd address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no
etcd address
. Tiproxy itself is a etcd server.Unless you want a 'master tiproxy node' explicitly, again you need you need to first bootstrap a central single-node cluster. Other nodes need to
-central-etcd xxx
.Or if you want to propagate global configurations to every node manually by
tiproxyctl
. For example, tls certs, namespace/routing/filter rules.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if you want to remove etcd from tiproxy, and relies on an external ETCD. I think it makes things complicated. If you have PD, you don't want another etcd. If you use tiproxy with static servers, you need another etcd.