mycat入门:分片策略详解

简介: mycat入门:分片策略详解


image.png

分片策略为数据表的拆分原则,了解即可。

1.分片枚举

通过在配置文件中配置可能的枚举 id,自己配置分片,本规则适用于特定的场景,比如有些业务需要按照省 份或区县来做保存,而全国省份区县固定的,这类业务使用本条规则,配置如下:

1. <tableRule name="sharding-by-intfile">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>hash-int</algorithm>
5. </rule>
6. </tableRule>
7. <function name="hash-int" class="io.mycat.route.function.PartitionByFileMap">
8. <property name="mapFile">partition-hash-int.txt</property>
9. <property name="type">0</property>
10. <property name="defaultNode">0</property>
11. </function>
12. partition-hash-int.txt 配置:
13. 10000=0
14. 10010=1
15. DEFAULT_NODE=1
16. 复制代码
1. 上面 columns 标识将要分片的表字段,algorithm 分片函数,
2. 其中分片函数配置中,mapFile 标识配置文件名称,type 默认值为 0,0 表示 Integer,非零表示 String,
3. 所有的节点配置都是从 0 开始,及 0 代表节点 1
4. /**
5. * defaultNode 默认节点:小于 0 表示不设置默认节点,大于等于 0 表示设置默认节点
6. * 默认节点的作用:枚举分片时,如果碰到不识别的枚举值,就让它路由到默认节点
7. * 如果不配置默认节点(defaultNode 值小于 0 表示不配置默认节点),碰到
8. * 不识别的枚举值就会报错,
9. * like this:can’t find datanode for sharding column:column_nameval:ffffffff
10. */
11. 复制代码

2.固定分片 hash 算法

本条规则类似于十进制的求模运算,区别在于是二进制的操作,是取 id 的二进制低 10 位,即 id 二进制  &1111111111。 此算法的优点在于如果按照 10 进制取模运算,在连续插入 1-10 时候 1-10 会被分到 1-10  个分片,增 大了插入的事务控制难度,而此算法根据二进制则可能会分到连续的分片,减少插入事务事务控制难度。

1. <tableRule name="rule1">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>func1</algorithm>
5. </rule>
6. </tableRule>
7. <function name="func1" class="io.mycat.route.function.PartitionByLong">
8. <property name="partitionCount">2,1</property>
9. <property name="partitionLength">256,512</property>
10. </function>
11. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,
3. partitionCount 分片个数列表,partitionLength 分片范围列表
4. 分区长度:默认为最大 2^n=1024 ,即最大支持 1024 分区
5. 约 束 :
6. count,length 两个数组的长度必须是一致的。
7. 1024 = sum((count[i]*length[i])). count 和 length 两个向量的点积恒等于 1024
8. 用法例子:
9. 本例的分区策略:希望将数据水平分成 3 份,前两份各占 25%,第三份占 50%。(故本例非均匀分区)
10. // |<———————1024———————————>|
11. // |<—-256—>|<—-256—>|<———-512————->|
12. // | partition0 | partition1 | partition2 |
13. // | 共 2 份,故 count[0]=2 | 共 1 份,故 count[1]=1 |
14. int[] count = new int[] { 2, 1 };
15. int[] length = new int[] { 256, 512 };
16. PartitionUtil pu = new PartitionUtil(count, length);
17. 复制代码
1. // 下面代码演示分别以 offerId 字段或 memberId 字段根据上述分区策略拆分的分配结果
2. int DEFAULT_STR_HEAD_LEN = 8; // cobar 默认会配置为此值
3. long offerId = 12345;
4. String memberId = "qiushuo";
5. // 若根据 offerId 分配,partNo1 将等于 0,即按照上述分区策略,offerId 为 12345 时将会被分配
6. 到 partition0 中
7. int partNo1 = pu.partition(offerId);
8. // 若根据 memberId 分配,partNo2 将等于 2,即按照上述分区策略,memberId 为 qiushuo 时将会被
9. 分到 partition2 中
10. int partNo2 = pu.partition(memberId, 0, DEFAULT_STR_HEAD_LEN);
11. 复制代码

如果需要平均分配设置:平均分为 4 分片,partitionCount*partitionLength=1024

1. <function name="func1" class="io.mycat.route.function.PartitionByLong">
2. <property name="partitionCount">4</property>
3. <property name="partitionLength">256</property>
4. </function>
5. 复制代码

3.范围约定

此分片适用于,提前规划好分片字段某个范围属于哪个分片, start <= range <= end. range start-end ,data node index K=1000,M=10000.

1. <tableRule name="auto-sharding-long">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>rang-long</algorithm>
5. </rule>
6. </tableRule>
7. <function name="rang-long" class="io.mycat.route.function.AutoPartitionByLong">
8. <property name="mapFile">autopartition-long.txt</property>
9. <property name="defaultNode">0</property>
10. </function>
11. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,
3. rang-long 函数中 mapFile 代表配置文件路径
4. defaultNode 超过范围后的默认节点。
5. 所有的节点配置都是从 0 开始,及 0 代表节点 1,此配置非常简单,即预先制定可能的 id 范围到某个分片
6. 0-500M=0
7. 500M-1000M=1
8. 1000M-1500M=2
9. 或
10. 0-10000000=0
11. 10000001-20000000=1
12. 复制代码

4.取模

此规则为对分片字段求摸运算

1. <tableRule name="mod-long">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>mod-long</algorithm>
5. </rule>
6. </tableRule>
7. <function name="mod-long" class="io.mycat.route.function.PartitionByMod">
8. <!-- how many data nodes -->
9. <property name="count">3</property>
10. </function>
11. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,
3. 此种配置非常明确即根据 id 进行十进制求模预算,相比固定分片 hash,此种在批量插入时可能存在批量插入单
4. 事务插入多数据分片,增大事务一致性难度。
5. 复制代码

5.按日期(天)分片

此规则为按天分片。

1. <tableRule name="sharding-by-date">
2. <rule>
3. <columns>create_time</columns>
4. <algorithm>sharding-by-date</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-date" class="io.mycat.route.function.PartitionByDate">
8. <property name="dateFormat">yyyy-MM-dd</property>
9. <property name="sBeginDate">2014-01-01</property>
10. <property name="sEndDate">2014-01-02</property>
11. <property name="sPartionDay">10</property>
12. </function>
13. 复制代码
1. 配置说明:
2. columns :标识将要分片的表字段
3. algorithm :分片函数
4. dateFormat :日期格式
5. sBeginDate :开始日期
6. sEndDate:结束日期
7. sPartionDay :分区天数,即默认从开始日期算起,分隔 10 天一个分区
8. 如果配置了 sEndDate 则代表数据达到了这个日期的分片后后循环从开始分片插入。
9. Assert.assertEquals(true, 0 == partition.calculate(“2014-01-01”));
10. Assert.assertEquals(true, 0 == partition.calculate(“2014-01-10”));
11. Assert.assertEquals(true, 1 == partition.calculate(“2014-01-11”));
12. Assert.assertEquals(true, 12 == partition.calculate(“2014-05-01”));
13. 复制代码

6.取模范围约束

此种规则是取模运算与范围约束的结合,主要为了后续数据迁移做准备,即可以自主决定取模后数据的节点 分布。

1. <tableRule name="sharding-by-pattern">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>sharding-by-pattern</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-pattern" class="io.mycat.route.function.PartitionByPattern"
8. <property name="patternValue">256</property>
9. <property name="defaultNode">2</property>
10. <property name="mapFile">partition-pattern.txt</property>
11. </function>
12. 复制代码

partition-pattern.txt

1. partition-pattern.txt
2. # id partition range start-end ,data node index
3. ###### first host configuration
4. 1-32=0
5. 33-64=1
6. 65-96=2
7. 97-128=3
8. ######## second host configuration
9. 129-160=4
10. 161-192=5
11. 193-224=6
12. 225-256=7
13. 0-0=7
14. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,patternValue 即求模基数,defaoultNode
3. 默认节点,如果配置了默认,则不会按照求模运算
4. mapFile 配置文件路径
5. 配置文件中,1-32 即代表 id%256 后分布的范围,如果在 1-32 则在分区 1,其他类推,如果 id 非数据,则
6. 会分配在 defaoultNode 默认节点
7. String idVal = “0”;
8. Assert.assertEquals(true, 7 == autoPartition.calculate(idVal));
9. idVal = “45a”;
10. Assert.assertEquals(true, 2 == autoPartition.calculate(idVal));
11. 复制代码

7.截取数字做 hash 求模范围约束

此种规则类似于取模范围约束,此规则支持数据符号字母取模。

1. <tableRule name="sharding-by-prefixpattern">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>sharding-by-prefixpattern</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-pattern"
8. class="io.mycat.route.function.PartitionByPrefixPattern">
9. <property name="patternValue">256</property>
10. <property name="prefixLength">5</property>
11. <property name="mapFile">partition-pattern.txt</property>
12. </function>
13. 复制代码

partition-pattern.txt

1. partition-pattern.txt
2. # range start-end ,data node index
3. # ASCII
4. # 8-57=0-9 阿拉伯数字
5. # 64、65-90=@、A-Z
6. # 97-122=a-z
7. ###### first host configuration
8. 1-4=0
9. 5-8=1
10. 9-12=2
11. 13-16=3
12. ###### second host configuration
13. 17-20=4
14. 21-24=5
15. 25-28=6
16. 29-32=7
17. 0-0=7
18. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,patternValue 即求模基数,prefixLength
3. ASCII 截取的位数
4. mapFile 配置文件路径
5. 配置文件中,1-32 即代表 id%256 后分布的范围,如果在 1-32 则在分区 1,其他类推
6. 此种方式类似方式 6 只不过采取的是将列种获取前 prefixLength 位列所有 ASCII 码的和进行求模
7. sum%patternValue ,获取的值,在范围内的分片数,
8. String idVal=“gf89f9a”;
9. Assert.assertEquals(true, 0==autoPartition.calculate(idVal));
10. idVal=“8df99a”;
11. Assert.assertEquals(true, 4==autoPartition.calculate(idVal));
12. idVal=“8dhdf99a”;
13. Assert.assertEquals(true, 3==autoPartition.calculate(idVal));
14. 复制代码

8.应用指定

此规则是在运行阶段有应用自主决定路由到那个分片。

1. <tableRule name="sharding-by-substring">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>sharding-by-substring</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-substring"
8. class="io.mycat.route.function.PartitionDirectBySubString">
9. <property name="startIndex">0</property><!-- zero-based -->
10. <property name="size">2</property>
11. <property name="partitionCount">8</property>
12. <property name="defaultPartition">0</property>
13. </function>
14. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数
3. 此方法为直接根据字符子串(必须是数字)计算分区号(由应用传递参数,显式指定分区号)。
4. 例如 id=05-100000002
5. 在此配置中代表根据 id 中从 startIndex=0,开始,截取 siz=2 位数字即 05,05 就是获取的分区,如果没传
6. 默认分配到 defaultPartition
7. 复制代码

9.截取数字 hash 解析

此规则是截取字符串中的 int 数值 hash 分片。

1. <tableRule name="sharding-by-stringhash">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>sharding-by-stringhash</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-stringhash"
8. class="io.mycat.route.function.PartitionByString">
9. <property name="partitionLength">512</property><!-- zero-based -->
10. <property name="partitionCount">2</property>
11. <property name="hashSlice">0:2</property>
12. </function>
13. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数
3. 函数中 partitionLength 代表字符串 hash 求模基数,
4. partitionCount 分区数,
5. hashSlice hash 预算位,即根据子字符串中 int 值 hash 运算
6. hashSlice : 0 means str.length(), -1 means str.length()-1
7. /**
8. * “2” -> (0,2)
9. * “1:2” -> (1,2)
10. * “1:” -> (1,0)
11. * “-1:” -> (-1,0)
12. * “:-1” -> (0,-1)
13. * “:” -> (0,0)
14. */
15. 复制代码
1. 例子:
2. String idVal=null;
3. rule.setPartitionLength("512");
4. rule.setPartitionCount("2");
5. rule.init();
6. rule.setHashSlice("0:2");
7. // idVal = "0";
8. // Assert.assertEquals(true, 0 == rule.calculate(idVal));
9. // idVal = "45a";
10. // Assert.assertEquals(true, 1 == rule.calculate(idVal));
11. //last 4
12. rule = new PartitionByString();
13. rule.setPartitionLength("512");
14. rule.setPartitionCount("2");
15. rule.init();
16. //last 4 characters
17. rule.setHashSlice("-4:0");
18. idVal = "aaaabbb0000";
19. Assert.assertEquals(true, 0 == rule.calculate(idVal));
20. idVal = "aaaabbb2359";
21. Assert.assertEquals(true, 0 == rule.calculate(idVal));
22. 复制代码

10.一致性 hash

一致性hash有效解决了分布式数据的扩容问题。

1. <tableRule name="sharding-by-murmur">
2. <rule>
3. <columns>user_id</columns>
4. <algorithm>murmur</algorithm>
5. </rule>
6. </tableRule>
7. <function name="murmur" class="io.mycat.route.function.PartitionByMurmurHash">
8. <property name="seed">0</property><!-- 默认是 0-->
9. <property name="count">2</property><!-- 要分片的数据库节点数量,必须指定,否则没法分片-->
10. <property name="virtualBucketTimes">160</property><!-- 一个实际的数据库节点被映射为这么多虚拟节点,默认是 160 倍,也就是虚拟节点数是物理节点数的 160 倍-->
11. <!--
12. <property name="weightMapFile">weightMapFile</property>
13. 节点的权重,没有指定权重的节点默认是 1。以 properties 文件的格式填写,以从 0 开始到 count-1 的整数值也就
14. 是节点索引为 key,以节点权重值为值。所有权重值必须是正整数,否则以 1 代替 -->
15. <!--
16. <property name="bucketMapPath">/etc/mycat/bucketMapPath</property>
17. 用于测试时观察各物理节点与虚拟节点的分布情况,如果指定了这个属性,会把虚拟节点的 murmur hash 值与物理节
18. 点的映射按行输出到这个文件,没有默认值,如果不指定,就不会输出任何东西 -->
19. </function>
20. 复制代码

11.按单月小时拆分

此规则是单月内按照小时拆分,最小粒度是小时,可以一天最多 24 个分片,最少 1 个分片,一个月完后下月 从头开始循环。 每个月月尾,需要手工清理数据。

1. <tableRule name="sharding-by-hour">
2. <rule>
3. <columns>create_time</columns>
4. <algorithm>sharding-by-hour</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-hour" class="io.mycat.route.function.LatestMonthPartion">
8. <property name="splitOneDay">24</property>
9. </function>
10. 复制代码

配置说明: columns: 拆分字段,字符串类型(yyyymmddHH) splitOneDay : 一天切分的分片数

1. LatestMonthPartion partion = new LatestMonthPartion();
2. partion.setSplitOneDay(24);
3. Integer val = partion.calculate("2015020100");
4. assertTrue(val == 0);
5. val = partion.calculate("2015020216");
6. assertTrue(val == 40);
7. val = partion.calculate("2015022823");
8. assertTrue(val == 27 * 24 + 23);
9. Integer[] span = partion.calculateRange("2015020100", "2015022823");
10. assertTrue(span.length == 27 * 24 + 23 + 1);
11. assertTrue(span[0] == 0 && span[span.length - 1] == 27 * 24 + 23);
12. span = partion.calculateRange("2015020100", "2015020123");
13. assertTrue(span.length == 24);
14. assertTrue(span[0] == 0 && span[span.length - 1] == 23);
15. 复制代码

12.范围求模分片

先进行范围分片计算出分片组,组内再求模 优点可以避免扩容时的数据迁移,又可以一定程度上避免范围分片的热点问题  综合了范围分片和求模分片的优点,分片组内使用求模可以保证组内数据比较均匀,分片组之间是范围分片可以 兼顾范围查询。  最好事先规划好分片的数量,数据扩容时按分片组扩容,则原有分片组的数据不需要迁移。由于分片组内数据比 较均匀,所以分片组内可以避免热点数据问题。

1. <tableRule name="auto-sharding-rang-mod">
2. <rule>
3. <columns>id</columns>
4. <algorithm>rang-mod</algorithm>
5. </rule>
6. </tableRule>
7. <function name="rang-mod"
8. class="io.mycat.route.function.PartitionByRangeMod">
9. <property name="mapFile">partition-range-mod.txt</property>
10. <property name="defaultNode">21</property>
11. </function>
12. 复制代码
1. 配置说明:
2. 上面 columns 标识将要分片的表字段,algorithm 分片函数,
3. rang-mod 函数中 mapFile 代表配置文件路径
4. defaultNode 超过范围后的默认节点顺序号,节点从 0 开始。
5. partition-range-mod.txt
6. range start-end ,data node group size
7. 以下配置一个范围代表一个分片组,=号后面的数字代表该分片组所拥有的分片的数量。
8. 0-200M=5 //代表有 5 个分片节点
9. 200M1-400M=1
10. 400M1-600M=4
11. 600M1-800M=4
12. 800M1-1000M=6
13. 复制代码

13.日期范围 hash 分片

思想与范围求模一致,当由于日期在取模会有数据集中问题,所以改成 hash 方法。 先根据日期分组,再根据时间 hash  使得短期内数据分布的更均匀 优点可以避免扩容时的数据迁移,又可以一定程度上避免范围分片的热点问题  要求日期格式尽量精确些,不然达不到局部均匀的目的

1. <tableRule name="rangeDateHash">
2. <rule>
3. <columns>col_date</columns>
4. <algorithm>range-date-hash</algorithm>
5. </rule>
6. </tableRule>
7. <function name="range-date-hash"
8. class="io.mycat.route.function.PartitionByRangeDateHash">
9. <property name="sBeginDate">2014-01-01 00:00:00</property>
10. <property name="sPartionDay">3</property>
11. <property name="dateFormat">yyyy-MM-dd HH:mm:ss</property>
12. <property name="groupPartionSize">6</property>
13. </function>
14. 复制代码

sPartionDay 代表多少天分一个分片 groupPartionSize 代表分片组的大小

14.冷热数据分片

根据日期查询日志数据 冷热数据分布 ,最近 n 个月的到实时交易库查询,超过 n 个月的按照 m 天分片。

1. <tableRule name="sharding-by-date">
2. <rule>
3. <columns>create_time</columns>
4. <algorithm>sharding-by-hotdate</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-hotdate" class="io.mycat.route.function.PartitionByHotDate">
8. <property name="dateFormat">yyyy-MM-dd</property>
9. <property name="sLastDay">10</property>
10. <property name="sPartionDay">30</property>
11. </function>
12. 复制代码

15.自然月分片

按月份列分区 ,每个自然月一个分片,格式 between 操作解析的范例。

1. <tableRule name="sharding-by-month">
2. <rule>
3. <columns>create_time</columns>
4. <algorithm>sharding-by-month</algorithm>
5. </rule>
6. </tableRule>
7. <function name="sharding-by-month" class="io.mycat.route.function.PartitionByMonth">
8. <property name="dateFormat">yyyy-MM-dd</property>
9. <property name="sBeginDate">2014-01-01</property>
10. </function>
11. 复制代码

配置说明:

  • columns: 分片字段,字符串类型
  • dateFormat : 日期字符串格式
  • sBeginDate : 开始日期
1. PartitionByMonth partition = new PartitionByMonth();
2. partition.setDateFormat("yyyy-MM-dd");
3. partition.setsBeginDate("2014-01-01");
4. partition.init();
5. Assert.assertEquals(true, 0 == partition.calculate("2014-01-01"));
6. Assert.assertEquals(true, 0 == partition.calculate("2014-01-10"));
7. Assert.assertEquals(true, 0 == partition.calculate("2014-01-31"));
8. Assert.assertEquals(true, 1 == partition.calculate("2014-02-01"));
9. Assert.assertEquals(true, 1 == partition.calculate("2014-02-28"));
10. Assert.assertEquals(true, 2 == partition.calculate("2014-03-1"));
11. Assert.assertEquals(true, 11 == partition.calculate("2014-12-31"));
12. Assert.assertEquals(true, 12 == partition.calculate("2015-01-31"));
13. Assert.assertEquals(true, 23 == partition.calculate("2015-12-31"));
14. 复制代码

16.有状态分片算法

有状态分片算法与之前的分片算法不同,它是为数据自动迁移而设计的. 直至 2018 年 7 月 24 日为止,现支持有状态算法的分片策略只有 crc32slot 欢迎大家提供更多有状态分片算法.

一个有状态分片算法在使用过程中暂时存在两个操作

一种是初始化,使用 mycat 创建配置带有有状态分片算法的 table 时(推介)或者第一次配置有状态分片算法的 table 并启动  mycat 时,有状态分片算法会根据表的 dataNode 的数量划分分片范围并生成 ruledata 下的文件,  这个分片范围规则就是’状态’,一个表对应一个状态,对应一个有状态分片算法实例,以及对应一个满足以下命 名规则的文件:

算法名字_schema 名字_table 名字.properties 文件里内容一般具有以下特征:

1. 8=91016-102399
2. 7=79639-91015
3. 6=68262-79638
4. 5=56885-68261
5. 4=45508-56884
6. 3=34131-45507
7. 2=22754-34130
8. 1=11377-22753
9. 0=0-11376
10. 复制代码

行数就是 table 的分片节点数量,每行的’数字-数字’就是分片算法生成的范围,这个范围与具体算法实现有关,  一个分片节点可能存在多个范围,这些范围以逗号,分隔.一般来说,不要手动更改这个文件,应该使用算法生成范围,  而且需要注意的是,物理库上的数据的分片字段的值一定要落在对应范围里. 一种是添加操作,即数据扩容,具体参考第六章的 6.8 与 6.9  添加节点,有状态分片算法根据节点的变化,重新分配范围规则,之后执行数据自动迁移任务.

17.crc32slot 分片算法

crc32solt 是有状态分片算法的实现之一,具体参考第六章 数据自动迁移方案设计 crc32(key)%102400=slot

slot 按照范围均匀分布在 dataNode 上,针对每张表进行实例化,通过一个文件记录 slot 和节点 映射关系,迁移过程中通过  zk 协调 其中需要在分片表中增加 slot 字段,用以避免迁移时重新计算,只需要迁移对应 slot 数据即可 分片最大个数为 102400  个,短期内应该够用,每分片一千万,总共可以支持一万亿数据 配置说明:

1. <table name="travelrecord" dataNode="dn1,dn2" rule="crc32slot" />
2. 复制代码

18.使用 mycat 配置完表后使用 mycat 创建表

1. USE TESTDB;
2. CREATE TABLE `travelrecord`
3. ( id xxxx
4. xxxxxxx
5. ) ENGINE=INNODB DEFAULT CHARSET=utf8;


相关文章
|
1月前
|
SQL 关系型数据库 MySQL
Mycat【Mycat高级特性_搭建双主双从、Mycat分片技术_垂直拆分-分库 】(四)-全面详解(学习总结---从入门到深化)
Mycat【Mycat高级特性_搭建双主双从、Mycat分片技术_垂直拆分-分库 】(四)-全面详解(学习总结---从入门到深化)
47 0
|
8月前
|
存储 SQL 缓存
27MyCat - 分片规则
27MyCat - 分片规则
29 0
|
1月前
|
运维 负载均衡 关系型数据库
Mycat【Mycat分片规则(按日期(天)分片、全局序列)、Mycat高可用(Mycat高可用概述)】(七)-全面详解(学习总结---从入门到深化)
Mycat【Mycat分片规则(按日期(天)分片、全局序列)、Mycat高可用(Mycat高可用概述)】(七)-全面详解(学习总结---从入门到深化)
48 0
|
7月前
|
算法 数据库 索引
数据库系列课程(05)-MyCat分库分表策略
数据库系列课程(05)-MyCat分库分表策略
47 0
|
8月前
34MyCat - 分片规则(应用指定)
34MyCat - 分片规则(应用指定)
25 0
|
8月前
38MyCat - 分片规则(自然月分片)
38MyCat - 分片规则(自然月分片)
28 0
|
8月前
36MyCat - 分片规则(一致性hash)
36MyCat - 分片规则(一致性hash)
35 0
|
8月前
35MyCat - 分片规则(字符串hash解析)
35MyCat - 分片规则(字符串hash解析)
53 0
|
存储 关系型数据库 MySQL
MyCat - 分片 - 分片规则 - 准备工作 | 学习笔记
快速学习 MyCat - 分片 - 分片规则 - 准备工作
84 0
MyCat - 分片 - 分片规则 - 准备工作 | 学习笔记
|
存储 算法 中间件
MyCat - 分片 - 分片规则 - 应用指定算法 | 学习笔记
快速学习 MyCat - 分片 - 分片规则 - 应用指定算法
133 0
MyCat - 分片 - 分片规则 - 应用指定算法 | 学习笔记