Databases Reference
In-Depth Information
Tungsten is an open source middleware replication product written in Java. It has sim-
ilarities to Oracle GoldenGate and seems poised to gain a lot of sophisticated features
in future releases. At the time of writing, it already offers features such as replicating
data between servers, sharding data automatically, applying changes in parallel on rep-
licas (multithreaded replication), promoting a replica if a master fails, cross-platform
replication, and multisource replication (many sources replicating to a single destina-
tion). It is the open source version of the Tungsten Enterprise database clustering suite,
which is commercial software from Continuent.
Tungsten also implements multimaster clusters, where writes can be directed to any
server in the cluster. A generic implementation of this architecture requires conflict
detection and/or resolution. This is very hard, and it isn't always what is needed. In-
stead, Tungsten provides a slightly limited implementation wherein not all data is
writable on all nodes; instead, each node is tagged as the system of record for specific
bits of data. This means that, for example,the Seattle office can own and write to its
data, which is replicated to Houston and Baltimore. In Houston and Baltimore, the
data is available locally for low-latency reads, but Tungsten prevents it from being
written to, so conflicting updates are not possible. Houston and Baltimore can update
their own data, of course, which is also replicated to each of the other locations. This
“system of record” approach solves a need that people frequently try to satisfy with
MySQL's built-in replication in a ring, which, as we've discussed, is far from safe or
robust.
Tungsten Replicator doesn't just plug into or manage MySQL replication; it replaces
it. It captures data changes on servers by reading their binary logs, but that's where the
built-in MySQL functionality stops and Tungsten Replicator takes over. It reads the
binary logs and extracts the transactions, then executes them on the replicas.
This process has a richer feature set than MySQL replication does. In particular, Tung-
sten Replicator was the first to offer parallel replication apply for MySQL. We haven't
seen it in production yet, but it's claimed to offer up to a threefold improvement in
replication speed, depending on the workload characteristics. This seems credible to
us, based on the architecture and what we know of the product.
Here are some things we like about Tungsten Replicator:
• It provides built-in data consistency checking. Enough said.
• It offers a plugin capability so you can write your own custom functionality.
MySQL's replication source code is very hard to understand and harder to modify.
Even very talented programmers have introduced bugs into the server when've they
tried to modify the replication code. It's nice to have an option to change replication
without changing the MySQL replication code.
• There are global transaction IDs, which enable you to figure out the state of servers
relative to each other without trying to match up binary log names and offsets.
 
Search WWH ::




Custom Search