473,854 Members | 1,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple worker processes for a single application in a applicationpool

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.
Nov 18 '05 #1
9 23090
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.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.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.
Nov 18 '05 #2
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.(Us ed 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.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.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.

Nov 18 '05 #3
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.ne t> wrote in message
news:u2******** ******@TK2MSFTN GP12.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.(Us ed 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.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.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.

Nov 18 '05 #4
Jerry: To share a connection from an exisitng pool you need to be in
the same process, have the same security context, and use the exact
same connection string as the pool. In .NET you also need to be in the
same app domain which can further subdivide a process.

--
Scott
http://www.OdeToCode.com

On Fri, 30 Jan 2004 10:26:12 -0800, "Jerry III" <je******@hotma il.com>
wrote:
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.ne t> wrote in message
news:u2******* *******@TK2MSFT NGP12.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.(Us ed 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 somekind > 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.ne t> wrote in message
> news:OE******** ******@TK2MSFTN GP11.phx.gbl...
> : Hello All,
> :
> : In IIS 6.0 We have a concept of worker processes and applicationpools. > :
> : 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. Forexample > : the database connection pool, or some XML files initialized via astatic > : 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 createa > : pool of 20 connections and manage it. This pool is in-memoryinitialized > : 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 multipleprocesses > : 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 executerequests > : 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.
>
>


Nov 18 '05 #5
You're kidding, right? What good is connection pooling if it can't be shared
across multiple instances of the same code? How exactly are we supposed to
tune the connection pool size if we (as developers) have no idea how many
connection pools are there going to be since some customers will setup their
web site to run in multiple processes?

Jerry

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:v5******** *************** *********@4ax.c om...
Jerry: To share a connection from an exisitng pool you need to be in
the same process, have the same security context, and use the exact
same connection string as the pool. In .NET you also need to be in the
same app domain which can further subdivide a process.

--
Scott
http://www.OdeToCode.com

On Fri, 30 Jan 2004 10:26:12 -0800, "Jerry III" <je******@hotma il.com>
wrote:
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 youcame to that conclusion.

Jerry

"Abhishek Srivastava" <ab************ *****@nospam.ne t> wrote in message
news:u2******* *******@TK2MSFT NGP12.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.(Us ed 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.ne t> wrote in message > news:OE******** ******@TK2MSFTN GP11.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 createa
> : 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.
>
>

Nov 18 '05 #6
Well, I guess it boils down to this:

It's close to impossible to write a web app without connection
pooling. The overhead of seting up, handshaking, authenticating,
tearing down, etc., is a big hit on perf and scalability.

I could write my own pooling algorithm, but some smart people already
worked on the problem for me and did a tremendous amount of testing.
The pooling in most managed providers is already effecient, secure,
and well behaved.

The built in pooling won't "waste" connections. That is, it wont open
more than it needs at any one moment (unless you've given it a minimum
number to use), and with most of the providers you can set a min and
max pool size. If the pool reaches the max size, additional requests
queue up and wait for a connection to become free.

Now, I realize this doesn't help someone control the *total* number of
connections from thier code in cases where a data access layer appears
in more > 1 processes on a server, but, it is suprising how many
"active" users a .NET app can support when the application is using
then returning a connection to the pool as quickly as possible. With n
connections in a pool an app can service the requests of n or more
users, generally a 'lot' more than n, but again it depends on the
application. You just have to test and benchmark and test again.

If I was in a scenario where I needed to have total control over the
number of connections on a machine, I'd write a ServicedCompone nt for
data access and host it in a COM+ server package. Of course this would
require marshalling of DataSets across processes, which can be a hit.
I'd think this type of scenario is an exceptional case, but I'm sure
it exists somewhere.

--
Scott
http://www.OdeToCode.com
On Fri, 30 Jan 2004 14:30:35 -0800, "Jerry III" <je******@hotma il.com>
wrote:
You're kidding, right? What good is connection pooling if it can't be shared
across multiple instances of the same code? How exactly are we supposed to
tune the connection pool size if we (as developers) have no idea how many
connection pools are there going to be since some customers will setup their
web site to run in multiple processes?

Jerry

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:v5******* *************** **********@4ax. com...
Jerry: To share a connection from an exisitng pool you need to be in
the same process, have the same security context, and use the exact
same connection string as the pool. In .NET you also need to be in the
same app domain which can further subdivide a process.

--
Scott
http://www.OdeToCode.com

On Fri, 30 Jan 2004 10:26:12 -0800, "Jerry III" <je******@hotma il.com>
wrote:
>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 howyou >came to that conclusion.
>
>Jerry
>
>"Abhishek Srivastava" <ab************ *****@nospam.ne t> wrote in message
>news:u2******* *******@TK2MSFT NGP12.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 otherworker >> 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 isa >> set of DLLs which run in the memory of the application.(Us ed 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 numberof >> connections beging opened to the database? If I have a limitation onthe >> max number of connections, then how do I manage it?
>>
>> Can you please confirm that multiple processes can definetly runexecute >> the requests for a single application.
>>
>> regards,
>> Abhishek.
>>
>> Ken Schaefer wrote:
>> > Each worker process keeps its own in-memory state. You would needsome >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 yourown >> > home-grown system. You can limit the number of connections in thepool. >> >
>> > Cheers
>> > Ken
>> >
>> > "Abhishek Srivastava" <ab************ *****@nospam.ne t> wrote inmessage >> > news:OE******** ******@TK2MSFTN GP11.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 perappliction >> > : pool. Each worker process is dedicated to a pool. If I assign onlyone >> > : application to a applicaton pool and have multiple worker processes
>> > : assigned to that pool. Will my application be processed by manyworker >> > : processes?
>> > :
>> > : Why I am asking this question is because there are certainresources >> > : 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 Icreate >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 loadits >> > : own in-memory pool, then only one process would function becauserest >> > : will be denied the connection. I also have no way of knowing howmany >> > : 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 MSdocumentatio n >> > : 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.
>> >
>> >
>


Nov 18 '05 #7
A given worker process can have multiple threads servicing requests. These
will all share the same connection pool. I don't understand how two
arbitrary w3wp.exe processes would share the same connection pool however.

If you're writing an application that requires multiple w3wp.exe (web
garden), then you probably already have a internet connector-type licence
for SQL Server (rather than 10 CALs or similar). The connection pooling
provided by the MDAC components is quite good IMHO.

Cheers
Ken
"Jerry III" <je******@hotma il.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
: You're kidding, right? What good is connection pooling if it can't be
shared
: across multiple instances of the same code? How exactly are we supposed to
: tune the connection pool size if we (as developers) have no idea how many
: connection pools are there going to be since some customers will setup
their
: web site to run in multiple processes?
:
: Jerry
:
: "Scott Allen" <bitmask@[nospam].fred.net> wrote in message
: news:v5******** *************** *********@4ax.c om...
: > Jerry: To share a connection from an exisitng pool you need to be in
: > the same process, have the same security context, and use the exact
: > same connection string as the pool. In .NET you also need to be in the
: > same app domain which can further subdivide a process.
: >
: > --
: > Scott
: > http://www.OdeToCode.com
: >
: > On Fri, 30 Jan 2004 10:26:12 -0800, "Jerry III" <je******@hotma il.com>
: > wrote:
: >
: > >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.ne t> wrote in message
: > >news:u2******* *******@TK2MSFT NGP12.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.(Us ed 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.ne t> wrote in
: message
: > >> > news:OE******** ******@TK2MSFTN GP11.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.
: > >> >
: > >> >
: > >
: >
:
:
Nov 18 '05 #8
Thanks everyone for replying. Does anyone know someone who has much more
internal knowledge of IIS ?

If different worker process run in full isolation from each other, then
application programmers must be careful in managing static resources.
because updates made in one process may not be visible to another.

If the processes do talk to one another and synchronize data from time
to time, then we must know some details about how this is being done.
Otherwise the application can behave unpredictably because of data
synchronization issues.

Take another example:

I make a request to the IIS and wp1 picks up the request from the
http.sys queue for the first time. When next call was made wp2 picks up
the request from the queue. But wp2 does not have my session data so it
cannot process my second request.

If the data from wp1 is replicated to wp2 (by some unknown means) then
it would bean that each worker process replicates its data into all
other worker processes. This would really impact scalability of each
worker process.

The other solution can be that there is a worker process sticky-ness. so
that the request goes to the same worker process which had the session.
But this would defeat the purpose of having a http.sys queue based
request processing approach.

So unless something very magical is happening inside, I feel that only
one worker process can process requests for a application (the worker
process can be shared by many applications inside the same application
pool). I also discussed this with a friend who felt that the concept of
web-garden means multiple "processors " (CPU) not multiple processes.

I am really confused now.... please advise.

regards,
Abhishek.

Ken Schaefer wrote:
A given worker process can have multiple threads servicing requests. These
will all share the same connection pool. I don't understand how two
arbitrary w3wp.exe processes would share the same connection pool however.

If you're writing an application that requires multiple w3wp.exe (web
garden), then you probably already have a internet connector-type licence
for SQL Server (rather than 10 CALs or similar). The connection pooling
provided by the MDAC components is quite good IMHO.

Cheers
Ken
"Jerry III" <je******@hotma il.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
: You're kidding, right? What good is connection pooling if it can't be
shared
: across multiple instances of the same code? How exactly are we supposed to
: tune the connection pool size if we (as developers) have no idea how many
: connection pools are there going to be since some customers will setup
their
: web site to run in multiple processes?
:
: Jerry
:
: "Scott Allen" <bitmask@[nospam].fred.net> wrote in message
: news:v5******** *************** *********@4ax.c om...
: > Jerry: To share a connection from an exisitng pool you need to be in
: > the same process, have the same security context, and use the exact
: > same connection string as the pool. In .NET you also need to be in the
: > same app domain which can further subdivide a process.
: >
: > --
: > Scott
: > http://www.OdeToCode.com
: >
: > On Fri, 30 Jan 2004 10:26:12 -0800, "Jerry III" <je******@hotma il.com>
: > wrote:
: >
: > >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.ne t> wrote in message
: > >news:u2******* *******@TK2MSFT NGP12.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.(Us ed 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.ne t> wrote in
: message
: > >> > news:OE******** ******@TK2MSFTN GP11.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.
: > >> >
: > >> >
: > >
: >
:
:

Nov 18 '05 #9
Jerry III wrote:
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.ne t> wrote in message
news:u2******** ******@TK2MSFTN GP12.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.(Us ed 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
connection s 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.ne t> wrote in message
news:OE***** *********@TK2MS FTNGP11.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.


just for my knowledge, does mdac or ado.net operates on some shared
memory between processes ?
how can i see how much that shared memory is

we are running an web application and trying to chase some lost memory,
some people have also talked about some issue recognised by microsoft as
abug ( gc not returning large object heap to OS ) . but i did not find
any article on microsofts website on this

Thanks
-ashish

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4905
by: Mark | last post by:
Hi... We're looking at moving an ASP app from IIS 5 to IIS 6. In general things seem to be working okay, but there are some oddities around the edges. One of those unanticipated changes has to do with the new process model and the option to have more than one worker process per web instance. We found that each worker process has its own Application() state and anything your app puts there/uses gets a new copy for every worker...
1
9617
by: Dominic | last post by:
I'd like to tune the performance of my application in a web garden. Our server has dual processors. Is there any guideline to set this "maximum number of worker processes" for web garden? In my application, stress test shows that setting it to 2 gives a better performance result. In other words, web garden helps. My first question is if it helps to set a number larger than the number of processors in the server. Are they related at all? ...
6
1758
by: Param R. | last post by:
Hi all, lets assume my application is running under an app pool that has 2 worker processes servicing requests. Will the Application & Cache objects be the same & concurrent amongst all requests? i.e. does each worker process have its own copy of Application & Cache or do they both share them? thanks!
0
2215
by: domtam | last post by:
Hi everybody, As far as I understand, each worker process in a web garden (say, in IIS 6.0) has its own copy of Cache objects, static objects and Application(state) objects. In other words, they cannot be shared across worker proesses. Suppose my ASP.NET applications runs in a web garden with multiple worker process (set in IIS 6.0 manager / Application Pool / Performance tab / Web Garden). Is there any easy way that I can share some
1
1347
by: mabrin | last post by:
Hi, we use 5 worker process on win2k3 to serve. We have a small form with a post back. It nearly almost throws "Unable to validate data" (ViewState is not getting too long). We save your session infos in SQL Server. If we turn down the processes to one, everything is alright. Does anyone know which relationship/dependencies are there between viewstate, no. of process and sessions?
0
1114
by: Rusty Shackleford | last post by:
I am having trouble getting my ASP.Net applications and sessions to stay running. At first, I thought it was my lack of understanding of ASP.Net, or the fact that I am using Anonymous authentication. But, the ASP.Net\Worker Processes Running counter increments by one every time I load an ASP.Net page. The counter is giving 50, or 60, or whatever, but there are no aspnet_wp.exe processes running. There are no errors in the Application...
6
5009
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
0
1298
by: YVT1968 | last post by:
Hi, Here is the problem statement. I have an asp.net application, let's call it "A". From this application, I open 3 more applications, let's call them, A1, A2, A3. Now, in the default page on A, I have a logout button. On clicking of this logout button, I want to clear session for A1, A2 and A3. The three applications have three different sessions. This is apparent from the fact that, a session variable set in one application cannot be...
0
1179
by: Diffident | last post by:
Hello All, I have a question about worker processes and session state. If I set-up a web farm architecture by having multiple worker processes serving a single application, how will the session state be affected? For example, let's consider that a user A requested for page A and after some time the same user requests page B. In both these cases, will a new Session ID be created?
0
9751
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9512
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7912
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5740
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4152
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.