📄 1387.html
字号:
图3<br>
图 3<br>
图4<br>
图 4<br>
<br>
基于 MX 的故障转移<br>
<br>
这是传统的 Sendmail/DNS 配置。DNS 中的主机名可以有一个或多个邮件交换(MX)记录。这些记录包括一个加权因子。当其它 SMTP 服务器试图将邮件传递到此主机时,它们首先寻找 MX 记录及其对应权重。当有多个 MX 记录时,会选择具有最低权重值的 MX 记录。邮件将被传递到第一个主机(该主机应答时,具有最低权重/数字)。<br>
<br>
在下例中,某个域具有两个 MX 记录,一个指向芝加哥办事处,权重为 10,另一个指向纽约办事处,权重为 20。在正常情况下,所有邮件都会经过芝加哥办事处,流经公司的 WAN,进行内部传递。<br>
<br>
如果芝加哥办事处发生故障,或者到芝加哥办事处的路由发生故障,邮件将自动经由纽约办事处传递。<br>
<br>
如果芝加哥办事处在 SMTP 事务中发生故障,那么该事务就会失败(红线)。由于 SMTP 是一个事务,因此保证了消息完整性,发送方将超时、回退,并在以后重新发送整条消息。如果芝加哥办事处仍然停机,邮件会自动流经纽约办事处。<br>
<br>
这种方法的主要优点是它是一种非常成熟的过程,有完善的文档,易于理解。另外,它只需要做少量的配置变动,而且不需要附加软件或硬件。遗憾的是,工作负载没有被平均分配,因此实际上在重负载情况下,服务也许会前后“变化不定”。MX 解决了可用性问题,但没有解决可伸缩性问题。其结果就是为了解决在高峰流量负载期间可能发生的故障,您最终要购买双份硬件。<br>
图5<br>
图 5<br>
图6<br>
图 6<br>
<br>
混合/实际情况<br>
<br>
实际解决方案趋向于上述所有技术的混合。例如,发送到 IBM 的因特网邮件被传递到以下三个地区中心之一:科罗拉多州、纽约州和北卡罗莱纳州。通过将用于故障转移的 MX 记录和循环 DNS 组合在一起,IBM 保证了快速/可靠的因特网邮件。以下是公开 DNS 记录:<br>
<br>
<br>
us.ibm.com preference = 10, mail exchanger = e22.nc.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e23.nc.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e24.nc.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e1.ny.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e2.ny.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e3.ny.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e4.ny.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e31.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e32.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e33.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e34.co.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e21.nc.us.ibm.com <br>
<br>
重复的 DNS 查询生成了 MX 首选项的循环列表:<br>
<br>
<br>
us.ibm.com preference = 10, mail exchanger = e2.ny.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e3.ny.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e4.ny.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e31.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e32.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e33.co.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e34.co.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e21.nc.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e22.nc.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e23.nc.us.ibm.com <br>
us.ibm.com preference = 10, mail exchanger = e24.nc.us.ibm.com <br>
us.ibm.com preference = 20, mail exchanger = e1.ny.us.ibm.com <br>
<br>
结果<br>
<br>
单个 SMTP 服务器<br>
测试名称 队列位置 LogLevel ShareMem Ident 传递方式 提交秒数<br>
stmpa-def 磁盘 9 否 是 异步 8.4<br>
smpta-interactive 磁盘 9 否 是 交互式 10.0<br>
smpta-noident 磁盘 9 否 否 交互式 9.7<br>
smpta-sharedmem 磁盘 9 是 是 交互式 9.8<br>
smpta-log4 磁盘 4 否 是 交互式 24.2<br>
smtpa-ramdisk RAM 9 否 是 交互式 19.4<br>
smtpa-ramdisk-log4 RAM 4 否 是 交互式 48.4<br>
smtpa-ramlog9 磁盘 9 否 是 交互式 25.8<br>
smtpa-freshlog9 磁盘 9 否 是 交互式 10.1<br>
smtpa-toeleven RAM 9 是 否 交互式 49.0<br>
<br>
由 MailStone 报告的单服务器解决方案的连接错误百分率始终是 0.0<br>
<br>
多个 SMTP 服务器<br>
<br>
对于多服务器测试,我们只使用单服务器测试的最高性能组合,观察当添加服务器时,其规模是如何增长的。对于所有多服务器测试,选项是:<br>
<br>
RAM 上的队列<br>
RAM 上的 LogLevel 9<br>
启用共享内存<br>
禁用 Ident<br>
传递方式设置成交互式<br>
测试名称 循环设备 服务器数量 提交数/秒 连接错误<br>
bigmail2-allram Alteon 2 95.9 43.1%<br>
balance2-allram Balance 2 74.6 30.1%<br>
bigmail3-allram Alteon 3 102.8 87.8%<br>
balance3-allram Balance 3 103.8 81.4%<br>
<br>
结束语<br>
<br>
通过使用现成的计算机设备,我们演示了可以构建高性能、高可用的 Sendmail 服务。在我们的测试中,磁盘 I/O 是 Sendmail 系统的总体性能中最重要的因素。将服务器配置成不记录日志,或者将日志记录到 RAM 磁盘,会大大提高性能。另外,邮件队列也是 Sendmail 服务器进程中另一个磁盘密集型的部分。将队列分配到多个目录、将队列目录放到最快的可用文件系统上或者将队列移到 RAM 磁盘也会大大提高性能。将邮件队列移动到 RAM 磁盘也许不适合许多安装,因为 — 在 OS 崩溃或服务器硬件故障的情况下 — 会损害 Sendmail 系统的消息传递完整性。<br>
<br>
我们很惊奇地了解到,对于工作负载,我们可以将负载均衡管理器 Alteon 180 这个商业产品替换成运行 user-land 程序“balance”的专用 Linux 系统。这种 Linux 解决方案的经济效益是颇为引人注目的,而且使用设备也许会有操作上的好处。<br>
<br>
我们看到,Sendmail 服务器由一个升到两个时,性能翻了一倍,但奇怪的是,添加第三个服务器却没有效果。我们的负载生成装置正在努力工作,因此也许是邮件生成装置已经达到了饱和。我们还发现在重负载情况下的一些 TCP/IP 问题,这些问题可能会造成连接出错率的上升。我们建议使用许多负载生成机器来处理每天一千万条消息以上的负载。<br>
<br>
配置和注意事项<br>
<br>
Sendmail 就象大多数传统 Unix 程序。它是高度专用的,而且是模块化的,因此可以很容易地与其它组件集成,组成更大的解决方案。Sendmail 群集就是这样一种解决方案,我们需要描述其它组件的配置。其中一些是为增加性能或可伸缩性、工作负载分派器和网络设计而设计的。其它组件是用于增加 Sendmail 群集的可管理性的,如 LDAP 和 rsync。最后,我们描述了为测试环境模拟真正工作负载所使用的工具。<br>
<br>
Sendmail 配置<br>
<br>
Sendmail 群集硬件/服务器<br>
网络设置和检验<br>
LDAP 服务器设置<br>
名称服务设置<br>
Mailstone SMTP 负载模拟器<br>
<br>
如果您有问题、想要更多信息或者想要他们在此研究中使用的配置文件副本,尽请联系作者。<br>
<br>
免责声明:上述文章是基于在实验室环境中进行的实验室测试。特殊定制安装中的结果也许会由于许多因素而发生变化,这些因素包括每个特殊安装中的工作负载和配置。因此,上述信息是在以“按现状”的基础上提供的。明确表示不承担适销性和适用于某特定用途的保证。使用本信息带来的风险将由您自行承担。<br>
<br>
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -