基于MongoDb的分布式高并发日志系统的设计
Design of Distributed and High Concurrency Log System Based on MongoDb
DOI: 10.12677/CSA.2014.411036, PDF, HTML, 下载: 3,100  浏览: 10,790 
作者: 倪时龙, 林振天:福建亿榕信息技术有限公司,福州;蔡清远, 谢海强, 李汝佳:国家电网电力科学研究院,南京
关键词: 分布式高并发大数据量日志系统Distributed High Concurrency Large Amounts of Data Log System
摘要: 日志系统是一个完整信息系统的重要组成部分,海量的日志信息一方面可以挖掘出用户的通用行为模式,提高系统的服务质量,另一方面还为系统优化,系统结构调整提供了依据,在面对高并发量的系统访问时,及时准确的收集日志成了日志分析的关键,传统日志信息的记录与业务系统代码交织,耦合过高,日志的记录因占用系统的资源进而影响正常业务系统的运行。为了改善这一现状,本文提出了一种与原业务系统零耦合的新设计方式,该方式从网络请求的负载均衡、分布式集群服务、服务中的多线程处理、和非关系型数据库MongoDb的分片拓展四个维度展开,实现了一套异步、分布、并行处理的日志记录系统,后经千万级数据量的压测,从系统吞吐能力,系统内存占用情况等多个方面证实了设计的可行性与强稳定性。
Abstract: Logging system is an important part of a complete information system. On one hand, massive log information can dig out the common behavior patterns of users to improve service quality; on the other hand, it provides a theoretical basis for system optimization and system structural adjust-ment. When faced with a high concurrency value system access, timely and accurate collection logs are the key for log analysis. Traditional log records of information have a high coupling with busi-ness system code. It affects normal business systems because of taking up system resources. In order to improve this situation, this paper presents a new design way which has zero coupling with an original business system. The way realizes a asynchronous, distributed, parallel pro- cessing log records by four parts, which are network request load balancing, distributed cluster services, services in the multi thread processing, and non relational database MongoDb shard expand. We confirmed the feasibility of the design and strong stability by analysised system memory usage and system throughput capacity after tens of millions of data compression test.
文章引用:倪时龙, 林振天, 蔡清远, 谢海强, 李汝佳. 基于MongoDb的分布式高并发日志系统的设计[J]. 计算机科学与应用, 2014, 4(11): 262-268. http://dx.doi.org/10.12677/CSA.2014.411036

参考文献

[1] 何胜韬 (2013) MongoDB数据库在网络行为分析与控制系统中的应用. 网络安全技术与应用, 5, 13-15.
[2] 徐娟娟, 朱成亮 (2011) NOSQL在WEB日志分析中的应用. 信息技术, 10, 27-28.
[3] 张文盛, 郑汉华 (2013) 基于MongoDB构建高性能网站技术研究. 吉林师范大学学报(自然科学版), 2, 124.
[4] 庄纪林 (2008) 负载均衡技术在北京大学数字图书馆门户报务中的实践和应用. 现代图书情报技术, 7, 74-77.
[5] 胡文焘 (2012) 基于NoSQL的空间数据管理系统的设计与实现. 北京中国科学院研究院, 北京.
[6] (2013) Jsonp. http://baike.baidu.com/view/2131174.htm?fr=aladdin
[7] Nedelcu, C. (2010) Nginx HTTP Server. Packt Publishing, 5, 142-144.
[8] 李鹏 (2012) 负载均衡技术在宁夏电力公司信息系统中的实现. 宁夏电力, 5, 51-54.
[9] 赵春亮, 张建国, 孟晨 (2011) 基于Struts2拦截器的日志记录的设计与实现. 计算机与现代化, 2, 150-153.
[10] 王光磊 (2011) MongoDB数据库的应用研究和方案优化. 信息科技. 中国科技信息, 20, 92-94.
[11] (2010) Round-Robin Scheduling. http://blog.163.com/s_u/blog/static/1330836720105233102894
[12] Banker, K. (2012) MongoDB实战. 北京人民邮电出版社, 北京, 2-4.
[13] 师德清 (2011) MongoDB数据库在生产环境中的分片策略研究. 信息与电脑, 10, 163-164.
[14] Wang, X.L., Chen, H.P. and Wang, Z.H. (2013) Research on Improvement of Dynamic Load Balancing in MongoDB. 2013 IEEE 11th International Conference on Dependable, Autonomic and Secure Computing, Chengdu, December 2013.
[15] Gal-Oz, N., Gonen, Y. and Gudes, E. (2011) Security Issues in NoSQL Databases. 2011 IEEE Workshop on Electronics, Computer and Applications, Changsha, November 2011.