Apache ShardingSphere Shadow DB 及在 CyborgFlow 中的应用 - 侯阳
侯阳 2022年1月15日 01 SphereEx 中间件研发工程师 Apache ShardingSphere Contributor 目前专注于 Shadow DB 及全链路压测相关的设计和研发 Apache ShardingSphere 发展和现状 Apache ShardingSphere 架构设计 Apache ShardingSphere Roadmap 1.x (2016) Apache ShardingSphere Overview Shadow DB 应用场景 Shadow DB 架构设计 全链路压测:流量规划,比如双 11,618 等 灰度发布:指定测试用户的体验版本发布 服务预热:预热数据隔离 对比测试:基于版本的对比测试 Shadow DB Scenes 4.1.1 Shadow DB API rules: - !SHADOW column: shadowMappings: ds: shadow_ds Shadow DB 重构的原因 5.0.0 Shadow DB API rules: - !SHADOW enable: true dataSources:: sourceDataSourceName: ds shadowDataSourceName: shadow_ds 0 码力 | 22 页 | 3.83 MB | 1 年前3Apache ShardingSphere 5.1.2 Document
Ecosystem Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4 Features 18 4.1 DB Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1 SQL92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.5 DB Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.6 Feature Unsupported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.9 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.9.1 Background0 码力 | 503 页 | 3.66 MB | 1 年前3Apache ShardingSphere 5.2.0 Document
40 Not supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.5 DB Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.5 Implementation classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.13 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.13.1 ShadowAlgorithm transfor‐ mation costs. Shadow Database In the full‐link stress testing scenario, ShardingSphere shadow DB is used for providing data isolation support for complex testing work. The obtained testing result0 码力 | 483 页 | 4.27 MB | 1 年前3Apache ShardingSphere 5.4.1 Document
3.7 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 8.4 DB Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 8.4 Implementation classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 10.8 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 10.8.1 ShadowAlgorithm mode, use this parameter to connect ShardingSphere-JDBC and ShardingSphere-Proxy. # Default:logic_db databaseName (?): mode: dataSources: rules: - !FOO_XXX ... - !BAR_XXX ... props: key_1: value_10 码力 | 572 页 | 3.73 MB | 1 年前3Apache ShardingSphere 5.2.1 Document
39 Not supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.5 DB Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.5 Implementation classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 5.13 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 5.13.1 ShadowAlgorithm data source. For example: db0 ├── t_order0 └── t_order1 db1 ├── t_order0 └── t_order1 The configuration of data nodes: db0.t_order0, db0.t_order1, db1.t_order0, db1.t_order1 Customized Distribution0 码力 | 523 页 | 4.51 MB | 1 年前3Apache ShardingSphere v5.5.0 document
3.7 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 8.4 DB Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 8.4 Implementation classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 10.8 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 10.8.1 ShadowAlgorithm mode, use this parameter to connect ShardingSphere-JDBC and ShardingSphere-Proxy. # Default:logic_db databaseName (?): mode: dataSources: rules: - !FOO_XXX ... - !BAR_XXX ... props: key_1: value_10 码力 | 602 页 | 3.85 MB | 1 年前3Apache ShardingSphere 5.1.1 Document
Ecosystem Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4 Features 18 4.1 DB Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1 SQL92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.5 DB Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.6 Feature Unsupported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.9 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.9.1 Background0 码力 | 458 页 | 3.43 MB | 1 年前3Apache ShardingSphere 5.0.0 Document
Ecosystem Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4 Features 18 4.1 DB Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1 SQL92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.1.5 DB Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 Sharding Unsupported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.8 Shadow DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.8.1 Background0 码力 | 403 页 | 3.15 MB | 1 年前3Apache ShardingSphere 中文文档 5.4.1
YAML 配置文件 # JDBC 逻辑库名称。在集群模式中,使用该参数来联通 ShardingSphere-JDBC 与 ShardingSphere- Proxy。 # 默认值:logic_db databaseName (?): mode: dataSources: rules: - !FOO_XXX ... - !BAR_XXX ... props: key_1: value_1 指数据表在每个数据源内呈现均匀分布的态势,例如: db0 ├── t_order0 └── t_order1 db1 ├── t_order0 └── t_order1 数据节点的配置如下: db0.t_order0, db0.t_order1, db1.t_order0, db1.t_order1 自定义分布 指数据表呈现有特定规则的分布,例如: db0 ├── t_order0 └── └── t_order1 db1 ├── t_order2 8.1. 数据分片 23 Apache ShardingSphere document ├── t_order3 └── t_order4 数据节点的配置如下: db0.t_order0, db0.t_order1, db1.t_order2, db1.t_order3, db1.t_order4 分片 分片键 用于将数0 码力 | 530 页 | 4.49 MB | 1 年前3Apache ShardingSphere v5.5.0 中文文档
YAML 配置文件 # JDBC 逻辑库名称。在集群模式中,使用该参数来联通 ShardingSphere-JDBC 与 ShardingSphere- Proxy。 # 默认值:logic_db databaseName (?): mode: dataSources: rules: - !FOO_XXX ... - !BAR_XXX ... props: key_1: value_1 分为均匀分布和自定义分布两种形式。 均匀分布 指数据表在每个数据源内呈现均匀分布的态势,例如: db0 ├── t_order0 └── t_order1 db1 ├── t_order0 └── t_order1 数据节点的配置如下: db0.t_order0, db0.t_order1, db1.t_order0, db1.t_order1 8.1. 数据分片 23 Apache ShardingSphere 自定义分布 指数据表呈现有特定规则的分布,例如: db0 ├── t_order0 └── t_order1 db1 ├── t_order2 ├── t_order3 └── t_order4 数据节点的配置如下: db0.t_order0, db0.t_order1, db1.t_order2, db1.t_order3, db1.t_order4 分片 分片键 用于将数0 码力 | 557 页 | 4.61 MB | 1 年前3
共 29 条
- 1
- 2
- 3