blob: 67c9be3f6c32a760afd429dc0ba9020c9c7e5cdd [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>治理 on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/cn/features/governance/management/</link>
<description>Recent content in 治理 on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/document/current/cn/features/governance/management/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>配置中心</title>
<link>https://shardingsphere.apache.org/document/current/cn/features/governance/management/config-center/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/features/governance/management/config-center/</guid>
<description>实现动机 配置集中化:越来越多的运行时实例,使得散落的配置难于管理,配置不同步导致的问题十分严重。将配置集中于配置中心,可以更加有效进行管理。
配置动态化:配置修改后的分发,是配置中心可以提供的另一个重要能力。它可支持数据源和规则的动态切换。
配置中心数据结构 配置中心在定义的命名空间下,以 YAML 格式存储,包括数据源信息,规则信息、权限配置和属性配置,可通过修改节点来实现对于配置的动态管理。
namespace ├──users # 权限配置 ├──props # 属性配置 ├──schemas # Schema 配置 ├ ├──${schema_1} # Schema 名称1 ├ ├ ├──datasource # 数据源配置 ├ ├ ├──rule # 规则配置 ├ ├ ├──table # 表结构配置 ├ ├──${schema_2} # Schema 名称2 ├ ├ ├──datasource # 数据源配置 ├ ├ ├──rule # 规则配置 ├ ├ ├──table # 表结构配置 /users 权限配置,可配置访问 ShardingSphere-Proxy 的用户名和密码。
- root@127.0.0.1:root - sharding@%:sharding /props 属性配置,详情请参见配置手册。</description>
</item>
<item>
<title>注册中心</title>
<link>https://shardingsphere.apache.org/document/current/cn/features/governance/management/registry-center/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/features/governance/management/registry-center/</guid>
<description>实现动机 相对于配置中心管理配置数据,注册中心存放运行时的动态/临时状态数据,比如可用的 ShardingSphere 的实例,需要禁用或熔断的数据源等。
通过注册中心,可以提供熔断数据库访问程序对数据库的访问和禁用从库的访问的编排治理能力。治理模块仍然有大量未完成的功能(比如流控等)。
注册中心数据结构 注册中心在定义的命名空间的 states 节点下,创建数据库访问对象运行节点,用于区分不同数据库访问实例。包括 proxynodes 和 datanodes 节点。
namespace ├──states ├ ├──proxynodes ├ ├ ├──${your_instance_ip_a}@${your_instance_pid_x}@${UUID} ├ ├ ├──${your_instance_ip_b}@${your_instance_pid_y}@${UUID} ├ ├ ├──.... ├ ├──datanodes ├ ├ ├──${schema_1} ├ ├ ├ ├──${ds_0} ├ ├ ├ ├──${ds_1} ├ ├ ├──${schema_2} ├ ├ ├ ├──${ds_0} ├ ├ ├ ├──${ds_1} ├ ├ ├──.... /states/proxynodes 数据库访问对象运行实例信息,子节点是当前运行实例的标识。 运行实例标识由运行服务器的 IP 地址和 PID 构成。运行实例标识均为临时节点,当实例上线时注册,下线时自动清理。 注册中心监控这些节点的变化来治理运行中实例对数据库的访问等。
/states/datanodes 可以治理读写分离从库,可动态添加删除以及禁用。
操作指南 熔断实例 可在 IP地址@PID@UUID 节点写入 DISABLED(忽略大小写)表示禁用该实例,删除 DISABLED 表示启用。</description>
</item>
<item>
<title>第三方组件依赖</title>
<link>https://shardingsphere.apache.org/document/current/cn/features/governance/management/dependency/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/features/governance/management/dependency/</guid>
<description>Apache ShardingSphere 在数据库治理模块使用 SPI 方式载入数据到配置中心和注册中心,进行实例熔断和数据库禁用。 目前,Apache ShardingSphere 内部支持 ZooKeeper,Etcd等常用的配置中心/注册中心。 此外,开发者可以使用其他第三方组件,并通过 SPI 的方式注入到 Apache ShardingSphere,从而使用该配置中心和注册中心,实现数据库治理功能。
实现驱动 版本 配置中心 注册中心 Zookeeper Apache Curator 3.6.x 支持 支持 Etcd jetcd v3 支持 支持 </description>
</item>
</channel>
</rss>