zoukankan      html  css  js  c++  java
  • MySQL Horizontal Scaling

    http://www.tuicool.com/articles/miuq63E

    http://www.guokr.com/blog/475765/

    http://songwie.com/articlelist/44

    https://www.youtube.com/watch?v=5yDO-tmIoXY

    single database => master / slave  => sharding

    ( at stage of master/slave, you might need to add a hot-standby master for failover, e.g. DRDB-based, http://highscalability.com/blog/2011/6/27/tripadvisor-architecture-40m-visitors-200m-dynamic-page-view.html, https://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device)

    after sharding, how to do "query routing"
    a) application layer
    b) library-as-sharding (e.g. so-called JDBC-sharding, do it at JDBC layer)
    c) proxy-as-sharding

    Qihoo 360 Atlas (quite primitive)

    based on mysql-proxy, exposes MySQL client protocol;

    add /* master */ to SQL in order to force send to master;

    manual creation of partition table;

    Alibaba B2B Cobar

    proxy-based, query parsing / rewrite / routing, result gathering;

    expose MySQL client protocol;

    failover for data node; (need dual-direction replication between data nodes)

    Taobao TDDL - Also as Aliyun DRDS

    library-as-sharding, access external config service to determine paritioning rule;

    works on JDBC layer;

    DRDS : transparent and automatic scaling - just add machine

    http://www.oschina.net/news/64312/aliyun-drds

    https://yq.aliyun.com/articles/38883

    DRDS features :
    a) Join : if it's driven by a small table, broadcast the small table to each partition, and do local join - instead of join at the end
    b) read/write segregation : policy-driven, DRDS determines which datanode is master and how to route read/write; policy can be updated on the fly; SQL hint to force certain node (e.g. master)
    c) redundancy data copy;
    d) distributed transaction (read-commit level)

    MyCAT

    Cobar-based, proxy-based;

    client : MySQL CLI, JDBC etc.

    Server: MySQL client protocol handler => SQL Parser / Router => SQL Executor => MySQL Instances...

    Server / DataNode : Heartbeat check etc.

    Google(Youtube): Vitess (vai-tess)

    vttablet : a server sits in front of a MySQL database; connection pool to backend MySQL, row cache, rewrite/optimize SQL;

    vtgate : light proxy which routes traffic from application to vttablet; health check of vttablet;

    topology : metadata store (e.g. Zookeeper)

    no transaction support (yet) : https://groups.google.com/forum/#!topic/vitess/e5N_YiODl14

    ScaleBase

    https://en.wikipedia.org/wiki/ScaleBase

    2-phase commit and roll-back;

    cross-node join and aggregations

  • 相关阅读:
    Unique Binary Search Trees(dp)
    Binary Tree Inorder Traversal
    Reverse Linked List II
    O​r​a​c​l​e​1​1​g​自​带​的​S​Q​L​ ​d​e​v​e​l​o​p​e​r​无​法​打​开​解​决​
    英语飙升的好方法
    MyEclipse加入jquery.js文件missing semicolon的错误
    js,jq获取手机屏幕分辨率的宽高
    给标签元素设固定宽高,内部添加滚动条显示
    解决手机端点击input的时候,页面会放大
    支付宝异步回调验证签名
  • 原文地址:https://www.cnblogs.com/qsort/p/5944341.html
Copyright © 2011-2022 走看看