Font Size: a A A

Erlang-based Reverse Proxy Cluster Design And Implementation

Posted on:2011-11-15Degree:MasterType:Thesis
Country:ChinaCandidate:Z XuFull Text:PDF
GTID:2208360308467091Subject:Information and Communication Engineering
Abstract/Summary:PDF Full Text Request
With the high development of the Internet, the single web server could easily turn out to be performance bottleneck due to the growing number of visitors. Constructing server cluster by the reverse proxy server can improve system performance. However, the single reverse proxy server might still be a new restrictive factor when the number of web server arrives to one point. As a result, the reverse proxy server cluster is asked to be constructed to solve this problem. But in most reverse proxy server cluster, each proxy server works independent, and can not share the information with others, that will affect the performance of the cluster.In this thesis, the background technique of proxy server as HTTP and the technique of web cache and server cluster is studied at the first place. Then Erlang language and OTP system are introduced. Finally, EDRP (Erlang Distributed Reverse Proxy) system which is used for builing a high concurrency, high availability and cooperative reverse proxy server cluster is introduced.EDRP system is constructed by three parts including reverse proxy, load dispatcher and cache management. In order to handle high concurrency connections, reverse proxy module has produced a threshold-based dynamic controlling process pool with the ultra lightweight process of Erlang. And for the convenience of expanding in the process of handing request and response, the modularized filtration is designed to realize the cache manager and security control by adding cache filter and security filter.Based on the analysis and comparison of the advantages and disadvantages of various load dispatcher models, load dispatcher module uses the collaborative load dispatcher model and adoptes the combination of both centralized and distributed management to to share the dispatching information between all the proxy servers. In the cluster, a main dispatch process is responsible for load dispatch while others serve as its backup. So it can not only decrease the cost of dispatch request but also avoid the single point of failure. Load dispatcher module has also implement diversified load dispatch algorithms to satisfy various needs and has implement the hot-swap mechanism which can swap dispatch algorithms at run-time. In order to improve the search efficiency without influence the reliablity of the whole cluster, cache management module has adopted single-layer cache architecture with the combination of both centralized and distributed management. Each proxy server in the cluster can share the cache. Cache management module also implements dynamic threshold-based adaptive TTL mechanism and the LRU-threshold strategy to ensure the weak consistency of cache and replace the cache.Finally, the concurrency test and the usability test prove that the design and implementation of the EDRP system achieve the desired objectives.
Keywords/Search Tags:Erlang, Reverse Proxy, Load Balance, Cache Management
PDF Full Text Request
Related items