Home Database Mysql Tutorial MySQL磁盘复制技术--DRBD:优缺点比较、注意事项以及最佳实践_MySQL

MySQL磁盘复制技术--DRBD:优缺点比较、注意事项以及最佳实践_MySQL

Jun 01, 2016 pm 01:34 PM
Advantages and Disadvantages technology network card

bitsCN.com

MySQL磁盘复制技术--DRBD:优缺点比较、注意事项以及最佳实践

 

  DRBD 是内核模块方式实现的块级别同步复制技术、这里的同步级别是可以调整的

   因为DRBD 是利用网卡进行块复制、如果、这里用 Infiniband 进行传输、便可以有效处理高并发

   这是种复制存储、说白点、更像是一台热备机器、与其说是存储的HA、倒不如说是保证数据安全

   工业环境更多用在 NFS 服务器、并结合 Linux-HA 项目、如 Packmaker、Heartbeat 等

   

   

   很多人谈 DRBD 脑裂而色变、用过就知道了、脑裂不是那么容易就发生的

   DRBD 注意不设置自动启动、重启时候手动启动、脑裂的情况发生非常的少

   工作中基本不重启 DRBD、更不会重启服务器了、基本上没遇到脑裂的问题

 

   ㈠ 优缺点比较

   

   

   优点

   

   ① 没有单点故障的风险暴露

   ② 没有集群软件通病、如 脑裂

   

   

   缺点

   

   ⑴ 浪费资源

      

      DRBD 的备机目前还不能提供读、所以浪费了资源

      大家都知道、生产环境下的 MySQL 服务器都是顶配的、这样在线上浪费一台机器、感觉很可惜的

      

   ⑵ DRBD 无法代替备份

      

      DRBD 可能会造成坏数据、不管啥HA、数据备份一定要有、没备份、整个HA瘫痪掉、你也嗝屁了、闪人吧

      

   ⑶ 故障转移无法做到秒级以内

   

   ⑷ 对于MyISAM 表用处不大

      

      事实上、任何期望高可用的系统、MyISAM 都不会是个选择、因为

      MyISAM 的崩溃恢复后需要很多时间修复、并且、会丢失数据

      

   ⑸ 增加写操作负担

      

      主要是InnoDB 设置为 innodb_flush_log_at_trx_commit=1

      导致许多小的写入和fsync()调用、那么、DRBD同步将会比较缓慢

   

   

   

   ㈡ 注意事项

      

      

      ① DRBD 和 Linux-HA 版本选择

      ② DRBD 专门使用一块网卡

      ③ 心跳网络与vip服务网络分离

      ④ iptables针对心跳网络放开DRBD、Linux-HA 的端口、VIP可根据自己的应用开启对应端口

      ⑤ 监控DRBD、Linux-HA 状态、最好做成脚本、自动检测、出问题报警

      ⑥ 通常都有流量监控系统(mrtg,cacti等)、定期检查机器的负载、流量情况

      

   

   

   ㈢ 最佳实践

      

      DRBD 只选择复制存放 binlog 的设备、如果、

      主动节点失效、可以在被动节点上开启一个日志服务器

      然后、对失效主库的所有设备应用这些 binlog 、接下来

      可以选择其中一个备库提升为主库、以代替失效的系统

 

bitsCN.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

This article is enough for you to read about autonomous driving and trajectory prediction! This article is enough for you to read about autonomous driving and trajectory prediction! Feb 28, 2024 pm 07:20 PM

Trajectory prediction plays an important role in autonomous driving. Autonomous driving trajectory prediction refers to predicting the future driving trajectory of the vehicle by analyzing various data during the vehicle's driving process. As the core module of autonomous driving, the quality of trajectory prediction is crucial to downstream planning control. The trajectory prediction task has a rich technology stack and requires familiarity with autonomous driving dynamic/static perception, high-precision maps, lane lines, neural network architecture (CNN&GNN&Transformer) skills, etc. It is very difficult to get started! Many fans hope to get started with trajectory prediction as soon as possible and avoid pitfalls. Today I will take stock of some common problems and introductory learning methods for trajectory prediction! Introductory related knowledge 1. Are the preview papers in order? A: Look at the survey first, p

The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? The Stable Diffusion 3 paper is finally released, and the architectural details are revealed. Will it help to reproduce Sora? Mar 06, 2024 pm 05:34 PM

StableDiffusion3’s paper is finally here! This model was released two weeks ago and uses the same DiT (DiffusionTransformer) architecture as Sora. It caused quite a stir once it was released. Compared with the previous version, the quality of the images generated by StableDiffusion3 has been significantly improved. It now supports multi-theme prompts, and the text writing effect has also been improved, and garbled characters no longer appear. StabilityAI pointed out that StableDiffusion3 is a series of models with parameter sizes ranging from 800M to 8B. This parameter range means that the model can be run directly on many portable devices, significantly reducing the use of AI

Must read before purchasing a system: Analysis of the advantages and disadvantages of Win11 and Win10 Must read before purchasing a system: Analysis of the advantages and disadvantages of Win11 and Win10 Mar 28, 2024 pm 01:33 PM

In today's information age, personal computers play an important role as an indispensable tool in our daily lives. As one of the core software of computers, the operating system affects our usage experience and work efficiency. In the market, Microsoft's Windows operating system has always occupied a dominant position, and now people face the choice between the latest Windows 11 and the old Windows 10. For ordinary consumers, when choosing an operating system, they do not just look at the version number, but also understand its advantages and disadvantages.

What are the advantages and disadvantages of templating? What are the advantages and disadvantages of templating? May 08, 2024 pm 03:51 PM

Templating: Pros and Cons Templating is a powerful programming technique that allows you to create reusable blocks of code. It offers a range of advantages, but also some disadvantages. Pros: Code Reusability: Templating allows you to create common code that can be reused throughout your application, reducing duplication and maintenance efforts. Consistency: Templating ensures that code snippets are implemented the same way in different locations, improving code consistency and readability. Maintainability: Changes to a template are reflected simultaneously in all code that uses it, simplifying maintenance and updates. Efficiency: Templating saves time and effort because you don't have to write the same code over and over again. Flexibility: Templating allows you to create configurable blocks of code that can be easily adapted to different application needs. shortcoming

DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! Mar 21, 2024 pm 05:21 PM

This paper explores the problem of accurately detecting objects from different viewing angles (such as perspective and bird's-eye view) in autonomous driving, especially how to effectively transform features from perspective (PV) to bird's-eye view (BEV) space. Transformation is implemented via the Visual Transformation (VT) module. Existing methods are broadly divided into two strategies: 2D to 3D and 3D to 2D conversion. 2D-to-3D methods improve dense 2D features by predicting depth probabilities, but the inherent uncertainty of depth predictions, especially in distant regions, may introduce inaccuracies. While 3D to 2D methods usually use 3D queries to sample 2D features and learn the attention weights of the correspondence between 3D and 2D features through a Transformer, which increases the computational and deployment time.

What are the advantages and disadvantages of how Java Servlets work? What are the advantages and disadvantages of how Java Servlets work? Apr 16, 2024 pm 03:18 PM

JavaServlet is a Java class used to build dynamic web pages and serves as a bridge between client and server. Working principle: receive requests, initialize Servlet, process requests, generate responses and close Servlet. Pros: Portable, scalable, secure and easy to use. Disadvantages: Overhead, coupling, and state management. Practical case: Create a simple Servlet to display the "Hello, Servlet!" message.

Advantages and disadvantages of using Chinese when naming Java variables Advantages and disadvantages of using Chinese when naming Java variables Feb 18, 2024 am 10:14 AM

Advantages and Disadvantages of Using Chinese to Name Java Variables In Java programming, we usually use English to name identifiers such as variables, methods, and classes. However, sometimes we can also consider using Chinese as part of the identifier. This article will explore the advantages and disadvantages of using Chinese named Java variables and give some specific code examples. Advantage 1: Improve code readability. Using Chinese named Java variables can make the code easier to understand and read. After all, our brains understand and recognize Chinese more naturally and fluently than English. For non-English

Comparison of the advantages and disadvantages of PHP frameworks: Which one is better? Comparison of the advantages and disadvantages of PHP frameworks: Which one is better? Jun 04, 2024 pm 03:36 PM

The choice of PHP framework depends on project needs and developer skills: Laravel: rich in features and active community, but has a steep learning curve and high performance overhead. CodeIgniter: lightweight and easy to extend, but has limited functionality and less documentation. Symfony: Modular, strong community, but complex, performance issues. ZendFramework: enterprise-grade, stable and reliable, but bulky and expensive to license. Slim: micro-framework, fast, but with limited functionality and a steep learning curve.

See all articles