Comments (3)
您好,感觉写的很详细,很不错。我这边有一些关于读写分离规则细节想要问一下,我们这边读写分离规则只是针对数据库datasource进行区分,至于具体的执行 sql 相关的信息以及规则管理,我们目前不关心是不?
from opensergo-specification.
您好,感觉写的很详细,很不错。我这边有一些关于读写分离规则细节想要问一下,我们这边读写分离规则只是针对数据库datasource进行区分,至于具体的执行 sql 相关的信息以及规则管理,我们目前不关心是不?
您好!用户需要的话是可以在识别 SQL 的时候使用正则表达式、条件表达式进行匹配和抓取,或者基于 Metrics 的自动发现,然后再路由到特定的数据源。
from opensergo-specification.
新增 SQL 识别规则:
- 基于正则表达式的配置:需要由配置人员根据经验编写正则,并配置相应的转发规则
- 基于条件表达式的配置:需要由配置人员根据经验编写条件表达式,并配置相应的转发规则
以静态读写分离 YAML 示例
apiVersion: traffic.opensergo.io/v1alpha1
kind: ReadWriteSplitting
metadata:
name: readwrite
spec:
rules:
staticStrategy:
loadBalancerName: "random"
patterns: # 如果未显式声明,则使用默认的基于语义的 SQL 识别
- dataSourceNames:
- "read_ds_0"
- "read_ds_1"
regex: # 基于正则表达式的
- "^SELECT"
conditions: # 基于条件表达式的
- subject: column # column 列或 table 表
op: in # 预算符,包括 in, eq, ne, notin 等
values:
- "orders"
loadBalancers:
- loadBalancerName: "random"
type: "RANDOM"
from opensergo-specification.
Related Issues (20)
- [RFC] Database governance-Shadow CRD for database shadow l | 数据库治理- 影子库
- WIP: [RFC] Database governance-ConcurrecyControl CRD for concurrency control l | 数据库治理-并发控制
- [RFC] Database governance-Database Discovery CRD for database discovery l | 数据库治理- 数据库发现
- [RFC] Database governance-DistributedTransaction CRD for distributed transaction l | 数据库治理- 分布式事务
- 流量路由标准中样例yaml是否有误 HOT 2
- Wanted: Who is using OpenSergo | OpenSergo 使用情况调研
- 【咨询】多种部署环境下的框架支持程度 HOT 1
- [Discussion] About Adding Traffic Governance to the Event Message Model | 关于增加事件消息模型的流量治理 HOT 4
- [RFC] Refactored traffic routing spec, based on Istio VS/DR CRD
- 推荐您的项目参加-2022年**开源创新大赛
- Apache EventMesh integration with openSergo as EDA governance implementation HOT 1
- opensergo-dashboard可执行包的部署建议
- Support Seata distributed transaction | 有考虑集成seata吗?是否会在这一块推出可插拔的协议? HOT 1
- [Discussion] Add traffic routing spec about event, based on current design #63
- 有考虑推出Java版的控制平面吗?或者支持Java对控制平面的扩展?
- [Discussion] Policy spec integration with Kubernetes Gateway API HOT 1
- OpenSergo also needs to adapt to standards, protocols, frameworks, libraries, tools, and other microservice ecosystems. The list is as follows:OpenSergo还需要适配的标准、协议、框架、库、工具以及其他微服务生态体系,列表如下:
- Add document about how to access opersergo event governance in each framework HOT 1
- Add the standard CRD for zero trust direction in Opensergo | Opensergo中加入关于零信任方向的标准CRD
- [Discussion]关于增加基于吞吐量的流量治理
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensergo-specification.