Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing ASP.NET State databases between multiple apps

Is it better for a collection of ASP.NET web apps to share the same session database, or should each one have its own?

If there is no significant difference, having a single database would be preferable due to easier maintenance.

Background

My team has an assortment of ASP.NET web apps, all written in either Monorail 1.1 or ASP.NET MVC 1.0. Each app currently uses a dedicated session state database. I'm working on adding a new site to that list, and am debating whether I should create another new session database, or just share an existing one with another app.

like image 352
MikeWyatt Avatar asked Apr 07 '10 14:04

MikeWyatt


2 Answers

The original question was "Share the same Session Database". I see this as different from the Application's Database. ASP Session for all applications would be the same. You would not be modifying the Schema for any of the Session Tables, SP's etc... We host a number of applications, each with their own private Database for the aplication data, and a single shared Database for session.

like image 122
Jon Proctor Avatar answered Sep 28 '22 02:09

Jon Proctor


I would vote for separation here.

I don't think you'll necessarily find that it's "easier maintenance" in the long run to stuff everything into one database. If every app is using the same table and database instance, you can't separate one application from the pool without duplicating the entire database. What if one app goes viral and needs to be moved to it's own server cluster?

For the amount of work it takes to copy a database to a new instance, you'll be separating the concerns of the applications, making it easier to debug them individually, more scalable and much more portable.

like image 23
womp Avatar answered Sep 28 '22 02:09

womp