面向高负载的架构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

11 thoughts on “面向高负载的架构Lighttpd+PHP(FastCGI)+Memcached+Squid”

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

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

  2. [Comment ID #17673 Will Be Quoted Here]

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

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

  3. 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!

  4. 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

  5. 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!

  6. 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

  7. Excellent site you have here but I was curious about if you knew of any community forums that cover the same topics talked about
    in this article? I’d really like to be a part of group where I can get responses from other experienced people
    that share the same interest. If you have any recommendations,
    please let me know. Many thanks!

  8. My partner and I stumbled over here by a different web address and
    thought I may as well check things out. I like what I see so now i’m following
    you. Look forward to going over your web page yet again.

  9. Pretty great post. I simply stumbled upon your weblog
    and wished to mention that I have really loved surfing around your weblog posts.
    After all I will be subscribing on your feed and I hope
    you write once more very soon!

  10. Hey I know this is off topic but I was wondering if you knew
    of any widgets I could add to my blog that automatically tweet my newest twitter
    updates. I’ve been looking for a plug-in like
    this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to
    your new updates.

  11. You’re so interesting! I don’t believe I’ve read through a single thing
    like this before. So nice to discover another person with a few genuine thoughts
    on this issue. Seriously.. many thanks for starting this up.
    This web site is one thing that is required on the internet, someone
    with some originality!

  12. Pingback: bmw
  13. Unquestionably imagine that that you said.

    Your favourite reason appeared to be on the web the simplest factor to take
    note of. I say to you, I definitely get irked even as
    other people think about issues that they plainly do not recognize about.
    You managed to hit the nail upon the top and also outlined out the whole thing
    with no need side effect , other people could take a signal.

    Will probably be again to get more. Thanks

  14. What i do not understood is if truth be told how you are not really
    a lot more neatly-appreciated than you might be right now.

    You are so intelligent. You already know
    therefore considerably in relation to this subject, made me for my part consider it from
    numerous numerous angles. Its like men and women are not fascinated except it is one thing to do with Woman gaga!
    Your own stuffs great. Always care for it up!

  15. Hey there just wanted to give you a quick heads up.

    The words in your post seem to be running off the screen in Ie.

    I’m not sure if this is a format issue or something to do
    with web browser compatibility but I figured I’d post to let you know.
    The layout look great though! Hope you get the problem
    fixed soon. Many thanks

  16. Hey, I think your website might be having browser
    compatibility issues. When I look at your blog site in Ie,
    it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, terrific blog!

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