﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-垃圾堆</title><link>http://www.cppblog.com/HendricLee/</link><description /><language>zh-cn</language><lastBuildDate>Sat, 11 Apr 2026 07:52:55 GMT</lastBuildDate><pubDate>Sat, 11 Apr 2026 07:52:55 GMT</pubDate><ttl>60</ttl><item><title>HelloCpp开发日记：网站性能优化之文件服务器分离技术</title><link>http://www.cppblog.com/HendricLee/archive/2009/06/08/87073.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Mon, 08 Jun 2009 08:15:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2009/06/08/87073.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/87073.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2009/06/08/87073.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/87073.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/87073.html</trackback:ping><description><![CDATA[闲来无事跟朋友折腾了一个山寨百衲本的网站HelloCpp(<a  href="http://www.hellocpp.net/">http://www.hellocpp.net</a>)。界面我们都是外行，反正基本就是活脱脱一个山寨的<a  href="http://www.codeproject.com/">www.codeproject.com</a>。不过开发过程中还是蛮有一些心得的。现在写出来跟大家分享。有不对的地方请大家多多建议。
<p><span style="font-weight: bold;"><br></span></p>
<p><span style="font-weight: bold;"></span><span style="font-family: arial black,avant garde;"><span style="font-size: medium;"><strong>网站性能优化之文件服务器分离技术</strong></span></span></p>
<p>&nbsp;&nbsp;&nbsp;
在WEB开发中，一个重要的性能问题是IO问题。通常，一个网站里会拥有包括图片、RAR文件等一系列的文件，这些文件一般都比页面要多很多而且大很多，
并且，这些文件也会比页面访问更多次。这意味着，如果能优化这部分IO的性能，则对整个网站的性能都会有所提高。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在HelloCpp(<a  href="http://www.hellocpp.net/">http://www.hellocpp.net</a>)的开发过程中，我们使用了网站服务器与文件服务器相分离的技术。即除了页面以外的图片、脚本、资源等文件，都是部署在与网站页面所在的服务器不同的服务器上的。而通过网站上传文件的时候，也会由后台程序保存在远程文件服务器上。这里，保存通常有两种做法：<br>&nbsp;&nbsp; 1.使用FTP服务来远程保存文件<br>&nbsp;&nbsp; 2.使用WebService来远程保存文件<br>&nbsp;&nbsp;&nbsp;HelloCpp
中使用的是第二种方式，因为使用第一种方式的话，文件服务器需要额外开放一个FTP服务，这样就有更多被攻击的危险。编写一个远程保存文件的
WebService相当简单，只要传递文件的数据Stream即可。另外，文件服务器还可以采取一些轻量级的配置方法，尽可能地提高IO性能。也可以配
置一个冗余的文件服务器，来提供集群访问，具体细节请参考其他专业的文档。</p>
<p>-----待续</p>
<p><br>最后，欢迎支持HelloCpp(<a  href="http://www.hellocpp.net/">http://www.hellocpp.net</a>)，中国人自己的CodeProject编程资料库</p><img src ="http://www.cppblog.com/HendricLee/aggbug/87073.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2009-06-08 16:15 <a href="http://www.cppblog.com/HendricLee/archive/2009/06/08/87073.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CSDN博客真是个专家云集的地方</title><link>http://www.cppblog.com/HendricLee/archive/2009/06/02/86496.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Mon, 01 Jun 2009 17:58:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2009/06/02/86496.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/86496.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2009/06/02/86496.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/86496.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/86496.html</trackback:ping><description><![CDATA[闲的无聊，翻了翻CSDN的博客，专家列表里好多专家啊。挑了几个看了看，发现大家都好高深莫测，哎，看来需要再多学点东西了&#8230;&#8230;技术跟不上了&#8230;&#8230;<br><img src ="http://www.cppblog.com/HendricLee/aggbug/86496.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2009-06-02 01:58 <a href="http://www.cppblog.com/HendricLee/archive/2009/06/02/86496.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Firefox插件的技术难关已经解决了，现在可以像ActiveX一样用了</title><link>http://www.cppblog.com/HendricLee/archive/2009/05/27/85912.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Wed, 27 May 2009 07:14:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2009/05/27/85912.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/85912.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2009/05/27/85912.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/85912.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/85912.html</trackback:ping><description><![CDATA[1.支持正常的显示<br>2.支持脚本操作(Method和Property)<br>3.支持事件：&lt;script for=id event=event&gt;的形式了。但是addEventListener的形式还没试验过<br><br>稍后放文章出来&#8230;&#8230;<br><br><img src ="http://www.cppblog.com/HendricLee/aggbug/85912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2009-05-27 15:14 <a href="http://www.cppblog.com/HendricLee/archive/2009/05/27/85912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于利用DirectShow开发自己的Filter</title><link>http://www.cppblog.com/HendricLee/archive/2009/05/20/83480.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Wed, 20 May 2009 07:24:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2009/05/20/83480.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/83480.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2009/05/20/83480.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/83480.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/83480.html</trackback:ping><description><![CDATA[最近在使用DirectShow开发D3D和视频相结合的内容,感觉有些怪异,很多视频在暴风里播放正常而在DirectShow Filter Chain里总是Connect Pin失败,最后感觉到应该是我的Filter有问题.遂Google之.发现一篇 <a  href="http://www.hellocpp.net/Articles/Article/398.aspx">利用DirectShow开发自己的Filter</a> ,参考之,权做备忘<br><br><img src ="http://www.cppblog.com/HendricLee/aggbug/83480.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2009-05-20 15:24 <a href="http://www.cppblog.com/HendricLee/archive/2009/05/20/83480.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jquery1.3.2不认gb2312编码?</title><link>http://www.cppblog.com/HendricLee/archive/2009/03/14/76595.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Sat, 14 Mar 2009 11:40:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2009/03/14/76595.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/76595.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2009/03/14/76595.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/76595.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/76595.html</trackback:ping><description><![CDATA[很奇怪,一个XML文档,使用gb2312编码死活解析不过去,使用utf-8就可以了。嗯，后来查了jquery的文档，确实要求UTF-8，以留本文权做备案
<img src ="http://www.cppblog.com/HendricLee/aggbug/76595.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2009-03-14 19:40 <a href="http://www.cppblog.com/HendricLee/archive/2009/03/14/76595.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VC中使用XMLHTTP，解决异步模式下无响应</title><link>http://www.cppblog.com/HendricLee/archive/2008/07/30/57538.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Wed, 30 Jul 2008 09:58:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2008/07/30/57538.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/57538.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2008/07/30/57538.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/57538.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/57538.html</trackback:ping><description><![CDATA[废话不多说了，直接引用MS的原话：<br>[quote]<br>从 MSXML 3.0 版开始，<strong>XMLHTTP </strong>请求对象使用 Urlmon.dll。如果在调用<strong> open </strong>方法时将<em> async </em>参数设置为 VARIANT_TRUE，则 URLMON 使用消息队列机制来通知应用程序数据何时可用，并更改<strong> XMLHTTP </strong>请求对象的<strong> readyState </strong>属性。<br><br>在 Visual C++ 应用程序中，必须使用消息泵来接收和调度消息。如果应用程序不能正确地处理传入的消息，则由于<strong> XMLHTTP </strong>请求对象的<strong> readystate </strong>属性未被更改，因此应用程序会停止响应（挂起）。<br>[/quote]<br><br>参考URL<br><a href="http://support.microsoft.com/kb/303326/zh-cn?spid=1198&amp;sid=global">http://support.microsoft.com/kb/303326/zh-cn?spid=1198&amp;sid=global</a>
<img src ="http://www.cppblog.com/HendricLee/aggbug/57538.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2008-07-30 17:58 <a href="http://www.cppblog.com/HendricLee/archive/2008/07/30/57538.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UDP使用IOCP</title><link>http://www.cppblog.com/HendricLee/archive/2008/07/29/57436.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Tue, 29 Jul 2008 08:52:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2008/07/29/57436.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/57436.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2008/07/29/57436.html#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/57436.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/57436.html</trackback:ping><description><![CDATA[别的废话不多说了，基本流程和TCP下一样，只不过说一点需要注意的。<br>在WSARecvFrom成功以后，IOCP得到了投递，处理完了这个数据，这个时候应该重新发起一个WSARecvFrom投递了，这个时候要特别注意，<br>不要重新分配一个Overlapped，而要复用当前这个，不然在GetQueued的时候，会报错，报0xC000000005，读取0x00000010错误。<br><br>网上的IOCP都是TCP的，UDP的资料太少，这里提出一个要注意的地方，以使后来人避免走弯路
<img src ="http://www.cppblog.com/HendricLee/aggbug/57436.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2008-07-29 16:52 <a href="http://www.cppblog.com/HendricLee/archive/2008/07/29/57436.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一定要用IIS来调试ASP.NET WebApplication</title><link>http://www.cppblog.com/HendricLee/archive/2008/06/30/54961.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Mon, 30 Jun 2008 07:06:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2008/06/30/54961.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/54961.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2008/06/30/54961.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/54961.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/54961.html</trackback:ping><description><![CDATA[一定要用IIS来调试ASP.NET WebApplication，不能用Development WebServer啊。。不然global.asax会执行不到
<img src ="http://www.cppblog.com/HendricLee/aggbug/54961.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2008-06-30 15:06 <a href="http://www.cppblog.com/HendricLee/archive/2008/06/30/54961.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>发现ASP.NET网站项目类型真难用</title><link>http://www.cppblog.com/HendricLee/archive/2008/06/27/54812.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Fri, 27 Jun 2008 08:11:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2008/06/27/54812.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/54812.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2008/06/27/54812.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/54812.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/54812.html</trackback:ping><description><![CDATA[RT，一点也不如WebApplication好用
<img src ="http://www.cppblog.com/HendricLee/aggbug/54812.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2008-06-27 16:11 <a href="http://www.cppblog.com/HendricLee/archive/2008/06/27/54812.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>想做的事情越来越多，时间却越来越少</title><link>http://www.cppblog.com/HendricLee/archive/2008/06/19/53991.html</link><dc:creator>亨德列克</dc:creator><author>亨德列克</author><pubDate>Thu, 19 Jun 2008 05:03:00 GMT</pubDate><guid>http://www.cppblog.com/HendricLee/archive/2008/06/19/53991.html</guid><wfw:comment>http://www.cppblog.com/HendricLee/comments/53991.html</wfw:comment><comments>http://www.cppblog.com/HendricLee/archive/2008/06/19/53991.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HendricLee/comments/commentRss/53991.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HendricLee/services/trackbacks/53991.html</trackback:ping><description><![CDATA[RT<br>抱怨完毕
<img src ="http://www.cppblog.com/HendricLee/aggbug/53991.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HendricLee/" target="_blank">亨德列克</a> 2008-06-19 13:03 <a href="http://www.cppblog.com/HendricLee/archive/2008/06/19/53991.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>