使用 couchbase 构建网络服务器(NginX/Lighttpd/Apache) [英] Architecting webserver (NginX/Lighttpd/Apache) with couchbase

查看:24
本文介绍了使用 couchbase 构建网络服务器(NginX/Lighttpd/Apache)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个架构问题,希望你们中的一些人可以与我分享.根据您过去的经验,哪种场景更适合高负载应用程序/数据库服务器.我使用 Couchbase 作为数据库和 Web 服务器(NginX/Lighttpd/Apache)之一.这将很难用文字解释,所以我希望我能理解一些.哪种场景更受欢迎?

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?

场景一.

客户端连接到网络服务器主集群,选择合适的可用网络服务器(机器 2)和(网络服务器机器 2)连接到数据库主集群,后者依次选择可用的数据库(数据库 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)

场景 2.

客户端连接到网络服务器主集群,选择合适的可用网络服务器(机器 1),机器 1"连接到 Couchbase 集群中的 Couchbase 机器,该机器已经分配给它,即数据库 1".

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?

推荐答案

我过去做过这个;而且相当简单

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.

现在是 q.使用 Nginx 或 Apache;q.您必须回答自己是内容是通过网络服务器提供的 - 高度静态的还是动态的 - 这意味着来自 db",如果它的静态很容易选择 nginx;如果没有,那么你应该去 apache.

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.

如果您使用的是 php,您可能想使用 apc 或 hip-hop 来编译您的 php https://developers.facebook.com/blog/post/2010/02/02/hiphop-for-php--move-fast/

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.

这篇关于使用 couchbase 构建网络服务器(NginX/Lighttpd/Apache)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆