Sheeri Cabral

technocation.org

Sheeri Cabral

High Availabilitymysql1mysql2


High Availabilitymysql1mysql2


Scalingappwritesmaster


Scalingappwritesreadsmasterslaveslave


Scalingappwritesreadsmasterslaveslave...is not necessarily highly available


The DifferenceAvailability– Can I reach it?Scaling– Can 50,000 people reach it?


Ways to ScaleScale upvsScale out


Multiple slavesOpen Source Scaling


Open Source ScalingMultiple slavesPartitioning


Open Source ScalingMultiple slavesPartitioningSharding


Open Source ScalingMultiple slavesPartitioningShardingMySQL Cluster


Open Source ScalingMultiple slavesPartitioningShardingMySQL ClusterGalera Cluster


Open Source ScalingMultiple slavesPartitioningShardingMySQL ClusterGalera Cluster...some of these are also high availability solutions


Our OptionsMultiple slavesPartitioningShardingMySQL ClusterGalera Cluster


Our OptionsMultiple slavesPartitioning – needed HAShardingMySQL ClusterGalera Cluster


Our OptionsMultiple slavesPartitioning – needed HASharding – could not re-architect appMySQL ClusterGalera Cluster


Our OptionsMultiple slavesPartitioning – needed HASharding – could not re-architect appMySQL ClusterGalera Cluster – GA Apr 2012


Our OptionsMultiple slaves – needed write scalingPartitioning – needed HASharding – could not re-architect appMySQL ClusterGalera Cluster – GA Apr 2012


Current Setup


lbCurrent Setup


Current Setupapplbwritesappapp


Current Setupapplbwritesappapp


Current Setupapplbwritesappappmaster2master1


Current Setuplbwritesappappappmaster2master1slave1slave2slave3slave4slave5


Current Setuplbwritesappappappmaster2master1slave1slave2slave3slave4slave5


What We Really Needed…a better load balancer


Our OptionsMultiple slaves – needed write scalingPartitioning – needed HASharding – could not re-architect appMySQL ClusterGalera Cluster – GA Apr 2012


Our OptionsMultiple slaves – needed write scalingPartitioning – needed HASharding – could not re-architect appMySQL Cluster – not a load-balancing solutionGalera Cluster – GA Apr 2012


What We Really Needed…a better load balancerto work within our existing framework


What We Really Needed…a better load balancerto work within our existing frameworkflexible


What We Really Needed…a better load balancerto work within our existing frameworkflexiblegeo-sharding


What We Really Needed…a better load balancerto work within our existing frameworkflexiblegeo-sharding


Commercial SolutionsScalarcScalebaseTungsten


Commercial SolutionsScalarc – not quite ready in Feb 2012– Much better now!ScalebaseTungsten


Commercial SolutionsScalarc – not quite ready in Feb 2012– Much better now!ScalebaseTungsten – late-comer, then ran out of time– But does do what we need!


ScalebaseGood load balancingFlexible– Avoid the “zero-day load” problem– Can change architecture easilyIs also highly available (redundancy)


ScalebaseR/W splitting– Eliminates need for separate VIPs– Just go to scalebase1.db and scalebase2.db– Eliminate load balancer dependency


Current Setupmaster2lbmaster1writesappappappscalebaseslave1slave2slave3slave4slave5


Current Setupwritesappappapplbmaster3scalebasemaster4master2master1master5master6


Other FeaturesQuery redirectionTransparent geo-sharding– You pick the sharding keyData flow management– Query redirecting


Other Features– Eliminates need for separate VIPs– Just go to scalebase1.db and scalebase2.db– Eliminate load balancer dependency


Final Note– It works for us– Based on our needs– YMMV


Mozilla is Hiring!http://careers.mozilla.org/DBA – MySQL, Postgres, NoSQL (some or all)http://careers.mozilla.org/en-US/position/oTqLWfwKSysAdmin – RHEL, CentOS, Fedorahttp://careers.mozilla.org/en-US/position/o97xWfwtUS, Canada, UK, France, Spain, Germany, Netherlands,Sweden, Denmark, Poland, China, Japan, New ZealandIn Mountain View, Senior Windows/Unix SysAdminhttp://careers.mozilla.org/en-US/position/oZmJWfwK


Want to Learn MySQL?12 weeks, 1 book. MySQL Marinate!Soak it in!www.mysqlmarinate.com


Questions? Comments?OurSQL podcast- www.oursql.comMySQL Administrator's Bible- tinyurl.com/mysqlbiblebit.ly/ghackmysqlkimtag.com/mysqlplanet.mysql.com

More magazines by this user
Similar magazines