These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Multiple IIS sites and SysCache
PostPosted: Wed Apr 09, 2008 7:30 am 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Hi,

If we have multiple IIS sites that are configured to use the same application pool, will they share a common second level cache (SysCache) of NH objects, i.e. is the cache tied to the application pool?

Thanks,

Jason


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 8:04 am 
Regular
Regular

Joined: Wed Jun 21, 2006 3:13 pm
Posts: 110
Even though everything is in the same app pool, each of your sites will still be in their own app domain.

SysCache uses HttpRuntime.Cache internally. HttpRuntime is per app domain, not app pool.

From: http://msdn2.microsoft.com/en-us/library/aa479328.aspx

Quote:
Each AppDomain has its own instance of the HttpRuntime class—the entry point in the pipeline. The HttpRuntime object initializes a number of internal objects that will help carry the request out. Helper objects include the cache manager (the Cache object) and the internal file system monitor used to detect changes in the source files that form the application. The HttpRuntime creates the context for the request and fills it up with any HTTP information specific to the request. The context is represented by an instance of the HttpContext class.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 8:17 am 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Thanks.

Do you know if there is a way to share an app domain across multiple IIS sites?

Essentially, I need to have multiple domain names pointing to the same application code and sharing the same database. I really need to have a single NH cache shared by all of these sites otherwise things could get out of sync.

I need to have separate IIS sites because each domain name will have its own SSL certificate.

Jason


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 10:22 am 
Regular
Regular

Joined: Wed Jun 21, 2006 3:13 pm
Posts: 110
jason.hill wrote:
Thanks.

Do you know if there is a way to share an app domain across multiple IIS sites?

Essentially, I need to have multiple domain names pointing to the same application code and sharing the same database. I really need to have a single NH cache shared by all of these sites otherwise things could get out of sync.

I need to have separate IIS sites because each domain name will have its own SSL certificate.

Jason


Off of the top of my head, I think you might want to look at MemCache or SysCache2. With SysCache2, I think you can have SQL Server as a backend and use database-based expiry.

I don't know that there's any way to share an app domain across IIS servers. You'd need to create something out of process and then have your app instances call into that process. One of the above options, memcache or syscache2, would probably be easiest.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 5:32 pm 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Quote:
I don't know that there's any way to share an app domain across IIS servers


All of the websites are on a single IIS server so I don't need to share the cache across multiple servers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.