• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to implement a share-nothing architecture with CF8?

New Here ,
Aug 23, 2007 Aug 23, 2007

Copy link to clipboard

Copied

Hi All -

I'm currently running a very large scale CF app using CFMX over J2EE, in a cluster of CF enterprise servers of course, with a mySql cluster as the backend. The performance is really good using a mix of in-memory variables and disk caching. However, the scaling is a pain :-D

For my next project I want to go for a share nothing architecture. Meaning if we need more headroom for more users we just slap a new box in the datacenter. I have only 2 questions:

- Is there an existing "share nothing" CF framework I could inspire myself from?
- How can I manage sessions in such an environment? I imagine they would all have to be commited to DB, but how can I recognize a user is logged in when they come knocking, and how can I manage session expiration? 'Could CF Store session in DB' option be the solution?

Any pointers, advice etc would be much, much appreciated!

Thanks in advance!!

CFFan3
TOPICS
Advanced techniques

Views

338

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

Take a look at ClusterCats with session-awareness also known as "Sticky" sessions.

Reference:

Managing Clusters with Enterprise Manager and Packaging Applications in ColdFusion MX 7
http://www.adobe.com/devnet/coldfusion/articles/clustering.html

(This might me outdated since it doesn't mention anything above 6.1)
ClusterCATS Supported Platforms Update
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18991&sliceId=2

Managing Session-Aware Clusters
http://www.adobe.com/devnet/server_archive/articles/managing_session-aware_clusters.html


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

Sorry C_wigginton, but my question was actually trying to figure out the exact opposite. I don't want in-memory anything. Clusters is what I'm using at the moment. I want to step away from that and use CF the way PHP does thing: nothing in memory, nothing on the application server, everything in the DB.

Is there a way?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

When you say "The way PHP does things", are you referring to the serilization of session information (see php link below). Normally the session information on a single server (PHP) is written to a file in a temporary session folder but can be serialized to a database through custom session handlers.

As far as doing the same in ColdFusion, you probably want to look at using J2EE Session Management which would let you serialize the Session Scope and implement Session Swapping. The "Persistent session failover in JRun" article below discusses some of this.

The end result is the same in that you have to serialize the session state and then persist that data in a manner that is accessible to any system in the cluster, so that on subsequent hits, the user's session can be de-serialized.

Reference:
(PHP) Session Handling Functions
http://us.php.net/session

Stateful Session Clustering: Have Your Availability and Scale It Too
http://www.devx.com/Java/Article/32603

ColdFusion and J2EE session management
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/shared29.htm

Persistent session failover in JRun
http://livedocs.adobe.com/coldfusion/6/Using_ClusterCATS/config9.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

Yup - nice one 😄 THANKS!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 07, 2007 Sep 07, 2007

Copy link to clipboard

Copied

LATEST
And if you want the equivalent of session management, but where session data is stored in the DB, then use Client variables instead of Session, and have your Client variables use a DB instead of Registry or Cookies.

Note that to scale well you should put the Client variable DB tables on a separate DB from the one(s) your app uses, that you can't store complex data easily in Client variables, and you should make sure to regularly purge the table data and put efficient DB indexes on them. If you do all that, it's a very nice, simple, scalable solution for CF.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation