mongrel和mongrel_cluster的区别是什么
程序员文章站
2022-05-19 17:39:15
...
Ask:
mongrel和mongrel_cluster的区别是什么
Answer1:
Mongrel是一个
Web服务器
,
同一时间
只能处理
一个请求
。
为了
处理
多个请求
,你想
运行多个副本
。
Mongrel集群
是
管理
正在运行的mongre的启动、
停止、
重新启动
,并
让客户的请求转发到合适mongrel
环境
中
运行,相当于所有正在运行的mongrel的资源管理经理一样,自动根据mongre的负载将相应的请求转移到负载最小的mongrel应用上。
Mongrel is a web server that can handle one request at a time. In order to handle multiple requests, you want to run multiple mongrels. A proxy server (i.e. apache) will sit in front of the servers and listen on port 80 and then relay the web requests to an available mongrel. Mongrel cluster is a gem that manages the launching of the mongrels, stopping, restarting and running it in the right environment with the right user. It abstracts the individual mongrels as workers so you don't need to worry about them (until things go wrong). All of that is managed by a configuration file usually located with the application.
Answer2:
mongrel_cluster相当于mongrel的多实例,并自动处理进入的请求
Mongrel cluster is multiple mongrel instances. Then the web server rotates amongst them to handle incoming calls. But these days the cool kids tend to use Passenger (and often the related Enterprise Ruby too)
上一篇: 别让好想法埋没:如何进行APP开发?
下一篇: Bamboo对Upload的支持