京东分布式数据库实践-田琪
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
京东分布式数据库实践
田琪
Agenda
•infrastructures in JD
•database architecture in JD
•data partition and online migration
•the key architecture and algorithm of NewSQL
2
Infrastructures
DB Architecture
Proxy
•Can be used without any
modification
•Scale-out the database servers
•Reduce the connections to the
backend database servers
•High-Available support of
database servers
5
ID MEMBE_ID INFO 1pavarotti17…3abcd…4test1234…5test1234…9abcd…11pavarotti17…20abcd…ID MEMBE_ID INFO 1pavarotti17…
4test1234…
5test1234…11pavarotti17…
ID MEMBE_ID INFO 3abcd…9abcd…20abcd…
DB1
DB2
partition
key
route function
meta
Limitations
•complex query doesn't work well
•no distributed transaction
•data consistency still be a problem •user still need to care about sharding and migration
•pre-sharding still not powerful enough
the real need of apps
•apps shouldn’t worry about •sharding
•failover
•eventual consistency •apps need transaction •apps need ACID
•apps need SQL
NewSQL Architecture
•data space is divided into ranges •using RSM to ensure consistency •node is consisted of ranges •monolithic map is consisted of nodes •transaction is on top of the map
mvcc
read (non-conflict case)