> I've been pondering... I have a large amount of data in my
> session scope on my site, and since upgrading to CFMX Enterprise
> (one single server with 2 CFMX instances via Jrun) and using
> object (session) clustering, this seems to cause a problem
> because the session variables continually get copied back
> and forth. My CPU usage goes up and, sooner or later, my box
> goes down.

You're running into this problem with two instances on a single machine?
I've only seen it when session data is replicated across machines. Are you
putting a lot into the session scope? Are you using JRun clustering, or web
server clustering? Are you sure that the CPU usage is being caused by
session data replication? Maybe you simply don't have enough resources for
two instances.

> I read that CFCs saved in the session scope are not replicated
> across clusters. This could be a good thing... If I store my
> large amounts of data in a cfc (even with all vars public if
> need be), it should keep it from getting copied across the
> cluster, right? Could this save my box from crashing?
>
> Now one more related question... if this really does work and
> my session data is kept to a single cf server instance, wether
> i put it in the session or in the application scopes, how can
> I make sure a person stays on the one cfmx instance for their
> entire visit and not get round-robin'd to the other one?

Yes, CFCs in the session scope aren't replicated across clusters. Typically,
this is considered a problem, and it's resolved by writing serialization and
deserialization methods, so that you can store the data from which to
construct an object instance in the session scope, rather than the instance
itself.

If you really think that session replication is the problem, you probably
don't want to use session data, or you don't want to use clustering. I would
advise against having some data replicated and other data not replicated,
depending on whether it's in a CFC instance or not.

I don't know of any way using JRun clustering to enforce "sticky" sessions -
that's typically done with web server clustering by having the cluster
manager issue a cookie at each initial request, and redirect future requests
to each server depending on the cookie value.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to