Otter-Introduction 1 (Introduction to Otter, an open source project in Ali)

Otter-Introduction 1 (Introduction to Otter, an open source project in Ali)

foreword

Woo la la la la! Today, the author is here to open the pit again. This time, the object of the open pit is Otter, an open source project of Alibaba. Otter is a data synchronization solution that can solve the data synchronization between local, cross-network, cross-machine room and cross-region. It has considerable efficiency, web management tools and other characteristics, and the background is also very good. It is said that the synchronization requirements of the local/remote computer room within Ali B2B are basically all otter.

attach:

Meow's blog: w-blog.cn

Otter project address: https://github.com/alibaba/otter

Otter document address: https://github.com/alibaba/otter/wiki

1. What is Otter

Ottter is a data synchronization product open sourced by Alibaba Dad . Its original purpose is to solve the double-A architecture of the cross-border computer room, and the scenarios can be written on both sides. The development time has continued from July 2011 to the present. Currently, Alibaba B2B internal The synchronization requirements of the local/remote computer room are basically all Otter.

Otter is based on database incremental log parsing and supports mysql/oracle database synchronization. In the latest v4.2.13, it already supports mysql5.7 and the RDS database provided by Alibaba Cloud (the gospel of using RDS children's shoes)

working principle

The following figure is about the Otter operation schematic diagram:

More key elements in the above figure are introduced

  • db : the data source and the library to be synchronized to
  • Canal : User gets database incremental log
  • manager : configure synchronization rules, set data source synchronization sources, etc.
  • zookeeper : Coordinate nodes to coordinate work
  • node : responsible for task processing and processing the received part of the synchronization work

characteristic

The author summarizes some of the features of Otter:

  • Using pure JAVA development, the time and resources are relatively high
  • Obtain database incremental logs based on Canal. Canal is another open source product of Alibaba Dad .
  • 使用manager(web管理)+node(工作节点),manager负责配置监控,node负责处理任务
  • 基于zookeeper,解决分布式状态调度的,允许多node节点之间协同工作
  • 使用aria2多线程传输技术,对网络依赖带宽依赖较低

2. Otter能解决什么问题

技术最终是解决业务问题的,不然还是耍流氓!我们来一同看看 Otter 到底能解决我们在开发中遇到的那些场景中的问题

异构库同步

Otter支持从Mysql同步到Mysql/oracle,我们可以把mysql同步到oracle

单机房同步

可以作为一主多从同步方案,对于单机房内网来说效率非常高,还可以做为数据库版本升级,数据表迁移,二级索引等这类功能

异地机房同步

异地机房同步可以说是Otter最大的亮点之一,可以解决国际化问题把数据从国内同步到国外来提供用户使用,在国内场景可以做到数据多机房容灾

双向同步

双向同步是在数据同步中最难搞的一种场景,Otter可以很好的应对这种场景,Otter有避免回环算法和数据一致性算法两种特性,保证双A机房模式下,数据保证最终一致性

文件同步

站点镜像,进行数据复制的同时,复制关联的图片,比如复制产品数据,同时复制产品图片

3. 总结

今天我们简单的了解了一下关于Otter是一个什么样子的软件,它可以解决什么问题,下一节将会介绍如何搭建zookeeper和manager管理工具,那么谢谢大家的支持我们下节再见!

注:笔者能力有限有说的不对的地方希望大家能够指出,也希望多多交流!

 

http://blog.csdn.net/u011142688/article/details/52046928

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326709229&siteId=291194637