ASP.NET State Service vs. SQL

  • Thread starter Ian Jenkins, MCSD
  • Start date
I

Ian Jenkins, MCSD

I have a web farm set up using NLBS. I need to manage sessions in one
central location. As I see it I have 2 options:

SQL SERVER
ASP.NET State Service

Which has better performance? What is best to use in a situation like
this?

Can ASP.NET State Service be run across 2 servers? What if I used the
clustered web farm ip address as the State Server?
 
N

Nicholas Paldino [.NET/C# MVP]

Ian,

Both of them require serialization and hops across the network
(possibly). I haven't gauged performance, but if I had to guess, I'd say it
was pretty much the same. However, I would do some research on the web. I
don't think that it would be hard to find the numbers.

As for what is best to use in a situation like this, I think that either
will do fine. They should both be able to serve session state to web farms.

As for ASP.NET State service being run across two servers, I don't
believe that is possible. If it was on two servers, then you would have to
indicate where to get your state from, and there is no mechanism to do that,
I believe. Also, I wouldn't host SQL/State server on one of the web
servers. The idea of having it on a separate machine is to provide fault
tolerance in the event the web server goes down.

Hope this helps.
 
M

Michael Nemtsev

Hello Ian,

The main difference is whether do u need to replicated state or not, and
do u need reliability in case of failover

StateServer, by defaulf is not scalable, it's only one server for cluster
and it losts state in case failback.
SQLServer could replicated state amond other nodes in cluster, and it's reliable
in case of failback.

BTW, I've described in my article how to give scalability to the StateServer.
You can read it here: http://spaces.msn.com/laflour/blog/cns!7575E2FFC19135B4!355.entry

IM> I have a web farm set up using NLBS. I need to manage sessions in
IM> one central location. As I see it I have 2 options:
IM>
IM> SQL SERVER
IM> ASP.NET State Service
IM> Which has better performance? What is best to use in a situation
IM> like this?
IM>
IM> Can ASP.NET State Service be run across 2 servers? What if I used
IM> the clustered web farm ip address as the State Server?
IM>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top