应用程序池中单个应用程序的多个工作进程 [英] Multiple worker processes for a single application in a applicationpool

查看:106
本文介绍了应用程序池中单个应用程序的多个工作进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,


在IIS 6.0中我们有一个工作流程和应用程序池的概念。


据我所知,我们每个应用程序可以有多个工作进程

池。每个工作进程都专用于池。如果我只将一个

应用程序分配给一个应用程序池,并且有多个工作进程

分配给该池。我的申请是否会由许多工人处理

流程?


为什么我问这个问题是因为有某些资源

它们在内存中并在应用程序级别共享。例如

数据库连接池,或者通过静态

构造函数初始化的一些XML文件。


现在如果多个进程是执行我的请求,然后他们如何分享数据(如果他们这样做)。或者每个进程都复制了自己的

资源。


这对我来说非常重要,因为我可以说我连接了一个

我拥有20个并发用户许可证的数据源。所以我创建了一个包含20个连接的

池并对其进行管理。这个池通过静态构造函数在内存中初始化

。现在,如果每个工作进程都尝试加载其内存池中的某个进程,那么只有一个进程可以正常运行,因为休息

将被拒绝连接。我也无法知道有多少

工作进程会随时运行,因为它们是基于IIS的b $ b需求而运行的,所以我不能分担多个流程

在应用程序级别。


对我而言,似乎不能使用不同的工作进程来执行请求一个应用程序...但随后MS文档

谈论Web Garden,其中不同的工作进程执行请求

用于应用程序域。


如果你能分享一些关于这个问题的知识,我将非常感激。感谢你的帮助。


问候,

Abhishek。

解决方案

< blockquote>每个工作进程都保持自己的内存状态。如果你想在

流程之间共享数据,你需要某种

的流程外状态管理。


另外,我建议你最好通过内置的MDAC连接池管理数据库

连接,而不是通过你自己的本地系统。你可以限制游泳池中的连接数量。


干杯




Abhishek Srivastava < AB ***************** @ nospam.net>在消息中写道

新闻:OE ************** @ TK2MSFTNGP11.phx.gbl ...

:Hello All,< br $> b $ b:

:在IIS 6.0中我们有一个工作流程和应用程序池的概念。



:As据我所知,每个应用程序可以有多个工作进程

:pool。每个工作进程都专用于池。如果我只为应用程序池分配一个

:应用程序并且有多个工作进程

:分配给该池。我的申请是否会被许多工人处理

:流程?



:为什么我问这个问题是因为有某些资源

:它们在内存中并在应用程序级别共享。例如

:数据库连接池,或通过静态
:构造函数初始化的一些XML文件。



:现在如果多个进程正在执行我的请求,那么他们如何
:共享数据(如果他们这样做的话)。或者每个进程复制它自己的

:资源。



:这对我很重要,因为我可以说我连接到了

:我有20个并发用户许可证的数据源。所以我创建一个

:20个连接的池并管理它。此池在内存中初始化

:通过静态构造函数。现在,如果每个工作进程都尝试加载其内存池,那么只有一个进程可以正常运行,因为休息

:将被拒绝连接。我也无法知道多少

:工作进程将随时运行,因为它们基于

运行:IIS的需求因此我无法拆分负载在多个流程中

:在应用程序级别。



:对我来说,似乎不能使用不同的工作进程

:执行一个应用程序的请求......但随后是MS文档

:谈论Web Garden,其中不同的工作进程执行请求

:用于应用程序域名。



:如果你能分享一些关于这个的知识,我将非常感激。

:问题。感谢您提前的帮助。



:问候,

:Abhishek。


工作人员如何同步数据?假设我在应用程序对象中保留了一个DOM树。


现在一个工作进程更新了dom树中的一个节点。其他工作人员

流程(谁拥有自己版本的内存状态)是否会看到

的变化?什么是同步机制。


关于MDAC的一个问题。 MDAC是一个进程外的东西吗? AFAIK,它是一个运行在应用程序内存中的一组DLL。(使用MDAC很多

次...但是从未看到过单独的exe或DLLHOST开始运行

查询我的数据库)即使我让MDAC管理我的池,如果多个

进程正在创建自己的池,那么<总数是多少? br />
连接打开数据库?如果我对

最大连接数有限制,那么我该如何管理呢?


请你确认多个进程可以确定地执行

单个申请的请求。


问候,

Abhishek。


Ken Schaefer写道:

每个工作进程都保持自己的内存状态。如果你想在
进程之间共享数据,你需要某种进程外状态管理。

另外,我建议你最好管理数据库
通过内置的MDAC连接池连接,而不是通过您自己的本土系统。您可以限制池中的连接数。

干杯
Ken

Abhishek Srivastava < AB ***************** @ nospam.net>在消息中写道
新闻:OE ************** @ TK2MSFTNGP11.phx.gbl ...
:大家好,

:在IIS 6.0中我们有一个工作流程和应用程序池的概念。

:据我了解,我们每个应用程序可以有多个工作进程
:pool。每个工作进程都专用于池。如果我只为应用程序池分配一个
:应用程序并且有多个工作进程
:分配给该池。我的应用程序是否会由许多工作人员处理
:进程?

:为什么我问这个问题是因为有某些资源
:它们是内存中的并且是共享的在应用程序级别。例如:
:数据库连接池,或者通过静态
:contructor初始化的一些XML文件。

:现在如果多个进程正在执行我的请求,那么它们是如何实现的
:共享数据(如果他们这样做的话)。或者每个进程都复制它自己的资源。

:这对我很重要,因为我可以说我连接的是一个数据源,我有20个并发数据源用户许可。所以我创建了一个由20个连接组成的池来管理它。此池在内存中初始化
:通过静态构造函数。现在,如果每个工作进程都尝试加载其自己的内存池,那么只有一个进程可以运行,因为休息
:将被拒绝连接。我也无法知道有多少
:工作进程将随时运行,因为它们是基于
运行的:IIS的需求因此我无法在多个进程之间分配负载
:在应用程序级别。

:对我来说,似乎不能使用不同的工作进程来执行一个应用程序的请求......但是然后是MS文档
:谈论Web Garden,其中不同的工作进程执行请求
:对于应用程序域。

:如果你能分享一些关于这个的知识,我将非常感激。
:问题。感谢你的帮助。

:问候,
:Abhishek。



The事实上,MDAC没有它的过程并不意味着它不能在不同的应用程序之间共享连接池。我不知道你是怎么得到这个结论的。


Jerry


Abhishek Srivastava ; < AB ***************** @ nospam.net>在消息中写道

news:u2 ************** @ TK2MSFTNGP12.phx.gbl ...

工人如何同步数据?假设我在应用程序对象中保留了一个DOM树。

现在一个工作进程更新了dom树中的一个节点。其他工作人员(具有自己版本的内存状态)是否会看到
更改?什么是同步机制。

关于MDAC的一个问题。 MDAC是一个进程外的东西吗? AFAIK,它是一组在应用程序的内存中运行的DLL。(使用MDAC很多次......但是从未看到过单独的exe或DLLHOST开始运行
查询我的数据库)即使我让MDAC管理我的池,如果多个进程正在创建自己的池,那么打开数据库的
连接总数是多少?如果我对最大连接数有限制,那么我该如何管理呢?

请你确认多个进程可以确定地运行执行
请求单个应用。

问候,
Abhishek。

Ken Schaefer写道:

每个工作进程都保持自己的内存状态。如果你想在
进程之间共享数据,你需要一些
类的进程外状态管理。

另外,我建议你最好管理数据库
通过内置的MDAC连接池连接,而不是通过您自己的本土系统。您可以限制池中的连接数。

干杯
Ken

Abhishek Srivastava < AB ***************** @ nospam.net>在消息中写道
新闻:OE ************** @ TK2MSFTNGP11.phx.gbl ...
:大家好,

:在IIS 6.0中我们有一个工作进程和应用程序
池的概念。 :
:据我了解,我们每个应用程序可以有多个工作进程
:pool。每个工作进程都专用于池。如果我只为应用程序池分配一个
:应用程序并且有多个工作进程
:分配给该池。我的应用程序是否会由许多工作人员处理
:进程?

:为什么我问这个问题是因为有某些资源
:它们是内存中的并且是共享的在应用程序级别。对于
示例:数据库连接池,或通过
static:contructor初始化的一些XML文件。

:现在如果多个进程正在执行我的请求,那么它们是如何实现的
:共享数据(如果他们这样做的话)。或者每个进程都复制它自己的资源。

:这对我很重要,因为我可以说我连接的是一个数据源,我有20个并发数据源用户许可。所以我创建
a:20个连接的池并管理它。这个池是内存
初始化:通过静态构造函数。现在,如果每个工作进程都尝试加载其自己的内存池,那么只有一个进程可以运行,因为休息
:将被拒绝连接。我也无法知道有多少
:工作进程将在任何时刻运行,因为它们是基于IIS的需求运行的:所以我不能在多个
进程之间分配负载:在应用程序级别。

:对我来说,似乎不能使用不同的工作进程来执行一个应用程序的请求......但是然后是MS文档
:谈论Web Garden,其中不同的工作进程执行
请求:对于应用程序域。

:如果你能分享一些关于这个的知识,我将非常感激。
:问题。感谢您的帮助。

:问候,
:Abhishek。



Hello All,

In IIS 6.0 We have a concept of worker processes and application pools.

As I understand it, we can have multiple worker process per appliction
pool. Each worker process is dedicated to a pool. If I assign only one
application to a applicaton pool and have multiple worker processes
assigned to that pool. Will my application be processed by many worker
processes?

Why I am asking this question is because there are certain resources
which are in-memory and are shared at an application level. For example
the database connection pool, or some XML files initialized via a static
contructor.

Now if multiple process are executing my requests, then how do they
share data (if they do at all). Or each process replicates its own
resources.

This is important to me, because lets say I am connection to a
datasource for which I have a 20 concurrent user license. So I create a
pool of 20 connections and manage it. This pool is in-memory initialized
via a static constructor. Now if each worker process tries to load its
own in-memory pool, then only one process would function because rest
will be denied the connection. I also have no way of knowing how many
worker process will run at any moment because they are run based on
demand by the IIS so I cannot split the load amongst multiple processes
at an application level.

To me it appears that different worker processes cannot be used to
execute the requests for one application ... but then MS documentation
talks about Web Garden where different worker processes execute requests
for an application domain.

I will be very gratefull if you could share some knowledge on this
matter. Thanks for your help in advance.

regards,
Abhishek.

解决方案

Each worker process keeps its own in-memory state. You would need some kind
of out-of-process state management if you want to share data between
processes.

Additionally, I would suggest that you are best of managing database
connections via built-in MDAC connection pooling, not through your own
home-grown system. You can limit the number of connections in the pool.

Cheers
Ken

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
: Hello All,
:
: In IIS 6.0 We have a concept of worker processes and application pools.
:
: As I understand it, we can have multiple worker process per appliction
: pool. Each worker process is dedicated to a pool. If I assign only one
: application to a applicaton pool and have multiple worker processes
: assigned to that pool. Will my application be processed by many worker
: processes?
:
: Why I am asking this question is because there are certain resources
: which are in-memory and are shared at an application level. For example
: the database connection pool, or some XML files initialized via a static
: contructor.
:
: Now if multiple process are executing my requests, then how do they
: share data (if they do at all). Or each process replicates its own
: resources.
:
: This is important to me, because lets say I am connection to a
: datasource for which I have a 20 concurrent user license. So I create a
: pool of 20 connections and manage it. This pool is in-memory initialized
: via a static constructor. Now if each worker process tries to load its
: own in-memory pool, then only one process would function because rest
: will be denied the connection. I also have no way of knowing how many
: worker process will run at any moment because they are run based on
: demand by the IIS so I cannot split the load amongst multiple processes
: at an application level.
:
: To me it appears that different worker processes cannot be used to
: execute the requests for one application ... but then MS documentation
: talks about Web Garden where different worker processes execute requests
: for an application domain.
:
: I will be very gratefull if you could share some knowledge on this
: matter. Thanks for your help in advance.
:
: regards,
: Abhishek.


How do the workers synchronize the data? suppose I keep a DOM tree in
the application object.

Now one worker process updates a node in the dom tree. Will other worker
processes (who have thier own version of the in-memory state) see the
changes? What is the mechanism of synchronization.

One question about MDAC. Is MDAC an out-of-process thing? AFAIK, it is a
set of DLLs which run in the memory of the application.(Used MDAC many
times... but never saw a separate exe or DLLHOST begining to run upon
querying my DB) Even if I let the MDAC manage my pool, if multiple
processes are creating their own pools, then what is the total number of
connections beging opened to the database? If I have a limitation on the
max number of connections, then how do I manage it?

Can you please confirm that multiple processes can definetly run execute
the requests for a single application.

regards,
Abhishek.

Ken Schaefer wrote:

Each worker process keeps its own in-memory state. You would need some kind
of out-of-process state management if you want to share data between
processes.

Additionally, I would suggest that you are best of managing database
connections via built-in MDAC connection pooling, not through your own
home-grown system. You can limit the number of connections in the pool.

Cheers
Ken

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
: Hello All,
:
: In IIS 6.0 We have a concept of worker processes and application pools.
:
: As I understand it, we can have multiple worker process per appliction
: pool. Each worker process is dedicated to a pool. If I assign only one
: application to a applicaton pool and have multiple worker processes
: assigned to that pool. Will my application be processed by many worker
: processes?
:
: Why I am asking this question is because there are certain resources
: which are in-memory and are shared at an application level. For example
: the database connection pool, or some XML files initialized via a static
: contructor.
:
: Now if multiple process are executing my requests, then how do they
: share data (if they do at all). Or each process replicates its own
: resources.
:
: This is important to me, because lets say I am connection to a
: datasource for which I have a 20 concurrent user license. So I create a
: pool of 20 connections and manage it. This pool is in-memory initialized
: via a static constructor. Now if each worker process tries to load its
: own in-memory pool, then only one process would function because rest
: will be denied the connection. I also have no way of knowing how many
: worker process will run at any moment because they are run based on
: demand by the IIS so I cannot split the load amongst multiple processes
: at an application level.
:
: To me it appears that different worker processes cannot be used to
: execute the requests for one application ... but then MS documentation
: talks about Web Garden where different worker processes execute requests
: for an application domain.
:
: I will be very gratefull if you could share some knowledge on this
: matter. Thanks for your help in advance.
:
: regards,
: Abhishek.



The fact that MDAC does not have it''s process does not mean that it can''t
share connection pools across different applications. I don''t know how you
came to that conclusion.

Jerry

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:u2**************@TK2MSFTNGP12.phx.gbl...

How do the workers synchronize the data? suppose I keep a DOM tree in
the application object.

Now one worker process updates a node in the dom tree. Will other worker
processes (who have thier own version of the in-memory state) see the
changes? What is the mechanism of synchronization.

One question about MDAC. Is MDAC an out-of-process thing? AFAIK, it is a
set of DLLs which run in the memory of the application.(Used MDAC many
times... but never saw a separate exe or DLLHOST begining to run upon
querying my DB) Even if I let the MDAC manage my pool, if multiple
processes are creating their own pools, then what is the total number of
connections beging opened to the database? If I have a limitation on the
max number of connections, then how do I manage it?

Can you please confirm that multiple processes can definetly run execute
the requests for a single application.

regards,
Abhishek.

Ken Schaefer wrote:

Each worker process keeps its own in-memory state. You would need some kind of out-of-process state management if you want to share data between
processes.

Additionally, I would suggest that you are best of managing database
connections via built-in MDAC connection pooling, not through your own
home-grown system. You can limit the number of connections in the pool.

Cheers
Ken

"Abhishek Srivastava" <ab*****************@nospam.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
: Hello All,
:
: In IIS 6.0 We have a concept of worker processes and application pools. :
: As I understand it, we can have multiple worker process per appliction
: pool. Each worker process is dedicated to a pool. If I assign only one
: application to a applicaton pool and have multiple worker processes
: assigned to that pool. Will my application be processed by many worker
: processes?
:
: Why I am asking this question is because there are certain resources
: which are in-memory and are shared at an application level. For example : the database connection pool, or some XML files initialized via a static : contructor.
:
: Now if multiple process are executing my requests, then how do they
: share data (if they do at all). Or each process replicates its own
: resources.
:
: This is important to me, because lets say I am connection to a
: datasource for which I have a 20 concurrent user license. So I create a : pool of 20 connections and manage it. This pool is in-memory initialized : via a static constructor. Now if each worker process tries to load its
: own in-memory pool, then only one process would function because rest
: will be denied the connection. I also have no way of knowing how many
: worker process will run at any moment because they are run based on
: demand by the IIS so I cannot split the load amongst multiple processes : at an application level.
:
: To me it appears that different worker processes cannot be used to
: execute the requests for one application ... but then MS documentation
: talks about Web Garden where different worker processes execute requests : for an application domain.
:
: I will be very gratefull if you could share some knowledge on this
: matter. Thanks for your help in advance.
:
: regards,
: Abhishek.



这篇关于应用程序池中单个应用程序的多个工作进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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