-
Notifications
You must be signed in to change notification settings - Fork 29
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
[DISCUSS] Introduce new CRD as StorageNode for better usability #292
Labels
Comments
5 tasks
support aws rds instance |
two things need to fix
|
@yikuaibro If you have free time, plz check upon two points. |
@Xu-Wentao Thank you very much for your guidance, I am honored to participate in the contribution, and I will try to fix them when I am free. |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
StorageNode Design
1. Background
At present, the CRD of ShardingSphere Operator can meet the needs of rapid deployment and ShardingSphere PoC verification, but it has insufficient support for scalability, such as the lack of the Cluster concept, and it is impossible to define a ShardingSphere logical Cluster through CRD, such as the initialization of storage nodes and the DistSQL task. It is still necessary to manually intervene in the maintenance of ShardingSphere. In this context, it is hoped to optimize the CRD of ShardingSphere and improve the various capabilities of the Operator in the way of DBRE.
2. Tasks
How to effectively manage different types of database implementations, including data source configuration, registration, physical library management, instance configuration of different topological relationships, database operation and maintenance task assignment, etc.
3. Description
3.1 StorageNode design
Similar to ComputeNode representing the abstraction of a group of computing nodes, StorageNode should also represent the abstraction of a group of storage nodes. According to the current registration logic of ShardingSphere, StorageNode belongs to a certain logic library and expresses the data source at the Schema level. The use of StorageNode needs to correspond to various attributes involved in
REGISTER STORAGE UNIT
:include:
Note: There are two preconditions before registering a storage node:
StorageNode represents a group of storage nodes, and its attributes include not only data sources and schemas, but also storage topology, types, and implementation methods. For example, a single MySQL instance, a MySQL cluster that supports MHA or MGR, AWS RDS Instance, AWS RDS Cluster, and AWS RDS Aurora have different information representation methods.
From the perspective of operation and maintenance, StorageNode can be created and specified manually, or can be automatically created by
in-tree
ordynamic-provisioner
through CRD similar toDatabaseClass
. In the same way, it can support manual and automatic operation and maintenance actions such as capacity expansion, configuration change, backup recovery, and offline. ShardingSphere also supports manual circuit breaking and mandatory traffic routing capabilities for designated storage nodes. Automatic creation is preferred here.Based on the above description, there are the following solutions:
3.1.1 Spec design
3.1.2 Status design
3.2 DatabaseClass design
Similar to StorageClass and IngressClass of Kubernetes, the resource control right is declared through
XClass CRD
, the specific configuration is declared by the corresponding PVC and Ingress, and the actual creation and other operations are performed by the controller specified byXClass
.Feature request:
XClassSpec
or definition needs to be abstract enough to be consumed by different controller implementationsx-controller
identifies the public resource, and then determines that it belongs to its own configurationXClass CRD
throughannotation
and other configurations, and completes subsequent creation actions according to the configuration3.3 StorageNode execution process
Take creating Aws rds as an example:
4 Expected outcome
Create StorageNode's CR, Specify the name of the DatabaseClass.
SS Operator will get the following outputs:
The new CRD definition presents a global storage node cluster and a logical database that supports partitioning and sharding.
Storage nodes that can be created manually or automatically, supporting different implementation methods.
A storage node management platform that can be automatically registered. This platform can control operation and maintenance actions such as storage node expansion, configuration changes, backup recovery, and offline, as well as functions such as manual fusing and forced traffic routing.
A controller module that supports the execution of storage node operation and maintenance, and DistSQL.
This can improve the scalability and configuration management flexibility of SS Operator, making it more suitable for cloud-native distributed architecture. It can enable ShardingSphere to better support automated deployment and maintenance across cloud platforms, while improving development efficiency and reducing the difficulty of operation and maintenance.
5 References
The text was updated successfully, but these errors were encountered: