Database read/write separation

Source: Internet
Author: User
Tags mysql free

as the business of a website expands, data increases, the pressure on the database becomes larger, and the basic optimization of the database or SQL may not be the ultimate result, we can use a read-write separation strategy to change the status quo. Read-write separations are now heavily used in many large Web sites, and this technology is not surprising. ebay is doing very well. ebay uses Oracle, and I hear it's usedQuest Share Plex to achieve master-slave replication data.

read-write separation is simply the database read and write operations to separate the corresponding database server, so as to effectively reduce the database pressure, but also to reduce the IO pressure. The main database provides write operations, from the database to provide read operations, in fact, in many systems, mainly read operations. When the primary database is written, the data is synchronized to the database from which the database integrity can be effectively guaranteed. Quest Shareplex is a comparison of cattle synchronization data tools, heard than the flow of Oracle itself is good, MySQL also has its own synchronous data technology. MySQL replicates data as long as it is binary log. Replication data is achieved through the logging of duplicate primary databases from the database. The good thing about this replication is that the data is synchronized to the database from the asynchronous method.

after the primary database is synchronized to the slave database, it is generally composed of multiple databases from the database in order to alleviate the stress. How does the read operation be assigned to the database? The read operation should be assigned to the server based on the pressure of the server, rather than a simple random allocation. MySQL provides mysql-proxy for read and write separation operations. But Mysql-proxy seems to be a long time not updated. Oracle can efficiently allocate pressure to read from the database through F5.



ebay's Read and write separation (found on the internet to use it)


MySQL read-write separation
the above-mentioned database synchronous replication, all in the same database, if I want to synchronize Oracle data to MySQL, in fact, the reason to implement this scenario is very simple, MySQL free, Oracle is too expensive. Seems Quest Shareplex also can not realize change function bar. It seems that there is no such tool in the market now. So how does data synchronization happen? In fact, we can consider ourselves to develop a set of synchronous data components, through the message to achieve asynchronous replication data. In fact, this implementation to consider many aspects of the problem, high concurrency problems, failure records and so on. In fact, this method can also synchronize the data to memcache . I heard that Oracle's stream can be implemented, but I haven't tried it.

Database read/write separation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.