 Apache ShardingSphere v5.5.0 documentAppendix with SQL operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.3 Readwrite‐splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.3.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Readwrite‐splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Transaction . . . . . /w ri te S pl it ti ng Read/write splitting can be used to cope with business access with high stress. Sharding‐ Sphere provides flexible read/write splitting capabilities and can achieve read access0 码力 | 602 页 | 3.85 MB | 1 年前3 Apache ShardingSphere v5.5.0 documentAppendix with SQL operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.3 Readwrite‐splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.3.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Readwrite‐splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Transaction . . . . . /w ri te S pl it ti ng Read/write splitting can be used to cope with business access with high stress. Sharding‐ Sphere provides flexible read/write splitting capabilities and can achieve read access0 码力 | 602 页 | 3.85 MB | 1 年前3
 Apache ShardingSphere v5.5.0 中文文档9.1. ShardingSphere-JDBC 62 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSourceGroups: Apache ShardingSphere v5.5.0 中文文档9.1. ShardingSphere-JDBC 62 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSourceGroups:- (+): # 读写分离逻辑数据源名称,默认使用 Groovy 的行表达式 SPI 实现来 解析 write_data_source_name: 算法类型的详情,请参见内置负载均衡算法列表。 操作步骤 1. 添加读写分离数据源 2. 设置负载均衡算法 3. 使用读写分离数据源 配置示例 rules: - !READWRITE_SPLITTING dataSourceGroups: readwrite_ds: writeDataSourceName: write_ds readDataSourceNames: - read_ds_0 classpath 中添加 jta.properties 来定制化 Atomikos 配置项。 详情请参见 Atomikos 官方文档 。 数据恢复 在项目的 logs 目录中会生成 xa_tx.log, 这是 XA 崩溃恢复时所需的日志,请勿删除。 Narayana 事务 背景信息 Apache ShardingSphere 提供 XA 事务,集成了 Narayana 的实现。 前提条件 0 码力 | 557 页 | 4.61 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.2.0ShardingSphere-JDBC 57 Apache ShardingSphere document, v5.2.0 参数解释 静态读写分离 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.2.0ShardingSphere-JDBC 57 Apache ShardingSphere document, v5.2.0 参数解释 静态读写分离 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称 static-strategy: # 读写分离类型 write-data-source-name: - (+): # 负载均衡算法名称 type: # 负载均衡算法类型 props: # 负载均衡算法属性配置 # ... 动态读写分离 rules: - !READWRITE_SPLITTING dataSources: - (+): # 读写分离逻辑数据源名称 dynamic-strategy: # 读写分离类型 auto-aware-data-source-name: ShardingSphere document, v5.2.0 操作步骤 1. 添加读写分离数据源 2. 设置负载均衡算法 3. 使用读写分离数据源 配置示例 rules: - !READWRITE_SPLITTING dataSources: readwrite_ds: staticStrategy: writeDataSourceName: write_ds readDataSourceNames: 0 码力 | 449 页 | 5.85 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.4.19.1. ShardingSphere-JDBC 61 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.4.19.1. ShardingSphere-JDBC 61 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称,默认使用 Groovy 的行表达式 SPI 实现来 解析 write_data_source_name: 算法类型的详情,请参见内置负载均衡算法列表。 操作步骤 1. 添加读写分离数据源 2. 设置负载均衡算法 3. 使用读写分离数据源 配置示例 rules: - !READWRITE_SPLITTING dataSources: readwrite_ds: writeDataSourceName: write_ds readDataSourceNames: - read_ds_0 classpath 中添加 jta.properties 来定制化 Atomikos 配置项。 详情请参见 Atomikos 官方文档 。 数据恢复 在项目的 logs 目录中会生成 xa_tx.log, 这是 XA 崩溃恢复时所需的日志,请勿删除。 Narayana 事务 背景信息 Apache ShardingSphere 提供 XA 事务,集成了 Narayana 的实现。 前提条件 0 码力 | 530 页 | 4.49 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.3.29.1. ShardingSphere-JDBC 61 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.3.29.1. ShardingSphere-JDBC 61 Apache ShardingSphere document 参数解释 读写分离 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称 write_data_source_name: # 写库数据源名称 read_data_source_names: 算法类型的详情,请参见内置负载均衡算法列表。 操作步骤 1. 添加读写分离数据源 2. 设置负载均衡算法 3. 使用读写分离数据源 配置示例 rules: - !READWRITE_SPLITTING dataSources: readwrite_ds: writeDataSourceName: write_ds readDataSourceNames: - read_ds_0 classpath 中添加 jta.properties 来定制化 Atomikos 配置项。 详情请参见 Atomikos 官方文档 。 数据恢复 在项目的 logs 目录中会生成 xa_tx.log, 这是 XA 崩溃恢复时所需的日志,请勿删除。 Narayana 事务 背景信息 Apache ShardingSphere 提供 XA 事务,集成了 Narayana 的实现。 前提条件 0 码力 | 508 页 | 4.44 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.0.0/metadata/${schemeName}/rules 规则配置,可包括数据分片、读写分离、数据加密、影子库压测等配置。 - !SHARDING xxx - !READWRITE_SPLITTING xxx - !ENCRYPT xxx 4.5. 分布式治理 47 Apache ShardingSphere document, v5.0.0 /metadata/${schemeName}/schema 背景 ShardingSphere‐Agent 是独立自主设计,基于 Bytebuddy 字节码增加的项目,基于插件化的设计,可 以无缝隙的与 ShardingSphere 集成, 目前有提供 Log, metrics, APM 等可观测性功能。 使用方法 本地构建 > cd shardingsphere/shardingsphere-agent > mvn clean install SERVICE_NAME: "shardingsphere-agent" JAEGER_SAMPLER_TYPE: "const" JAEGER_SAMPLER_PARAM: "1" JAEGER_REPORTER_LOG_SPANS: "true" JAEGER_REPORTER_FLUSH_INTERVAL: "1" Zipkin: host: "localhost" #zipkin 服务的 host port:0 码力 | 385 页 | 4.26 MB | 1 年前3 Apache ShardingSphere 中文文档 5.0.0/metadata/${schemeName}/rules 规则配置,可包括数据分片、读写分离、数据加密、影子库压测等配置。 - !SHARDING xxx - !READWRITE_SPLITTING xxx - !ENCRYPT xxx 4.5. 分布式治理 47 Apache ShardingSphere document, v5.0.0 /metadata/${schemeName}/schema 背景 ShardingSphere‐Agent 是独立自主设计,基于 Bytebuddy 字节码增加的项目,基于插件化的设计,可 以无缝隙的与 ShardingSphere 集成, 目前有提供 Log, metrics, APM 等可观测性功能。 使用方法 本地构建 > cd shardingsphere/shardingsphere-agent > mvn clean install SERVICE_NAME: "shardingsphere-agent" JAEGER_SAMPLER_TYPE: "const" JAEGER_SAMPLER_PARAM: "1" JAEGER_REPORTER_LOG_SPANS: "true" JAEGER_REPORTER_FLUSH_INTERVAL: "1" Zipkin: host: "localhost" #zipkin 服务的 host port:0 码力 | 385 页 | 4.26 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.1.1ShardingSphere 每次比较仅获取各个分片的当前结果集记录,驻留在内存中的记录仅为当前路由到的分片的结果集的当 前游标指向而已。按归并思想合并 m 个长度为 n 的已排序数组,时间复杂度为 O(mn(log m)),一般分 片数量 m 都较小,可以认为时间复杂度为 O(n),性能损耗很小。 其次,ShardingSphere 对仅落至单分片的查询进行进一步优化。落至单分片查询的请求并不需要改写 SQL ShardingSphere-JDBC 84 Apache ShardingSphere document, v5.1.1 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.1.1ShardingSphere 每次比较仅获取各个分片的当前结果集记录,驻留在内存中的记录仅为当前路由到的分片的结果集的当 前游标指向而已。按归并思想合并 m 个长度为 n 的已排序数组,时间复杂度为 O(mn(log m)),一般分 片数量 m 都较小,可以认为时间复杂度为 O(n),性能损耗很小。 其次,ShardingSphere 对仅落至单分片的查询进行进一步优化。落至单分片查询的请求并不需要改写 SQL ShardingSphere-JDBC 84 Apache ShardingSphere document, v5.1.1 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称 type: # 读写分离类型,比如:Static,Dynamic props: encryptor_aes encryptors: encryptor_aes: type: aes props: aes-key-value: 123456abc - !READWRITE_SPLITTING # 配置读写分离规则 dataSources: ds: # 读写分离的逻辑数据源名称 `ds` 用于在数据分片中使用 type: Static props: write-data-source-name: 0 码力 | 409 页 | 4.47 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.1.2ShardingSphere 每次比较仅获取各个分片的当前结果集记录,驻留在内存中的记录仅为当前路由到的分片的结果集的当 前游标指向而已。按归并思想合并 m 个长度为 n 的已排序数组,时间复杂度为 O(mn(log m)),一般分 片数量 m 都较小,可以认为时间复杂度为 O(n),性能损耗很小。 其次,ShardingSphere 对仅落至单分片的查询进行进一步优化。落至单分片查询的请求并不需要改写 SQL 码:https://github.com/apache/shardingsphere/tree/master/shardingsphere‐ features/shardingsphere‐readwrite‐splitting 4.5.4 核心概念 主库 添加、更新以及删除数据操作所使用的数据库,目前仅支持单主库。 从库 查询数据操作所使用的数据库,可支持多从库。 4.5. 读写分离 52 Apache ShardingSphere-JDBC 85 Apache ShardingSphere document, v5.1.2 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.1.2ShardingSphere 每次比较仅获取各个分片的当前结果集记录,驻留在内存中的记录仅为当前路由到的分片的结果集的当 前游标指向而已。按归并思想合并 m 个长度为 n 的已排序数组,时间复杂度为 O(mn(log m)),一般分 片数量 m 都较小,可以认为时间复杂度为 O(n),性能损耗很小。 其次,ShardingSphere 对仅落至单分片的查询进行进一步优化。落至单分片查询的请求并不需要改写 SQL 码:https://github.com/apache/shardingsphere/tree/master/shardingsphere‐ features/shardingsphere‐readwrite‐splitting 4.5.4 核心概念 主库 添加、更新以及删除数据操作所使用的数据库,目前仅支持单主库。 从库 查询数据操作所使用的数据库,可支持多从库。 4.5. 读写分离 52 Apache ShardingSphere-JDBC 85 Apache ShardingSphere document, v5.1.2 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称 type: # 读写分离类型,比如:Static,Dynamic props: 0 码力 | 446 页 | 4.67 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.1.0ShardingSphere-JDBC 83 Apache ShardingSphere document, v5.1.0 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources: Apache ShardingSphere 中文文档 5.1.0ShardingSphere-JDBC 83 Apache ShardingSphere document, v5.1.0 读写分离 配置项说明 rules: - !READWRITE_SPLITTING dataSources:- (+): # 读写分离逻辑数据源名称 type: # 读写分离类型,比如:Static,Dynamic props: encryptor_aes encryptors: encryptor_aes: type: aes props: aes-key-value: 123456abc - !READWRITE_SPLITTING # 配置读写分离规则 dataSources: ds: # 读写分离的逻辑数据源名称 `ds` 用于在数据分片中使用 type: Static props: write-data-source-name: readwrite-splitting.data-sources. - splitting- data-source-name>.type= # 读写分离类型,如: Static,Dynamic spring.shardingsphere.rules.readwrite-splitting.data-sources. - splitting- data-source-name> 0 码力 | 406 页 | 4.40 MB | 1 年前3
 Apache ShardingSphere 中文文档 5.0.0-alpha/metadata/${schemeName}/rules 规则配置,可包括数据分片、读写分离、数据加密、影子库压测等配置。 - !SHARDING xxx - !READWRITE_SPLITTING xxx - !ENCRYPT xxx /metadata/${schemeName}/schema 表结构配置,暂不支持动态修改。 tables: # 表 t_order: # 背景 ShardingSphere‐Agent 是独立自主设计,基于 Bytebuddy 字节码增加的项目,基于插件化的设计,可 以无缝隙的与 ShardingSphere 集成, 目前有提供 Log, metrics, APM 等可观测性功能。 使用方法 本地构建 > cd shardingsphere/shardingsphere-agent > mvn clean install SERVICE_NAME: “shardingsphere‐agent” JAEGER_SAMPLER_TYPE:“const”JAEGER_SAMPLER_PARAM:“1”JAEGER_REPORTER_LOG_SPANS: “true”JAEGER_REPORTER_FLUSH_INTERVAL: “1”Zipkin: host: “localhost”#zipkin 服务的 host port: 94110 码力 | 301 页 | 3.44 MB | 1 年前3 Apache ShardingSphere 中文文档 5.0.0-alpha/metadata/${schemeName}/rules 规则配置,可包括数据分片、读写分离、数据加密、影子库压测等配置。 - !SHARDING xxx - !READWRITE_SPLITTING xxx - !ENCRYPT xxx /metadata/${schemeName}/schema 表结构配置,暂不支持动态修改。 tables: # 表 t_order: # 背景 ShardingSphere‐Agent 是独立自主设计,基于 Bytebuddy 字节码增加的项目,基于插件化的设计,可 以无缝隙的与 ShardingSphere 集成, 目前有提供 Log, metrics, APM 等可观测性功能。 使用方法 本地构建 > cd shardingsphere/shardingsphere-agent > mvn clean install SERVICE_NAME: “shardingsphere‐agent” JAEGER_SAMPLER_TYPE:“const”JAEGER_SAMPLER_PARAM:“1”JAEGER_REPORTER_LOG_SPANS: “true”JAEGER_REPORTER_FLUSH_INTERVAL: “1”Zipkin: host: “localhost”#zipkin 服务的 host port: 94110 码力 | 301 页 | 3.44 MB | 1 年前3
共 649 条
- 1
- 2
- 3
- 4
- 5
- 6
- 65














 
  
 