簡易檢索 / 詳目顯示

研究生: 董仲愷
Tung, Chung-Kie
論文名稱: Open WebMail: 一個基於伺服機群的網頁郵件系統
Open WebMail: A Server Group Based Scalable Webmail System
指導教授: 蔡尚榮
Tsai, Shong-Rong
學位類別: 博士
Doctor
系所名稱: 電機資訊學院 - 電機工程學系
Department of Electrical Engineering
論文出版年: 2005
畢業學年度: 93
語文別: 英文
論文頁數: 104
中文關鍵詞: 網頁郵件國際化防垃圾信萬國碼防毒MIME字集郵件叢集伺服器容錯高可用度負載平衡
外文關鍵詞: server cluster, antivirus, fault tolerant, internationalization, Unicode, charset, MIME, webmail, antispam, mail, load balancing, high availability
相關次數: 點閱:139下載:1
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  •   網頁郵件已經成為網際網路最受歡迎的服務之一。在這篇論文中
    我們探討了一個基於伺服機組網頁郵件系統的設計與實作。
    這個系統包含了兩個主要元件,分別是 SG Cluster 與 Open WebMail。

      SG Cluster讓系統管理者能夠替大多數現有的應用建立具有負載分散與容錯能力的高可用度叢集。一個標準的 SG Cluster 通常包含一到兩個的負載分散器和數部後端伺服器。對於外部的世界來說,整個 SG Cluster 看起來就像是單一部伺服主機。負載分散器會根據後端伺服器的負載狀況與可用情形將使用者端要求分散到這些伺服器上。 我們介紹了用來做負載分散器容錯的 bidding 通訊協定,並且探討了 SG Cluster 中的讀寫模型,負載分散策略與容錯方法。

      Open WebMail 這套網頁郵件系統的設計目標是以有效率的記憶體運用方式來處理大型的信件匣,同時提供足夠多的功能讓原本 Microsoft Outlook 的使用者能夠容易地轉移過來。由於網頁郵件系統可能會面對來自各個不同地方的大量使用者,因此系統效能與國際化成為 Open WebMail 設計中的兩個重要議題。我們介紹了 Open
    WebMail 中幾個用來增進系統效能的方法,並且探討了 Unicode 與 iconv()在字集編碼轉換時會碰到的問題,以及說明 Open WebMail 中如何處理字集編碼轉換。

      最後,我們建立了一個包含兩個負載分配器與三個伺服器節點的 Open WebMail 叢集,效能測試顯示在伺服器節點增加時,系統的反應時間與錯誤發生率都明顯地的減少與降低,代表SG Cluster 的確能有效地提高 Open WebMail 系統可變尺度能力。

     WebMail has become one of the most popular services on the Internet. In
    this dissertation, we have discussed the design and implementation of a
    server group based scalable webmail system which contains two major
    components: the SG Cluster and the Open WebMail.

     The SG Cluster enables the system administrator to create load
    balancing, fault tolerant and high availability cluster for most existing
    applications easily. A typical SG Cluster contains one or two load
    balancers and several back-end servers; however, the whole cluster looks
    like a single server from the outside world. The load balancer is
    responsible for distributing the client requests to the backend servers
    based on their availability and load status. We have described the bidding
    protocol used to do load balancer failover. And the read/write model, load
    balancing policies and fault tolerant methods supported by the SG Cluster
    are also discussed.

     The Open WebMail is targeted is to manage very large mail folder files
    in a memory efficient way. It also provides a range of features to help
    users migrate smoothly from Microsoft Outlook. As a webmail system may face
    a lot of users which come from different locations, so both the performance
    and the internationalization are two important issues in the design of Open
    WebMail. Several methods used to speedup the Open WebMail performance are
    described, The problems of the Unicode and the iconv() function in the
    encoding conversion have been addressed, and we show how the encoding
    conversion is used in the Open WebMail.

     Finally, we setup an Open WebMail Cluster with two load balancers and
    three server nodes. The benchmark shows the SG Cluster does improve the
    scalability of the Open WebMail system. For the same number of concurrent
    clients, the response time and the error rate are reduced when the number
    of server node is increased.

    1. Introduction.......................................................1 1.1. Motivations......................................................1 1.2. Design Goal......................................................4 1.2.1. The Design Goals of The Load Balancer..........................4 1.2.2. The Design Goal of the Webmail Program.........................5 1.3. Organization of This Thesis......................................7 2. Related Work and Background Survey.................................8 2.1. Related Work in Scalable Server Cluster..........................8 2.1.1. Cluster Based on Round Robin Domain Name Service (RR-DNS) - NCSA Scalable Web Server [15]..................................8 2.1.2. Cluster Based on Network Address Translation (NAT) - Berkeley.s MagicRouter [1], Cisco.LocalDirector [4]............9 2.1.3. Cluster Based on IP Tunneling - Linux Virtual Servers [40]....11 2.1.4. Cluster Based on Direct Routing - ONE-IP [6], IBM Network Dispatcher [10], Linux Virtual Server [40]........12 2.1.5. Cluster Based on Distributed Packet Rewriting (DPR) [3].......13 2.1.6. Cluster of Content Based Scheduling [30]......................14 2.2. Definition of Components in Mail System.........................15 2.3. Two Types of Webmail System.....................................15 2.3.1. Access through POP3/IMAP Protocol.............................16 2.3.2. Direct Access to The Mail Folder File.........................17 2.4. Antispam / Antivirus Mechanisms in Mail System..................17 2.4.1. Possible Locations for Filters in Mail System.................18 2.4.2. Mail Filtering in SMTP Session................................19 2.4.3. Middleware between MTA and Mail Filter Program................20 2.4.4. Mail Filtering in MDA.........................................22 3. SG Cluster........................................................23 3.1. Introduction....................................................23 3.2. Overview of The SG Cluster......................................24 3.2.1. SG Cluster in NAT Mode........................................24 3.2.2. SG Cluster in Direct Reply Mode...............................26 3.2.3. Major Components in SG Cluster................................28 3.3. NATD and IP Packet Flow.........................................30 3.4. Bidd............................................................30 3.4.1. Why Using Multicast for Bidd Communication....................31 3.4.2. Command Line Syntax...........................................31 3.4.3. State Transition in Bidd......................................32 3.5. The Read / Write Model..........................................32 3.5.1. Select Any....................................................33 3.5.2. Read One / Write All..........................................33 3.5.3. Read First / Write All........................................34 3.6. The Multicast Service...........................................35 3.6.1. Packet Analyzer API...........................................36 3.6.2. Multicast Service Support Routine.............................37 3.6.3. Feedback Protocol.............................................37 3.6.4. Problem in Using Multicast....................................39 3.7. Load Balancing in SG Cluster....................................40 3.7.1. Load Balancing Policies.......................................40 3.7.2. Link Creation.................................................40 3.7.3. Load Calculation..............................................41 3.7.4. Keep Same Server in Server Selection..........................41 3.8. Fault Tolerance in SG Cluster...................................42 3.8.1. Packet Snoop..................................................43 3.8.2. Porttest......................................................43 3.8.3. Heartbeat Monitor.............................................45 3.8.4. Multicast Write Result Comparison.............................45 3.8.5. Server Status Transition......................................46 3.9. Protection against Deny-Of-Service Attack through Rate Limitation......................................................47 3.9.1. How DOS Attack Works..........................................47 3.9.2. Protection against DOS Attack through Rate Limitation.........47 3.9.3. Connection Rate Calculation...................................48 3.10. Performance Evaluation.........................................48 3.10.1. The Result of Different Number of Servers in NAT Mode........49 3.10.2. The Result of Different Load Balancing Policy................50 3.10.3. The Result of Different Load Balancer in NAT Mode and DirectReply Mode.............................................51 4. Open WebMail......................................................53 4.1. System Overview.................................................54 4.1.1. The Interaction between Open WebMail and The Mail System......54 4.1.2. The Modules in Open WebMail...................................55 4.2. Performance Tuning..............................................56 4.2.1. Speedup The Folder Access.....................................56 4.2.2. Keep The CGI Process Persistent Running.......................59 4.2.3. Parsing MIME Sub Tree on Demand...............................64 4.2.4. HTTP Compression..............................................65 4.2.5. Web Cache Directive...........................................66 4.3. Internationalization............................................66 4.3.1. Character Set and Encoding [37]...............................66 4.3.2. Three Levels of Internationalization Support..................67 4.3.3. Encoding Conversion...........................................68 4.3.4. String Escape.................................................71 4.3.5. Encoding Processing When Passing Data between CGI and Form. ..72 4.3.6. Right To Left Language........................................73 4.3.7. Timezone and Day Light Saving [5].............................74 4.3.8. Other Minor Issues............................................75 4.4. Flexibility.....................................................75 4.4.1. Multiple Level Configuration..................................75 4.4.2. External Modules..............................................76 4.5. Antispam and Antivirus Support..................................76 4.5.1. Repeat-Message Filter.........................................77 4.5.2. Faked-SMTP Filter.............................................77 4.5.3. Faked-From Filter.............................................78 4.5.4. Faked-EXE-Content-Type Filter.................................78 4.5.5. Html Message Reading Protection...............................79 4.5.6. Integration with External Spam Filter and Virus Scanner.......80 5. Performance measurement...........................................82 5.1. Measurement Environment.........................................82 5.2. Measurement Result..............................................83 5.2.1. Response Time vs. Number of Clients of A Single Server........83 5.2.2. Response Time vs. Number of Clients in Different Load Balancing Policies............................................84 5.2.3. Performance Improvement of Using The SG Cluster...............85 6. Future Work.......................................................87 7. Conclusion........................................................88 Appendix I The Group and Server Properties in The SG Cluster.........90 Appendix II Features of Open WebMail.................................94 Reference...........................................................102

    [1] E. Anderson, D. Patterson and E. Brewer (1996). .The Magicrouter: An
    Application of Fast Packet Interposing.. Second Symposium on Operating
    Systems Design and Implementation.
    http://www.cs.berkeley.edu/~eanders/projects/magicrouter/

    [2] AntiPhishng - http://www.antiphishing.org/

    [3] Azer Bestavros, Mark Crovella, Jun Liu and David Martin (1998).
    Distributed Packet Rewriting and its Application to Scalable Server
    Architectures. Boston, MA, Boston University.
    http://citeseer.nj.nec.com/54392.html

    [4] Inc. Cisco Systems (2001). Cisco LocalDirector Configuration and Command
    Reference Guide.
    http://www.cisco.com/univercd/cc/td/doc/product/iaabu/localdir/ldv42/421g
    uide/i ndex.htm

    [5] Day Light Saving - http://www.energy.ca.gov/daylightsaving.html

    [6] Om P. Damani, P. Emerald Chung and Yennun Huang (1997). .ONE-IP:
    Techniques for Hosting a Service on a Cluster of Machines. Computer
    Networks and ISDN Systems 29(8--13): 1019--1027.
    http://www.scope.gmd.de/info/www6/technical/paper196/paper196.html

    [7] K. Egevang and P. Francis (1994). The IP Network Address Translator
    (NAT), RFC 1631. http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1631.html

    [8] NeoMail - http://www.neomail.org/

    [9] FastCGI - http://www.fastcgi.com/

    [10] Chris Gage (2000). White paper, IBM Network Dispatcher Version 3.0

    [11] George Gousios, Diomidis Spinellis, "A comparison of Portable Dynamic
    Web Content Technologies for the Apache Server", 3rd International
    System Administration and Networking Conference Proc. P 103-119,
    Maastricht, The Netherlands, May 2002

    [12] Greylist - http://projects.puremagic.com/greylisting/

    [13] IMP Mail Client - http://www.horde.org/imp/

    [14] ISC - http://www.isc.org/index.pl?/ops/ds/

    [15] Eric Dean Katz, Michelle Butler and Robert McGrath (1994). "A Scalable
    HTTP Server: The NCSA Prototype." Computer Networks and ISDN Systems
    27:155-164.

    [16] mod_perl - http://perl.apache.org/

    [17] C. Perkins (1996). IP Encapsulation within IP, RFC 2003.
    http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2003.html

    [18] Postgrey - http://isg.ee.ethz.ch/tools/postgrey/

    [19] http://perl.apache.org/docs/1.0/guide/index.html

    [20] http://httpd.apache.org/docs-2.0/mod/prefork.html

    [21] Procmail - http://www.procmail.org

    [22] RFC2045 - Multipurpose Internet Mail Extensions (MIME) Part 1: Format
    of Internet Message Bodies

    [23] RFC2046 - Multipurpose Internet Mail Extensions (MIME) Part 2: Media
    Types

    [24] RFC2047 - MIME (Multipurpose Internet Mail Extensions) Part 3: Message
    Header Extensions for Non-ASCII Text

    [25] RFC2048 - Multipurpose Internet Mail Extensions (MIME) Part 4:
    Registration Procedures

    [26] RFC2049 - Multipurpose Internet Mail Extensions (MIME) Part 5:
    Conformance Criteria and Examples

    [27] RFC821 - Simple Mail Transfer Protocol. J. Postel. Aug-01-1982.

    [28] RFC1939 - Post Office Protocol - Version 3. J. Myers & M. Rose. May
    1996

    [29] RFC2060 - Internet Message Access Protocol - Version 4rev1. M. Crispin.
    December 1996.

    [30] Trevor Schroeder, Steve Goddard and Byrav Ramamurthy (2000). .Scalable
    Web Server Clustering Technologies.. IEEE Network May/June : 38- 45.
    http://www.ece.eng.wayne.edu/~czxu/ece7995/reading/ServerReview-
    Schroeder.pdf

    [31] SpeedyCGI - http://daemoninc.com/SpeedyCGI/

    [32] SqWebMAil - http://www.inter7.com/sqwebmail/sqwebmail.html

    [33] Squirrel Mail - http://www.squirrelmail.org

    [34] TCP/IP Illustrated, Volume2, Wright Stevens, Addison Wesley, Chapter 2

    [35] The Web Information Gateway - http://twig.screwdriver.net/

    [36] Throttle Httpd - http://www.acme.com/software/thttpd/notes.html#nbio

    [37] http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf

    [38] http://www.unicode.org/standard/WhatIsUnicode.html

    [39] J.Almeida, P.Cao., "Measuring proxy performance with the Wisconsin
    proxy bench mark", Technical Report 1373, Computer Science Dep. Univ. of
    Wisconsin-Madison, 1998.

    [40] Wensong Zhang, Shiyao Jin and Quanyuan Wu (1999). Creating Linux
    Virtual Servers. LinuxExpo 1999 Conference, Linux Virtual Server
    Project. http://www.linuxvirtualserver.org/linuxexpo.html

    下載圖示 校內:立即公開
    校外:2005-07-13公開
    QR CODE