面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid

  因新项目,开始从Apache上转移到Lighttpd上,同时还有Memcached的大量使用,借此机会把toplee.com的服务器环境也进行一些改造,顺便整理一份文档留存!
  更多大型架构的经验,可以看我之前的一篇blog:http://www.toplee.com/blog/71.html

12.31 截至今天完成以下内容:
    1. 完成lighttpd的安装配置,并且做了大量的优化;
    2. 几乎全部看完了http://trac.lighttpd.net/trac/wiki上的文档;
    3. 配置了lighttpd和php的fastcgi支持;
    4. 增加了php对XCache的支持;
    5. 设置了部分域名在lighttpd上的解析;
    6. 完成了Apache通过mod_rewrite和mod_proxy将部分域名以及全部的php访问转到lighttpd上;
    7.完成Memcached的环境搭建,并且修改了部分数据库操作缓存到MC上;


  效果:
    1. 系统负载变低了不少,响应速度得到提升;
    2. MC的效果非常理想,数据库压力得到很大减轻。
  TODO:
    (下面的事情等我买了第二台服务器后进行,目前仅在帮朋友的项目上这么干了)
    -. 配置MySQL的Master/Slave模式,把对数据库的Write和Read进行分开
    -. 加入squid群进行缓存加速
    -. 其他(比如DNS负载均衡加LVS的四层交换…)
To be continued…
一些截图
xcache
phpinfo_api
phpinfo_zend

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
11 Responses
  1. 南半球 says:

    哈哈,好东东随时关注

  2. doodler says:

    强烈关注ing…

  3. Ken says:

    Memcached 在 Slackware 上似乎很难编译进 epoll 的支持,老是使用 select/poll 的模式。不知道您的支持 epoll 吗?有时间换 RH 试试。

  4. Michael says:

    [Comment ID #10237 Will Be Quoted Here]

    目前是直接使用FreeBSD的ports自动安装memcached,忘了make config的时候是否有选项,回头看看

  5. Sparkle says:

    FreeBSD没有epoll,不过有kqueue

  6. unrulyboy says:

    配置MySQL的Master/Slave模式,把对数据库的Write和Read进行分开

    请问 到时间可以整理一个详细的方案或者配制笔记吗? 我想做几个镜像站 想利用这中模式同步数据库,但担心数据库在同步的过程中会出现问题? 关于这方面不是很清楚,所以不敢冒然操作,期待回复

  7. Michael says:

    [Comment ID #17673 Will Be Quoted Here]

    空了会考虑弄份详细的资料,不过95%以上的资料都可以在MySQL的在线文档里面得到。

    另外,如果您的镜像分布在不同地域,除非有专门的同步带宽,否则网络状况一定会导致很多问题发生。

  8. sariel says:

    这介是经验呐~

  9. Every fashionista is crazy about his famous string bikini. string bikini is no doubt the most popular string bikini in this season.

  10. Das Aspire S3-951 akku dell inspiron 1525 verfügbar sein wird in dieser Woche bei Online-und dell latitude d620 akku Einzelhandel in den USA und Kanada.

  11. 博主,请教一下,如果是低内存的vps,比如256M,lighttpd怎么优化?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image