Research and Implementation of Persistent Connection Mutilplexing of TCP Based on HAProxy

Author
ZhouShaoTao
Advisor
XuJieBin
School
South China University of Technology
Major
Applied Computer Technology
Classification
TP393.05 Network equipment
Degree
Master's thesis
Year
2011
Downloads
59
Citations
0

Request the full text

Abstract

High real-time , high concurrency WEB IM is very distinctive characteristics and indicators . Due to the limitations of the HTTP protocol , a \Consider browser support in the actual project can only be used the mainstream \However , Comet Long Polling is not a real HTTP long connection , it will still be disconnected in response to data transmission after , then rebuild new connection to receive the next data needed to detect the connection viable environment brought severe memory resources issues , thereby affecting the throughput of the server , the number of connections to become the bottleneck of the scale . Proceed from memory recovery mode and the number of connections , and comparative analysis of the respective solutions , eventually combined with the existing infrastructure environment and business needs , TCP long connection multiplexing model , and compare a variety of load balancing software , select transformation HAProxy to implement this model , i.e. via a plurality of sessions multiplexed onto the connection between the server , thereby significantly reducing the quantity of the long connection , under the conditions to meet real-time requirements , improve the load capacity of the server , and ultimately decreases the server input costs . The TCP long connection technology model is divided into three modules : the long connection management module , the heartbeat detection module , custom protocol processing module . Including the long connection management module is responsible for creating the connection pool to manage connections , the heartbeat detection module is responsible for detecting long connection is still available , but custom protocol module is the solution to correctly handle the request / response . In this paper, a large e-commerce company Web Messenger project as an experimental platform for the study includes reading HAProxy source familiar with its processes and existing module , transformation design and implementation, the transformation of the before and after results contrast . Message mechanism study covers the linux kernel , linux I / O multiplexing , Socket network communication session sticky load balancing algorithm , HTTP protocol analysis .

Table of contents

Abstract 5-6 Abstract 6-11 first chapter 11-15 1.1 Background and Significance 11-13 1.1.1 Background 11-12 1.1.2 research significance 12-13 1.2 This paper work content 13 organizational structure 1.3 papers 13-15 Chapter Two key technologies and research status quo 15-33 2.1 HTTP protocol 15-16 2.2 \ 2.2.1 Flash XML Socket 16-17 2.2.2 Comet 17-20 2.2.3 WebSocket 20-21 2.2.4 Comparative Analysis 21 2.3 connection keepalive technology 21-24 2.3.1 abnormal disconnect reason 22 2.3.2 detects connection disconnection 22-23 2.3.3 keepalive processing 23-24 2.4 JVM memory management technology 24-29 2.4.1 the JVM About 24 2.4.2 JVM memory structure 24-26 2.4.3 JVM memory allocation 26 2.4.4 JVM memory reclamation 26-28 2.4.5 JVM memory overflow 28 2.4.6 intractable GC problem 28-29 2.5 long connection multiplexing 29-31 2.5.1 short connection 29 2.5.2 long connection 29-30 2.5.3 Use 30 2.5.4 connection multiplexing 30-31 2.6 two categories Solutions 31-32 2.7 This chapter Summary 32-33 long connection multiplexing model 33-44 3.1 long connection multiplexing model 33-34 3.2 heartbeat module 34-36 3.2.1 Background goals 34 3.2.2 state properties 34-35 3.2.3 operation (algorithm) 35-36 3.3 custom protocol analysis module 36-40 3.3.1 Background goals 36-38 3.3.2 state properties 38 3.3.3 operation (algorithm) 38-40 3.4 long connection management module 40-42 3.4.1 Background goals 40 3.4.2 state properties 40 3.4.3 operation (algorithm) 40-42 3.5 applications 42-43 3.6 This chapter Summary 43-44 Chapter HAProxy-based long the TCP connection multiplexing scheme 44-52 4.1 common architecture 44-45 4.2 load balancing software 45-49 4.2.1 LVS 45 4.2.2 Nginx 45-46 4.2.3 HAProxy 46-48 4.2.4 Comparative Analysis 48-49 4.3 Feasibility Analysis 49-50 4.3.1 theoretical feasibility analysis 49-50 4.3.2 feasibility analysis 50 4.4 This chapter Summary 50-52 the experimental platform design and implementation 52-62 5.1 HAProxy existing connection management approach 52-55 5.1.1 HAProxy data flow diagram 52 5.1.2 several terminology 52-54 5.1.3 Data processing 54-55 the 5.1.4 original connection management approach 55 5.2 ideas 55 5.3 system and outline design 55-56 5.4 core module design and implementation of 56-61 5.4.1 data structure 56 5.4.2 heartbeat module 56-57 5.4.3 connection management module 57-59 5.4.4 custom protocol module 59 5.4.5 configuration file 59-61 5.5 Chapter Summary 61-62 Chapter experiments results and analysis 62-71 6.1 pressure measurement environment introduced 62-63 6.1.1 Pressure measurement environment 62 6.1.2 environment configuration 62-63 6.1.3 experimental environment Description 63 6.2 Experimental data and indicators introduced 63-66 6.2.1 the indexes 63-64 6.2.2 QPS pressure measurement script 64 6.2.3 long pressure measurement of the number of connections script 64-66 6.3 Experimental results and analysis 66-70 6.3.1 single server users 66-67 6.3.2 HAProxy QPS 67-70 6.4 This chapter Summary 70-71 summarize 71-72 the References 72-74 Acknowledgements 74

Related dissertations

  1. Research and Implementation of the Microblogging Content Distribution System
    WangZhenXing ·Tianjin University ·2012 ·Master's thesis
  2. Research and application of pushing send technology of server cluster based on
  3. Packet Scheduling Algorithms in Femtocell and LTE Network System
    ZuoYouWei ·Tianjin University ·2012 ·Master's thesis
  4. Research and Implement of HTTP Persistent Connection Based Message Push Platform
  5. Research and Development of Push Engine Based on Context-aware
    YangYang ·Shanghai Jiaotong University ·2013 ·Master's thesis
  6. Ontology Knowledge Based Question-Answering and Web Service Push System for Mobile Platform
    YanYouJun ·Nanjing University ·2013 ·Master's thesis
  7. The Research and Realization of the Key Technology in Enterprise E-Training System
    ZouChunGang ·Hunan University ·2011 ·Master's thesis
  8. Research on Scheduling Algorithm in LTE-A System with Carrier Aggregation
    FanWenPeng ·Chongqing University ·2012 ·Master's thesis
  9. Dynamic resource allocation in multiuser MIMO-OFDM system and limited feedback technology research
    CaoHuan ·Shanghai Normal University ·2012 ·Master's thesis
  10. Research on the System Optimization and the Access Schemes for the Wireless Access Networks
  11. Real-time Web Applications Based on Server Push and Event Stream Processing
    XueZhenZhen ·Zhejiang University ·2008 ·Master's thesis
  12. System based on J2EE architecture design and implementation monitoring platform
  13. Comparison of Rich Client Implementation for Bond Trading System
    ZhouKai ·Zhejiang University ·2007 ·Master's thesis
  14. cdma2000 1x EV-DV system Packet Scheduling Algorithm
    PanYongChao ·Southeast University ·2005 ·Master's thesis
  15. Studies on TFC Selection Algorithms in HSUPA Systems
    ZhangChongZheng ·Southeast University ·2006 ·Master's thesis
  16. IEEE802.16 -based OFDMA uplink packet scheduling algorithm research
  17. Storage virtualization system design and implementation of data transmission
  18. Research on Cooperative Communication System Based on Network Coding
  19. Research on Graphical Modeling of Electrical Equipment and Real-time Information Transmission Technology
  20. Cognitive radio based multi-node cooperative spectrum detection