Apache ShardingSphere v5.5.0 document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8 Features 19 8.1 Sharding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8.1.1 . . . . . . . . . . . . . . . . . . 19 Vertical Sharding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Horizontal Sharding . . . . . . . . . . . . . . . . . . . . . . . . 23 Data Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Sharding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.1.7 Limitations0 码力 | 602 页 | 3.85 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0被啮合层所治理的对象。 1.1. 简介 3 Apache ShardingSphere document, v5.0.0 Shard ingSphere-JDBC Shardi ngSphere-Proxy Sharding Sphere-Sidecar 数据库 任意 M ySQL/PostgreSQL M ySQL/PostgreSQL 连接消耗数 高 低 高 异构语言 仅 Java 任意 任意 性能 损耗低 全局规则配置,可包括访问 ShardingSphere‐Proxy 用户名和密码的权限配置。 - !AUTHORITY users: - root@%:root - sharding@127.0.0.1:sharding provider: type: ALL_PRIVILEGES_PERMITTED 4.5. 分布式治理 46 Apache ShardingSphere document maxLifetimeMilliseconds: 1800000 /metadata/${schemeName}/rules 规则配置,可包括数据分片、读写分离、数据加密、影子库压测等配置。 - !SHARDING xxx - !READWRITE_SPLITTING xxx - !ENCRYPT xxx 4.5. 分布式治理 47 Apache ShardingSphere document0 码力 | 385 页 | 4.26 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.2被啮合层所治理的对象。 1.1. 简介 3 Apache ShardingSphere document, v5.1.2 Shard ingSphere-JDBC Shardi ngSphere-Proxy Sharding Sphere-Sidecar 数据库 任意 M ySQL/PostgreSQL M ySQL/PostgreSQL 连接消耗数 高 低 高 异构语言 仅 Java 任意 任意 性能 损耗低 serverTimezone=UTC& useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: rules: sharding: tables: ... 2.2 ShardingSphere-Proxy 2.2.1 获取 ShardingSphere-Proxy 目前 ShardingSphere‐Proxy 码:https://github.com/apache/shardingsphere/tree/master/shardingsphere‐ features/shardingsphere‐sharding 4.3.4 核心概念 导览 本小节主要介绍数据分片的核心概念。 表 表是透明化数据分片的关键概念。Apache ShardingSphere 通过提供多样化的表类型,适配不同场景下0 码力 | 446 页 | 4.67 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.0被啮合层所治理的对象。 1.1. 简介 3 Apache ShardingSphere document, v5.1.0 Shard ingSphere-JDBC Shardi ngSphere-Proxy Sharding Sphere-Sidecar 数据库 任意 M ySQL/PostgreSQL M ySQL/PostgreSQL 连接消耗数 高 低 高 异构语言 仅 Java 任意 任意 性能 损耗低 shardingsphere.sharding.api.config.ShardingRuleConfiguration 可配置属性: 5.1. ShardingSphere-JDBC 68 Apache ShardingSphere document, v5.1.0 分片表配置 类名称:org.apache.shardingsphere.sharding.api.config.Shar (?) KeyG enerato rConfig uration 自增列生成器 使用默认自增主键生成 器 自动分片表配置 类名称:org.apache.shardingsphere.sharding.api.config.ShardingAutoTableRuleConfiguration 可配置属性: 名称 数据类型 说明 默认值 logicTable String 分片逻辑表名称0 码力 | 406 页 | 4.40 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.1被啮合层所治理的对象。 1.1. 简介 3 Apache ShardingSphere document, v5.1.1 Shard ingSphere-JDBC Shardi ngSphere-Proxy Sharding Sphere-Sidecar 数据库 任意 M ySQL/PostgreSQL M ySQL/PostgreSQL 连接消耗数 高 低 高 异构语言 仅 Java 任意 任意 性能 损耗低 shardingsphere.sharding.api.config.ShardingRuleConfiguration 可配置属性: 5.1. ShardingSphere-JDBC 69 Apache ShardingSphere document, v5.1.1 分片表配置 类名称:org.apache.shardingsphere.sharding.api.config.Shar (?) KeyG enerato rConfig uration 自增列生成器 使用默认自增主键生成 器 自动分片表配置 类名称:org.apache.shardingsphere.sharding.api.config.ShardingAutoTableRuleConfiguration 可配置属性: 名称 数据类型 说明 默认值 logicTable String 分片逻辑表名称0 码力 | 409 页 | 4.47 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0-alpha1. 简介 2 Apache ShardingSphere document, v5.0.0-beta Shard ingSphere-JDBC Shardi ngSphere-Proxy Sharding Sphere-Sidecar 数据库 任意 M ySQL/PostgreSQL M ySQL/PostgreSQL 连接消耗数 高 低 高 异构语言 仅 Java 任意 任意 性能 损耗低 对抽象语法树遍历构造域模型,通过域模型(SQLStatement)去提炼分片所需的 上下文,并标记有可能需要改写的位置。供分片使用的解析上下文包含查询选择项(Select Items)、表信 息(Table)、分片条件(Sharding Condition)、自增主键信息(Auto increment Primary Key)、排序信 息(Order By)、分组信息(Group By)以及分页信息(Limit、Rownum、Top)。SQL HAVING、UNION (ALL) 部分支持子查询 * 子查询和外层查询同时指定分片键时,分片键的值必须保持一致 除了分页子查询的支持之外 (详情请参考分页),也支持同等模式的子查询。无论嵌套多少层,Sharding‐ Sphere 都可以解析至第一个包含数据表的子查询,一旦在下层嵌套中再次找到包含数据表的子查询将直 接抛出解析异常。 例如,以下子查询可以支持: SELECT COUNT(*) FROM0 码力 | 301 页 | 3.44 MB | 1 年前3
Apache ShardingSphere 中文文档 5.2.0serverTimezone=UTC& useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: rules: sharding: tables: ... 2.1. ShardingSphere-JDBC 11 Apache ShardingSphere document, v5.2.0 2.2 ShardingSphere-Proxy 小时不间断的数据库服务,是 Apache ShardingSphere 高可用模块的主要设计目标。 3.4.4 应用场景 在大多数情况下,高可用搭配读写分离功能一起使用。当用户写库或读库关系发生变化时,Sharding‐ Sphere 可动态的感知并纠正内部的主从关系,进而保证读流量和写流量的正确路由。同时当从库宕机时, ShardingSphere 也可动态纠正存储节点的状态,保证读流量分发正确。 3 系,ShardingSphere 会根据 YAML 配置,自动完成 ShardingSphereDataSource 对象的创建,减少用户 不必要的编码工作。 参数解释 rules: - !SHARDING tables: # 数据分片规则配置(+): # 逻辑表名称 actualDataNodes (?): # 由数据源名 + 表名组成(参考 Inline 0 码力 | 449 页 | 5.85 MB | 1 年前3
Apache ShardingSphere 中文文档 5.4.1Name}/data_sources/nodes/ds_0/versions/0 . . . . . . . . . 459 /metadata/${databaseName}/rules/sharding/tables/t_order/versions/0 . . . . . . 460 /metadata/databaseName/schemas/{schemaName}/tables/t_order/versions/0 算将会只使用主表的策略,那么 t_order_item 表的分片计算将会使用 t_order 的条件。 注意:绑定表中的多个分片规则,需要按照逻辑表前缀组合分片后缀的方式进行配置,例如: rules: - !SHARDING tables: t_order: actualDataNodes: ds_${0..1}.t_order_${0..1} t_order_item: actualDataNodes: MySQL,连接池为 HikariCP,可以更换为其他数据库驱动和连接池。当使 用 ShardingSphere‐JDBC 时,JDBC 池的属性名取决于各自 JDBC 池自己的定义,并不由 Sharding‐ Sphere 定义,相关的处理可以参考类 org.apache.shardingsphere.infra.datasource.pool. creator.DataSourcePoolCreator。例如对于0 码力 | 530 页 | 4.49 MB | 1 年前3
Apache ShardingSphere 中文文档 5.3.2}/data_sources/nodes/ds_0/versions/0 . . . . . . . . . 438 ix /metadata/${databaseName}/rules/sharding/tables/t_order/versions/0 . . . . . . 439 /metadata/databaseName/schemas/{schemaName}/tables/t_order/versions/0 算将会只使用主表的策略,那么 t_order_item 表的分片计算将会使用 t_order 的条件。 注意:绑定表中的多个分片规则,需要按照逻辑表前缀组合分片后缀的方式进行配置,例如: rules: - !SHARDING tables: t_order: actualDataNodes: ds_${0..1}.t_order_${0..1} t_order_item: actualDataNodes: 系,ShardingSphere 会根据 YAML 配置,自动完成 ShardingSphereDataSource 对象的创建,减少用户 不必要的编码工作。 参数解释 rules: - !SHARDING tables: # 数据分片规则配置(+): # 逻辑表名称 actualDataNodes (?): # 由数据源名 + 表名组成(参考 Inline 0 码力 | 508 页 | 4.44 MB | 1 年前3
Apache ShardingSphere v5.5.0 中文文档Name}/data_sources/nodes/ds_0/versions/0 . . . . . . . . . 485 /metadata/${databaseName}/rules/sharding/tables/t_order/versions/0 . . . . . . 486 /metadata/databaseName/schemas/{schemaName}/tables/t_order/versions/0 算将会只使用主表的策略,那么 t_order_item 表的分片计算将会使用 t_order 的条件。 注意:绑定表中的多个分片规则,需要按照逻辑表前缀组合分片后缀的方式进行配置,例如: rules: - !SHARDING tables: t_order: actualDataNodes: ds_${0..1}.t_order_${0..1} t_order_item: 8.1. 数据分片 22 Apache MySQL,连接池为 HikariCP,可以更换为其他数据库驱动和连接池。当使 用 ShardingSphere‐JDBC 时,JDBC 池的属性名取决于各自 JDBC 池自己的定义,并不由 Sharding‐ Sphere 定义,相关的处理可以参考类 org.apache.shardingsphere.infra.datasource.pool. creator.DataSourcePoolCreator。例如对于0 码力 | 557 页 | 4.61 MB | 1 年前3
共 85 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













