Architecting webserver (NginX/Lighttpd/Apache) with couchbase

浪子不回头ぞ 提交于 2020-01-14 05:30:17

问题


I have this architectural question that I'm hoping some of you can share with me. In your past experience, which scenario works better for high load application/dbase server. I'm using Couchbase as a dbase and one of the Web server (NginX/Lighttpd/Apache). This is going to be hard to explain in text so I hope I make some sense. Which scenario is preferred?

Scenario 1.

Client connect to webserver master cluster which select the proper available webserver (machine 2) and the (webserver machine 2) connect to Dbase Master Cluster which in turn select available Dbase (Dbase 1)

Scenario 2.

Client connect to webserver master cluster which select the proper available webserver (machine 1) and "machine 1" connect to Couchbase machine in the Couchbase Cluster that's already assign to it which is "Dbase 1".

Does this make any sense? Any thought on the preferred method?


回答1:


I have done this in past; and fairly simple

Client connects to the load balancer (which contains multiple machines), the load balancer will keep your incoming load balanced, and will make your system horizontally scalable.

and then either one of your load balanced servers talk to the dbase at couch; I am sure you can create a cluster of couch as well.

Now the q. of using Nginx or Apache; the q. that you must answer to yourself is "is the content getting served via webserver - highly static or its dynamic - that means coming from db" if its static very easily chose the nginx; if not then you should go for apache.

if you are using php, you may would like to use apc or hip-hop to compile your php https://developers.facebook.com/blog/post/2010/02/02/hiphop-for-php--move-fast/

there are a lot of things you should take care of while designing a scalable system.



来源:https://stackoverflow.com/questions/18257335/architecting-webserver-nginx-lighttpd-apache-with-couchbase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!