In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what dbproxy is, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
In small and medium-sized Internet enterprises. The cluster of mysql is generally the architecture shown in the figure above. The WEB node reads the dbproxy server when it reads the database. The dbproxy server separates the read and write of the database by judging the SQL statement. Read the request load to the slave library (you can also add the master library), and write the request to write the master library.
The dbproxy here is the only exit to the database cluster, so it also needs to be highly available.
Drproxy is a commonly used software for database read-write separation, and amoeba, mycat and cobar are also commonly used. This kind of software not only has the function of read-write separation, but also can realize load balancing and health check of back-end nodes.
The read-write separation of the database can not only be realized through this kind of database middleware software, but also can be written in the program.
Usually our main library has to be highly available with dual hosts, so that the main library fails and the other main library takes over immediately. If you do not work as a dual master, you need to make a state transition when you take over the master library from the library, and there will be a delay.
The key point for the high availability of the database master database is data synchronization. The more commonly used high availability scenarios are:
1 、 keepalived+mysql replication . VIP is realized through keepalived, and data synchronization is realized through replication, which is the synchronization scheme of mysql.
2 、 hearbeat+drbd . The synchronization of double master data is realized through drbd, which is based on block devices. It is much faster than the normal synchronization scheme. VIP drift and drbd resource switching management are realized through heartbeat.
3 、 keepalived+mha .
For slave libraries, it is best not to exceed 5. We can use three of them as nodes accessed by users and the other as query nodes for insiders. Because the internal staff generally query the node according to the time period, without indexing, it takes up more resources, so it is necessary to dedicate this node alone so as not to affect customer access. Finally, we should leave a database backup from the database.
The data consistency of the slave database can be maintained by master-slave assistance directly to the master library, or by master-slave replication from other slave libraries (the advantage is to reduce the pressure on the master database, but the disadvantage is that the delay is slightly larger).
The above is all the content of this article "what is dbproxy?" thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
#! / bin/bashecho-e "\ n\ n*~~DATE:" `date'+% Y/%m/%d% T'` "~
© 2024 shulou.com SLNews company. All rights reserved.