In addition to MySQL master-slave, you have another choice, Galera

58 Shen Jian 2021-09-15 07:24:31
addition mysql master-slave master slave


Most Internet companies , All use MySQL Of InnoDB The engine stores data .

To ensure high availability of database , In order to ensure the expansion of performance , Most companies will use Master slave synchronization , Read / write separation Of MySQL Cluster architecture .

Traditional master-slave synchronization , Read / write separation MySQL The cluster architecture is shown in the figure above :

(1) Main library : The first instance on the left , Provide an instance of the write service ;

(2) Slave Library : Two instances on the right , Provide an instance of the read service ;

How does data replication work at this time ?

Still as shown in the figure above :

(1) The client submits the write operation to the main library ;

(2)Replication: The main library serializes the operation , adopt binlog To the slave library ;

(3) Perform the same sequence of operations from the library , For replica redundancy ;

Traditional master-slave synchronization , Read write separation redundancy mode , What are the problems with database clusters ?

(1) Users should pay attention to cluster details , Implement read-write separation ;

(2) Write library is still single point , Performance cannot be linearly scaled ;

(3) There is a delay in reading the library , Data inconsistency ;

(4) The writing library hung up , From the top of the library , There may be data loss ;

(5) If middleware is introduced ,SQL Ability will be affected ;

(6) O & M complexity ;

(7)…

Since there are so many pain points , Is there a technology , It can solve everyone's problems ?

Galera colony (Galera Cluster) Give birth to .

What is? Galera colony ?

Galera The cluster is based on MySQL InnoDB Synchronous replication :

(1) Sync ;

(2) Multimaster ;

(3) Database cluster ;

Voice over : It can support, for example MariaDB Wait for other databases , This article focuses on MySQL.

As shown in the figure above :

(1)Galera The cluster consists of a set of MySQL The cluster consists of ;

(2)Replication: This group MySQL Server usage Replication plug in To manage database replication ;

(3) The client can read and write to any node in the cluster ;

Galera The official website of the cluster is known as , It and its disadvantages :

(1) Real multi master (True Multi_Master), Any data changes will be copied to other nodes ;

(2) There is no such thing as slave latency (slave lag), Synchronous replication ;

(3) Strong consistency , All nodes are in a consistent state ;

(4) Hot standby , High availability , There is no need to deal with the so-called master-slave failover , There is no need to be empty IP;

(5) No read / write separation is required , You can read and write to any node at any time ;

(6) Support InnoDB;

(7) Transparent to the application ;

(8)…

 

All in all , In the description on the official website ,Galera Cluster is a highly available , High performance , To ensure data consistency and integrity :

(1) in the light of MySQL Of ;

(2) Based on synchronous authentication (synchronous certification-based);

(3) Multiple copies (replication);

Solution .

 

online Galera There seems to be less information , Asked some former friends , It doesn't seem to be used much in Internet companies , Ready to write in depth Galera colony , After all, MySQL Another choice after master-slave .

 

On the official website Galera, What technical points are you interested in ? Guess how it works ? Do you think it is necessary to write further ,or Change the subject ?

The comments told me .

MySQL Kernel related articles

Buffer pool (buffer pool), This time I completely understand !

Write buffer (change buffer), This time I completely understand !

The log buffer (log buffer), This time I completely understand !

double write buffer, This time I completely understand !

About MySQL, No one likes this one ?

版权声明
本文为[58 Shen Jian]所创,转载请带上原文链接,感谢
https://javamana.com/2021/09/20210909130210377c.html

  1. Design pattern -- agent pattern
  2. Huawei Java Senior Engineer interview question, Byte Jumping thousand Selected Interview Question is still not Brushed!
  3. 双非本科字节跳动Java面试题分享,一篇文章教你搞定计算机网络面试,
  4. 又到一年金三银四,2021最新Java笔试题及答案,
  5. Huawei Finance and Economics 2021 Spring Recruitment interview, what is distributed Lock?Pourquoi utiliser des serrures distribuées?
  6. Un an plus tard, Golden, Silver, Silver, and Silver, 2021, the latest Java written Examination Questions and Answers,
  7. Partage de questions d'entrevue Java à double saut d'octets non - premier cycle, un article vous apprend à gérer l'entrevue réseau informatique,
  8. Computer graduation project java online voting system based on SSM
  9. K8s gestion des ressources (opérations de base)
  10. 又到一年金三銀四,2021最新Java筆試題及答案,
  11. Collection de code de base JavaScript (1)
  12. Vérification des permissions d'interface pour le démarrage du printemps à l'aide d'annotations personnalisées AOP +.
  13. Vérification des permissions d'interface pour le démarrage du printemps à l'aide d'annotations personnalisées AOP +.
  14. Cloud Security Daily 210914: Red Hat Jboss Middleware Platform found important Security Vulnerability and needs to be upgraded as soon as possible
  15. 吐血整理,腾讯团队实力打造spring入门教程,
  16. 史上最全的微服务专业术语面试50问,字节跳动Java岗经典面试真题,
  17. Absolument!C'est l'analyse la plus détaillée du code source de hashtap que j'ai jamais vu!
  18. Computer graduation project Java logistics order management system of logistics company based on SSM
  19. Talk about Kafka: source code analysis of producer
  20. [springboot2 starts from 0] development tips - Lombok, devtools, spring initailizr
  21. 国内一线互联网公司面试题汇总,2021年大厂Java岗面试必问,
  22. 啃完吃透保你涨薪5K,熬夜整理小米Java面试题,
  23. 和字节跳动大佬的技术面谈,Redis成神之路电子版教程已问世,
  24. Le terme professionnel le plus complet de l'histoire des micro - services interview 50 questions, Byte Jumping Java post Classic interview vrai problème,
  25. After using mybatisplus, I haven't written SQL for a long time
  26. [springboot2 starts from 0] how to write a springboot application?
  27. Huawei cloud guassdb (for redis) released a new version, and the two core features were officially unveiled
  28. 和字節跳動大佬的技術面談,Redis成神之路電子版教程已問世,
  29. 啃完吃透保你漲薪5K,熬夜整理小米Java面試題,
  30. Avec l'interview technique du gigolo, le tutoriel électronique redis est sorti.
  31. Après avoir mangé, assurez - vous d'augmenter votre salaire de 5K et de rester debout tard pour trier les questions d'entrevue Java de millet.
  32. Résumé des questions d'entrevue pour les entreprises Internet nationales de première ligne, qui doivent être posées lors de l'entrevue d'emploi Java de la grande usine en 2021,
  33. Le tri des crachats de sang, la force de l'équipe Tencent pour créer le tutoriel d'introduction au printemps,
  34. Java and scala concurrency Fundamentals
  35. Analysis of java thread source code based on Hotspot
  36. 國內一線互聯網公司面試題匯總,2021年大廠Java崗面試必問,
  37. Introduction au module de contrôle de Connexion MySQL
  38. 大厂高级测试面试题,Java面试基础技能罗列,
  39. Comprendre l'architecture sous - jacente d'InnoDB en exécutant une instruction
  40. Chargeur de classe 1 Tomcat
  41. 小白也能看懂的dubbo3应用级服务发现详解
  42. SpringBoot异步使用@Async原理及线程池配置
  43. Questions d'entrevue de test avancé de Dachang, liste des compétences de base de l'entrevue Java,
  44. SpringBoot异步使用@Async原理及線程池配置
  45. Springboot utilise asynchrone le principe @ async et la configuration du pool de threads
  46. Détails de la découverte du Service d'application Dubbo 3 que Xiaobai peut également comprendre
  47. Springboot utilise asynchrone le principe @ async et la configuration du pool de threads
  48. 如何强大且优雅的搞定Linux文件系统,算法题 JVM,
  49. 太牛了,阿里P7架构师带你看透maven的来龙去脉,
  50. Oracle central et Oracle décentralisé
  51. java JavaBean
  52. Java wrapper type
  53. Java super keyword
  54. Java static keyword
  55. Java this keyword
  56. Java interface
  57. 太牛了,阿裏P7架構師帶你看透maven的來龍去脈,
  58. C'est génial, l'architecte Ali p7 vous montre à travers Maven.
  59. Comment traiter le système de fichiers Linux avec puissance et élégance, algorithme JVM,
  60. Usage of Java scanner