terrymanu commented on issue #37179:
URL:
https://github.com/apache/shardingsphere/issues/37179#issuecomment-3582402839
## Problem Understanding
The asks split into two: (1) change shard count with automatic data
redistribution; (2) have ShardingSphere sense DB high availability and auto
switch / service discovery.
## Problem Root Cause
ShardingSphere is positioned as a database traffic management layer with
fixed sharding-key mapping. It does not manage data redistribution, nor does it
manage or sense database HA status. This is a scoped design choice, not a
defect.
## Problem Analysis
- Automatic data redistribution: The community edition does not provide
automatic re-sharding/rebalancing. Changing shard count requires an explicit
migration/scale process (see official Data Pipeline docs:
https://shardingsphere.apache.org/document/current/en/features/
data-migration/).
- Database HA discovery: ShardingSphere does not handle instance health or
failover; that’s handled by the database’s own HA (e.g., MySQL
GR/primary-standby) or external components. ShardingSphere focuses on
rule-driven routing/traffic governance and keeps HA detection
and write drift out of scope for lightness.
- If you need both automatic redistribution and HA sensing together,
consider SphereEx DBPlusEngine (built on ShardingSphere) which claims to
implement both. Website: https://www.sphere-ex.com/.
## Problem Conclusion
This is an out-of-scope feature request, not a known bug. ShardingSphere
keeps fixed sharding mapping and a lightweight scope, so it will not add
automatic data redistribution or built-in DB HA detection/switching. If you
need these:
1. Use the database’s HA for failover;
2. Use external data migration for shard changes;
3. Or evaluate SphereEx DBPlusEngine for integrated support.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]