Спрятать панель проектов Показать панель проектов
Donation Пожертвование  |  Дневник  |  Без рекламы  |  О сайте  |  Реклама  |  .mobile  |  Fleshlight     Прислать
Метод Научного Тыка
Поиск  
iMag | интернет-журнал

Разделы

Реклама
Начало » Разработка ПО » The difference between Web Farm and Web Garden

The difference between Web Farm and Web Garden

 

The difference between Web Farm and Web Garden
Добавлено: Пн 13.08.2018 (Sergeant)
Источник: https://www.c-sharpcorner.com/uploadfile/nipuntomar/web-farm-and-web-garden/
Автор: Nipun Tomar

WEB FARM:

A hosting environment consisting of multiple web servers is said to be a Web Farm. Usually a load balancer is used to tie together the web servers, which routes incoming requests amongst the servers within the web farm.

And these incoming requests are routed in a variety of formats: One from them is to use IP affinity (also called client affinity or sticky session); it's working is to route the incoming requests to the same web server for the duration of the web application session. It has a benefit that Session state data can be maintained in-process, just as it would on a single web server hosting environment, without the complications from alternating between web servers. However, a down-side to IP affinity is in not taking full advantage of the web farm capability in fully distributing and routing all requests and sessions.

USE: The Web farms are used in enterprise environments for highly-used web applications to provide fail-safe and reliable services. Web farms offload incoming traffic by alternating between servers and by evenly distributing web application load. This increases response time, performance, and reliability. Additional web servers may be added or taken away from a web farm to increase or decrease the web application performance, as necessary for target environment.

Advantages of a Web Farm

  • It Provides better scalability by handling large capacity;
  • Due to centralized monitoring of the web sessions good web site administration;
  • Optimum utilization of resources that can be shared to service clients;
  • It Provides redundancy by reducing failures with the help of fault tolerance techniques;
  • It Provides availability and better performance due to load balancing.


WEB GARDEN:

Web garden is a scenario in which a single machine has multiple ASP.NET worker processes running simultaneously. A web garden is utilized on a multi-core web server. To achieve more robust execution and processing of the C# ASP.NET web application threads, each worker process within the application pool would execute on an individual processor. It is created within Internet Information Services (IIS) by creating an application pool, selecting the Performance tab, and under the "Web Garden" section, setting the maximum number of worker processes to a value greater than 1.

USE: Rather than using the typical hosting environments, the web gardens use more resources, and may also be slower in performance due to which there is unnecessary complexity. It has useful scenarios which may include when a non-CPU bound application needs to execute a long running request, such as an intensive computational request, long database transaction, or other long process. In both cases, a web garden could offer a solution by offloading the single worker process and distributing incoming requests amongst the workers in the application pool.

The larger gain for web gardens is not speed, but rather robustness. Due to their robustness, enabling web gardens can often be a good way to see if a C# ASP.NET web application will function correctly in a multi-server web farm environment. Often, if a web application performs well in a garden scenario, it will typically be easier to migrate to a web farm.

Advantages of Web Garden

  1. It increases application availability;
  2. Less consumption of physical space with better capacity;
  3. Optimum utilization of processes running on multiple processors located in a single server;
  4. Finer grained partitioning of Web servers help to control the administration of web sites individually, though they reside on the same server;
  5. With the concept of Processor affinity (binding the application to processor with the help of CPU masks), applications can be swapped out and restarted on the fly.

IMPLEMENTATION OF WEB FARM IN .NET:

To implement a web farm in .Net, the following changes have to be made in a web.config file:

Mode = [inproc/StateServer/SqlServer]

The inproc option is to be used when there is no web farm, StateServer when performance is required while SqlServer, if reliability is needed, especially for mission critical applications.

IMPLEMENTATION OF WEB GARDEN IN .NET:

To implement a web garden in .Net, the following changes have to be made in a web.config file:

  • webGarden=[true]
    Option, false used, if web garden is not necessary.
  • CpuMask=8
    Value for this section implies the decimal number, whose binary form represents the sequence of processors running ASP.NET processes on a multiprocessor server.

Difference between "Web farms" and "Web garden":

Web farms consist of two or more web servers of the same configuration and they stream the same kind of contents to minimize failures, hence web farms are used to have some redundancy. It consists of two or more web servers of the same configuration and they stream the same kind of contents. When any request is received there is switching / routing logic that decides which web server from the farm handles the request. Whereas in short we can define a model in which multiple processes run on multiple CPUs in a single server machine which is known as a web garden. Let's discuss that with the help of models:

All requests to IIS are routed to "aspnet_wp.exe" for IIS 5.0 and "w3wp.exe" for IIS 6.0. In a normal case i.e. without a web garden we have one worker process instance ("aspnet_wp.exe" / "w3wp.exe") across all requests. This one instance of worker process uses the CPU processor as directed by the operating system:

But when we enable a web garden for a web server it creates different instances of the worker process and each of these worker processes runs on different CPUs. You can see in the diagram below we have different worker process instances created which run on different CPUs.


 
Мне нравится
?
Мне не нравится


Писать комментарии могут только авторизованные пользователи.


Комментарии (0)
Нет ни одного комментария.
Поделиться ссылкой:
Новое
09:04Заблудившийся
Домашнее клубничное мороженоевчера, 11:12Домашнее клубничное мороженое
Что такое Dolby Atmos?Ср 19.09.2018 – Что такое Dolby Atmos?
Рекомендации и полезные советы по правильному натуральному кормлению кошкиСр 19.09.2018 – Рекомендации и полезные советы по правильному натуральному кормлению кошки
Getting Started with NoSQLВт 18.09.2018 – Getting Started with NoSQL
Год: 2013
Пн 17.09.2018 – 7 золотых правил одного программиста
Народ для разврата собрался!Вс 16.09.2018 – Народ для разврата собрался!
Обзор смартфона Sony Xperia XZ2: новый рецепт японской кухниЧт 13.09.2018 – Обзор смартфона Sony Xperia XZ2: новый рецепт японской кухни
ТОП AV ресиверов '2013Ср 12.09.2018 – ТОП AV ресиверов '2013
10 самых высоких деревьев на планетеСр 12.09.2018 – 10 самых высоких деревьев на планете

Реклама
Разработано на основе BlackNight CMS
Release v.2018-09-20
© 2000–2018 Blackball
Дизайн & программирование:
Sergeant Центр Связи с Админом Skeleton
О сайтеРеклама
Яндекс.Метрика
Web-site performed by Sergey Drozdov