-
摘要:
随着民航客票运价搜索系统业务的快速发展,系统集群内部网络流量规模不断增长。为了在高负载网络流量场景下,实现集群内部数据同步,提出基于Gossip协议的集群数据同步方案。所提方案从网络协议的传输层和应用层着手设计,在传输层使用用户数据报协议(UDP)来减少集群中节点间的连接数量和交互次数,从而实现数据在网络传输过程中的低流量、低耗时。在应用层使用Gossip传播协议来实现数据的最终一致性,保证数据传输的可靠性。通过传输层UDP传输协议和应用层Gossip传播协议相结合,保证了集群监控过程中数据同步的高效性和可靠性。
Abstract:With the rapid development of the civil aviation ticket fare search system business, the internal network traffic scale of the search system cluster continues to grow. Under high-load network traffic, a cluster data synchronization scheme based on the Gossip protocol was developed. This solution is designed from the transport layer and application layer of the network protocol and uses the user datagram protocol (UDP) transmission protocol in the transport layer to reduce the number of connections and interactions between cluster nodes in order to achieve low traffic and low data consumption during network transmission. At the application layer, the Gossip propagation protocol is used to achieve eventual consistency of data and ensure the reliability of data transmission. In the cluster monitoring process, the effectiveness and dependability of data synchronization are guaranteed by the combination of the Gossip propagation protocol at the application layer and the UDP transmission protocol at the transport layer.
-
表 1 验证环境配置
Table 1. Verify environment configuration
参数 配置 编程语言 Java 操作系统 Linux Redhat v6.5 主机类型 X86服务器 CPU核数 16Core 内存 512 GB 硬盘 3T SSD 集群网络 万兆局域网 Node数量 100台 表 2 Gossip协议关键评估指标
Table 2. Gossip Protocol Key Performance Metrics
轮次 一致概率/% 收敛周期/轮 容错率/% 1 000 98.8 3.2 99.8 2 000 99.9 2.9 100 3 000 100 2.8 99.9 4 000 99.9 3.1 98.7 5 000 99.6 2.2 99.3 6 000 99.7 2.4 98.9 7 000 100 2.5 98.8 8 000 100 3.0 100 9 000 99.9 2.7 99.9 10 000 100 2.6 100 -
[1] 张宏海, 彭明田, 刘开胜. 基于价格导向的民航运价搜索方案设计[J]. 中国民航大学学报, 2020, 38(3): 40-44. doi: 10.3969/j.issn.1674-5590.2020.03.008ZHANG H H, PENG M T, LIU K S. Design of price-based airfare search method[J]. Journal of Civil Aviation University of China, 2020, 38(3): 40-44(in Chinese). doi: 10.3969/j.issn.1674-5590.2020.03.008 [2] 王成全. 基于UDP的消息即时传输系统的研究与设计[J]. 信息技术, 2008(7): 162-164. doi: 10.3969/j.issn.1009-2552.2008.07.050WANG C Q. Study and design of real-time message transmission system based on UDP[J]. Information Technology, 2008(7): 162-164(in Chinese). doi: 10.3969/j.issn.1009-2552.2008.07.050 [3] 刘锦江, 范洪博, 高志伟. 基于Gossip网络协议的前置消息验证[J]. 信息技术, 2022(7): 109-113.LIU J J, FAN H B, GAO Z W. Gossip network protocol-based pre-message authentication[J]. JInformation Technology, 2022(7): 109-113(in Chinese). [4] BAKER B, SHOSTAK R. Gossips and telephones[J]. Discrete Mathematics, 1972, 2(3): 191-193. doi: 10.1016/0012-365X(72)90001-5 [5] HEDETNIEMI S M, HEDETNIEMI S T, LIESTMAN A L. A survey of gossiping and broadcasting in communication networks[J]. Networks, 1988, 18(4): 319-349. doi: 10.1002/net.3230180406 [6] BOYD S, GHOSH A, PRABHAKAR B, et al. Analysis and optimization of randomized gossip algorithms[C]//Proceedings of the 43rd IEEE Conference on Decision and Control. Piscataway: IEEE Press, 2004: 5310-5315. [7] WEATHERSPOON H, MIRANDA H, IWANICKI K, et al. Gossiping over storage systems is practical[J]. ACM SIGOPS Operating Systems Review, 2007: 41(5): 75-81. [8] DEMERS A, GREENE D, HOUSER C, et al. Epidemic algorithms for replicated database maintenance[J]. Acm Sigops Operating Systems Review, 1988, 22(1): 8-32. doi: 10.1145/43921.43922 [9] MARK J, ALBERTO M, OZALP B. T-Man: Gossip-based fast overlay topology construction[J]. Computer Networks, 2009, 53(13): 2257-2258. doi: 10.1016/j.comnet.2009.04.006 [10] NAOHIRO H, MAKOTO T. Design of the notification system for failure detectors[J]. International Journal of High Performance Computing and Networking, 2009, 6(1): 25-34. doi: 10.1504/IJHPCN.2009.026289 [11] BOYD S, GHOSH A, PRABHAKAR B, et al. Randomized Gossip algorithms[J]. IEEE Transactions on Information Theory, 2006, 52(6): 2508-2530. doi: 10.1109/TIT.2006.874516 [12] GIUSEPPE D, DENIZ H, MADAN J, et al. Dynamo: amazon's highly available key-value store[J]. Symposium on Operating Systems Principles, 2007, 41(6): 205-220. [13] 李明, 贾智平. 基于TCP/IP的分布式监控系统的研究与开发[J]. 计算机工程与应用, 2002, 38(16): 150-153. doi: 10.3321/j.issn:1002-8331.2002.16.052LI M, JIA Z P. Research and development of distributed monitoring and control system based on TCP/IP protocol[J]. Computer Engineering and Applications, 2002, 38(16): 150-153(in Chinese). doi: 10.3321/j.issn:1002-8331.2002.16.052 [14] 王继刚, 顾国昌, 徐立峰, 等. 可靠UDP数据传输协议的研究与设计[J]. 计算机工程与应用, 2006, 42(15): 113-116. doi: 10.3321/j.issn:1002-8331.2006.15.034WANG J G, GU G C, XUN L F, et al. Research and design of reliable data transfer based on UDP[J]. Computer Engineering and Applications, 2006, 42(15): 113-116(in Chinese). doi: 10.3321/j.issn:1002-8331.2006.15.034 [15] 刘德辉, 尹刚, 王怀民, 等. 分布环境下的Gossip算法综述[J]. 计算机科学, 2010, 37(11): 24-28. doi: 10.3969/j.issn.1002-137X.2010.11.005LIU D H, YIN G, WANG H M, et al. Overview of Gossip algorithm in distribute system[J]. Computer Science, 2010, 37(11): 24-28(in Chinese). doi: 10.3969/j.issn.1002-137X.2010.11.005 [16] 张国印, 李军, 王向辉, 等. 一种基于移动P2P改进的Gossip算法[J]. 计算机科学, 2013, 40(9): 103-105. doi: 10.3969/j.issn.1002-137X.2013.09.021ZHANG G Y, LI J, WANG X H, et al. Improved Gossip algorithm based on mobile P2P networks[J]. Computer Science, 2013, 40(9): 103-105(in Chinese). doi: 10.3969/j.issn.1002-137X.2013.09.021 [17] 李燚, 顾乃杰, 黄增士, 等. Redis集群可靠性的研究与优化[J]. 计算机工程, 2018, 44(5): 40-46.LI Y, GU N J, HUANG Z S, et al. Research and optimization of redis cluster reliability[J]. Computer Engineering, 2018, 44(5): 40-46(in Chinese). [18] 王峰, 李立新, 曹景源, 等. 发布/订阅系统中的缓存副本一致性研究[J]. 计算机应用, 2016, 36(6): 1510-1514. doi: 10.11772/j.issn.1001-9081.2016.06.1510WANG F, LI L X, CAO J Y, et al. Research on replication consistency of cache in publish/subscribe systems[J]. Journal of Computer Applications, 2016, 36(6): 1510-1514(in Chinese). doi: 10.11772/j.issn.1001-9081.2016.06.1510 [19] 杨永凯, 彭明田, 王炜东. 集群内高效可靠的数据文件分发方案的设计[J]. 计算机技术与发展, 2019, 29(11): 163-167. doi: 10.3969/j.issn.1673-629X.2019.11.033YANG Y K, PENG M T, WANG W D. Design of effcient and reliable data file distribution solution in cluster[J]. Journal of Computer Applications, 2019, 29(11): 163-167(in Chinese). doi: 10.3969/j.issn.1673-629X.2019.11.033 -


下载: