博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Web Farm和Web Garden的区别
阅读量:6595 次
发布时间:2019-06-24

本文共 2698 字,大约阅读时间需要 8 分钟。

 

经常有人问题什么是Web Farm, 什么又是Web Garden?

他们的有什么区别?

今天我们就来看一下他们之间的区别

我们知道, web server负责处理客户端的请求然后再返回给他们.

但是,当请求很多的时候,一台服务器可能承受不了, 这个时候,我们就需

要用多台web server来分担请求的压力, that is called to divide the traffic among them.

这就是web farm

web farm -- hosting your single web site on multiple web servers over load balancer

通常,我们在web farm的架构中, 不同的web server通过load balancer和虚拟IP进行连接

因为,当请求过来的时候,它最先接触的是load balancer, LB把请求分发给相关的web server

 

web garden

首先,我们来了解一下什么是Worker Process, 在IIS中Worker Process(w3wp.exe)负责处理

所有的请求, 相应,缓存等, Application Pool则是Worker Process的容器, 应用程序池用来被用来分割

Worker Process的集合以保证最佳的稳定性

每个应用程序池默认只有一个工作进程, 但是,如果应用程序池包含了多个工作进程,这种方式就叫做

web garden

在IIS6/7中创建web garden的步骤:

IIS6

1) Right Click on Application Pool -> Properties -> Goto Performance Tab

2) In the “Performance Tab” section, you would have one option called “Web Garden”

     where worker process sets to “1”, you can set the number of worker 

     processes that you required

IIS7

1) Right Click on Application Pool -> Go To Advance Settings -> In Process Model section

     you will have “Maximum Worker Processes”

2) You can change it more than 1 to make it as a web garden

 

Advantages of Web Farm

  • It provides high availability. If any of the servers in the farm        

         goes down, Load balancer can redirect the requests to other servers.         

  • Provides high performance response for client requests.
  • Provides better scalability of the web application and reduces the        

         failure of the application.

  • Session and other resources can be stored in a centralized location        

         to access by all the servers.

 

Advantages of Web Garden

  • Provides better application availability by sharing requests between        

          multiple worker process.

  • Web garden uses processor affinity where application can be swapped        

          out based on preference and tag setting.

  • Less consumption of physical space for web garden configuration.

 

Session in Web Farm Mode

While using session, requests are distributed among different servers.      

By default, session mode is set to In Proc where session data is stored      

inside worker process memory. But, in Web farm mode, we can share the      

session among all the servers using a single session store location by      

making it Out proc (State Server or SQL Server Mode). So, if some of the      

servers go down and request is transferred to the other server by the Load      

balancer, session data should be available for that request.

 

Session in Web Garden Mode

When we are using Web garden where request is being taken care of by      

different worker process, we have to make the session mode as out process      

session mode as described earlier. For Web Garden, we have to configure      

the out process within the same server but for different worker process.

 

 

 

 

 

 

转载于:https://www.cnblogs.com/davidgu/p/3253943.html

你可能感兴趣的文章
年终回顾,为你汇总一份「后端架构技术清单」
查看>>
别人的双11 & 程序员的双11~
查看>>
互联网垂直社交创业新形态——ThinkSNS
查看>>
C#中两个冒号(::)的作用
查看>>
sed指定行范围匹配(转贴!)
查看>>
如何在tomcat下用EL表达式${param.xxx}属性获取parameter中文避免乱码
查看>>
线性表之栈与队列
查看>>
Git撤销修改
查看>>
项目管理实施流程(八)系统运维
查看>>
ipv4及ipv6及tcp的头部结构
查看>>
win7图片目录位置
查看>>
Maven
查看>>
FastDFS之集群部署
查看>>
Centos6.3系统语言设置
查看>>
我的友情链接
查看>>
javascript不可用的问题探究
查看>>
[置顶] jQuery乱谈(五)
查看>>
have sth done/doing的区别
查看>>
paste用法
查看>>
《java开发实战经典》读书笔记——第3章 Java基础程序设计之数据类型划分20151026...
查看>>