面向高负载的架构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怎么优化?

  12. minecraft says:

    What i do not understood is in truth how you are no longer
    really much more smartly-liked than you might be now. You are very intelligent.
    You know therefore significantly relating to this subject,
    produced me personally consider it from a lot of
    various angles. Its like women and men are not interested until it’s something
    to accomplish with Woman gaga! Your own stuffs nice.

    Always handle it up!

  13. minecraft says:

    Heya! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended up losing a few months of
    hard work due to no back up. Do you have any solutions to stop hackers?

  14. minecraft says:

    Do you have any video of that? I’d like to find out some additional information.

  15. Hi, after reading this awesome piece of writing i am also delighted to share
    my knowledge here with colleagues.

  16. It’s a shame you don’t have a donate button! I’d definitely
    donate to this fantastic blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account.

    I look forward to new updates and will share
    this site with my Facebook group. Talk soon!

  17. Undeniably imagine that which you said. Your favourite reason appeared to be at the web the simplest factor to be aware of.
    I say to you, I definitely get irked while folks think
    about issues that they plainly do not understand about.

    You controlled to hit the nail upon the top and also defined out the whole thing with no need side effect
    , folks could take a signal. Will likely be again to get
    more. Thank you

  18. Hello there! This post couldn’t be written any better!

    Looking at this article reminds me of my previous roommate!
    He always kept talking about this. I most certainly will send
    this information to him. Fairly certain he’ll have a great read.
    Thank you for sharing!

  19. I do agree with all the ideas you have offered in your post.
    They are really convincing and will definitely work.
    Nonetheless, the posts are too short for beginners. Could you please lengthen them
    a bit from next time? Thanks for the post.

  20. Someone necessarily assist to make seriously
    posts I would state. That is the first time I frequented your web page
    and thus far? I amazed with the analysis you made to make this actual post amazing.
    Fantastic job!

  21. Hello! Do you use Twitter? I’d like to follow you if that would be okay.
    I’m absolutely enjoying your blog and look forward to new posts.

  22. Coconut Oil says:

    Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is important and everything. However just imagine
    if you added some great images or videos to give your posts more, “pop”!
    Your content is excellent but with images and video clips,
    this site could certainly be one of the most beneficial in its field.
    Wonderful blog!

  23. This paragraph is actually a pleasant one it assists
    new internet visitors, who are wishing for blogging.

  24. At this time it seems like WordPress is the preferred blogging platform available right now.

    (from what I’ve read) Is that what you’re using on your blog?

  25. It’s really a nice and helpful piece of info.
    I’m satisfied that you shared this useful info with
    us. Please keep us up to date like this. Thank you for sharing.

  26. It’s amazing to pay a quick visit this web site and
    reading the views of all friends about this article,
    while I am also eager of getting know-how.

  27. Quest Bars says:

    Heya i am for the first time here. I came across
    this board and I find It really useful & it helped me out a lot.
    I hope to give something back and help others like you helped me.

  28. Undeniably consider that which you said. Your favourite justification appeared to be
    on the internet the easiest thing to remember of. I say to you, I certainly get annoyed while other people
    think about concerns that they just do not recognize about.
    You controlled to hit the nail upon the top and also outlined out the whole thing without having side effect , other
    folks could take a signal. Will probably be back to get more.
    Thank you

  29. Sling TV says:

    Thanks for finally writing about >面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid | 李俊麟的平凡生活 <Liked it!

  30. Sling TV says:

    Good replies in return of this question with solid arguments and describing everything regarding that.

  31. you are actually a excellent webmaster. The site loading speed
    is amazing. It kind of feels that you are doing any distinctive trick.
    Furthermore, The contents are masterpiece. you’ve
    performed a great activity in this matter!

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