当前位置:网站首页>Shardingsphere database sub database sub table introduction
Shardingsphere database sub database sub table introduction
2022-07-24 22:53:00 【Miss, do you fix the light bulb】
One 、 brief introduction
shardingsphere It is a set of open source distributed database middleware products . It has two important products sharding jdbc and sharding proxy
1.sharding jdbc : You can see clearly from the picture , Is embedded in the application , All database and table logic is controlled by developers , Relatively flexible functions , But it is more intrusive to the business . Can be understood as an enhanced version of JDBC drive , Fully compatible with JDBC And all kinds of ORM frame

2.sharding proxy: It can be clearly seen from the figure , He is deployed independently , At present, we support mysql and postgresql. Zero intrusion into business , It's like docking with one mysql service , I can't feel his existence , But that's exactly what happened , The function is not flexible and monotonous .( similar mycat)
Two 、 The core concept
1. Logic table : Define logical library name and logical table
2. True table : The partition is really a physical table
3. Data nodes : Data source and data table
4. Binding table : The partition rules must be completely consistent with the master sub table ( Table of primary and foreign keys , Very important , The rules of fragmentation must be consistent )
5. Broadcast table : There are tables in each partition ( Redundant tables such as dictionary tables )
6. Patch key : Specify a field as fragment creation ( It's usually a primary key )
7. Sharding algorithm : Distribute the data to different slices by algorithm , Support =,between and in Fragmentation , Developers customize the implementation , High flexibility
8. Fragmentation strategy : The real slicing operation is the slicing key + Sharding algorithm .
3、 ... and 、 Advantages and disadvantages
Although the problem of single machine capacity is solved by dividing databases and tables , But it also brings many problems ,
for example jdbc Big business intrusion , Business sql It is no longer simply running on the machine , For a large number of trans latitudes join, polymerization , Subquery . Sorting and other functions are difficult to support . Greatly weaken the function of the database . So generally, if you can't divide it, you can't divide it , If you can use distributed database, you can use distributed database , Or add cache ,es And so on .
边栏推荐
- 这个月 google的“AI具备意识”的事件的想法
- Application programming of communication heartbeat signal for communication abnormality judgment
- 聊聊 Redis 是如何进行请求处理
- On the problem that the on-board relay cannot be switched on due to insufficient power supply
- 头脑风暴之——利用reduce方法重构concat函数
- Archsummit: evolution of the underlying framework of cherished microservices
- "Fundamentals of program design" Chapter 10 function and program structure 7-3 recursive realization of reverse order output integer (15 points)
- Convex optimization Basics
- NVIDA-TensorRT部署(一)
- PGPLSQL中的:=和=
猜你喜欢

IndexTree

First engineering practice, or first engineering thought—— An undergraduate's perception from learning oi to learning development

Pointrender parsing

物联网平台返回数据解析时遇到org.json.JSONException: No value for Value怎么办

Org.json Jsonexception: what about no value for value

Read and understand the advantages of the LAAS scheme of elephant swap

AVL tree of ordered table

Network Security Learning (V) DHCP

百度网盘+Chrom插件

Kubernetes scheduling concept and workflow
随机推荐
Network Security Learning (I) virtual machine
RichTextBox save as picture
Convert a string to an integer and don't double it
一文读懂Elephant Swap的LaaS方案的优势之处
Shell调试Debug的三种方式
网上怎么炒股手机上炒股安全吗
Okaleido tiger NFT即将登录Binance NFT平台,后市持续看好
Let‘s Encrypt
Connector in C
ASP. Net core 6.0 data validation based on model validation
老杜Servlet-JSP
AVL tree of ordered table
Notes of Teacher Li Hongyi's 2020 in-depth learning series 2
【云原生之kubernetes】kubernetes集群高级资源对象statefulesets
WPF opens external programs and activates them when needed
Background image and QR code synthesis
When texturebrush is created, it prompts that there is insufficient memory
Archsummit: evolution of the underlying framework of cherished microservices
"Fundamentals of program design" Chapter 10 function and program structure 7-3 recursive realization of reverse order output integer (15 points)
聊聊 Redis 是如何进行请求处理