Anyone else running ColdFusion 8.0.1 in production on 64-bit Linux or are we the first company to do so (on our twelve-server cluster)?
And if you have time for 1 more quick question please, what is each servers typical memory usage - I'm wondering if each server has to keep all of the servers' sessions in memory in case of failover?
I've always advised not using it (and Mike Brunt also mentioned this in his talk at cf.Objective() saying that there are many problems with it).
2nd: Session Replication: In the back of my head I remember there were CFC issues with that; but they should have vanished, shouldn't they ? So if session replication is still not recommended, what does this mean for ColdFusion apps which are meant to be highly scalable ? What is the concrete impact ? And the recommended workaround to avoid this probably bad impact ?
@Kai - 2 - my issues with session replication have nothing to do with CFCs (although now that CFCs do replicate, you face the same problems with them that exist with duplicate() - it does a *deep* copy and that will break any code that stores a reference to a singleton into a transient object in session scope, e.g., using Transfer ORM and putting a user object in session scope). Session replication is not good in high-scale environments - there is latency between servers and a lot of network "chatter" if you use session scope heavily.
The recommended setup is no session replication and use sticky session on your hardware load balancer. If you have absolutely critical data in session (almost no applications actually do) then it makes sense to save it to a DB on changes and reconstruct it if the session data is missing (this is what adobe.com does with the shopping cart, for example).
Keep us up to date how this goes. We're planning a move to 64 bit and to clustering as well, so your thoughts/notes are very valuable.
Are there alternative solutions perhaps?
Session replication just does not work properly. You can fail over to a buddy server before the session data has fully replicated, CFCs are replicated as a deep copy and I've already explained - at length - why duplicate() on a CFC can be very dangerous.
Those are some of the reasons why adobe.com (and formerly macromedia.com) does not use session replication and why to this day I don't use it on high-traffic sites.
We implemented a high traffic ticketing system, think Ticketmaster, deployed on a cluster of Websphere servers and we used sticky sessions (enabled on the BigIP Load Balancer).
We saved user session information back to an Oracle DB so that it could be reconstructed.
No CF involved anywhere. The problem isn't CF or Adobe. Session Replication just sucks.
Hmm, now if only someone could blog about how to emulate session replication in a cluster without having to re-write an app that relies heavily on the session scope. :-)
Like Mike, I never advise session replication, especially on JRun. I also never advise client variables - either you get a DB hit on every request or you're using cookies (or your foolish enough to use the registry :) If you have client variables set to cookies, why not just use cookies in the first place since you have more control over them manually.
My primary recommendation is session scope and sticky sessions (with a load balancer that actually works :)
I'd like to know more about Andy Allen's technique for cross-server session sharing via a db. (We have 1 to 3 db requests per page so 1 more wouldn't make much difference). I guess it's a company secret or Andy would have spilled the beans by now. :-)
adobe.com uses sticky session and no session replication. For the online store, it saves the cart to the DB on each request so that if your session is lost due to failover, it can recover your cart but it will make you re-authenticate in order to purchase.
There are occasional applications that require 100% availability and need to handle session failover but since that is the edge case, you're much better handling that by using an encrypted cookie for "identity" and recovering the session data from the DB if it isn't present. For example, a User object can be easily restored if you have the user identity cookied.
Session replication is expensive on a high traffic site with a decent sized cluster. Session replication also has latency issues so you can actually have failover and get out-of-sync session data - and, as noted above, if a request is already committed to a server and the server dies, session replication doesn't help you.
Unfortunately slightly off topic, but the load balnacer is set up for sticky sessions and as far as I know it is working. Client Vars. are being stored in MSSQL DB, problem that is arising is when someone starts an insurance application in more than one window. The load balancer sees this as the same session (therefore sticky) but the client variables become corrupted between the two browser tabs. Say a date in one window overrides a date in the other.
I don't think that even using Session scope would prevent this, since session.effectiveDate would exist and "have" to be written to each time. I guess my question is has anyone had this isssue before, and if so, how did you fix it. (Personally I'm at a loss ;) )
You need to identify each workflow uniquely across requests, rather than relying on a simple server-side solution.
We are trying to setup the Cluster Load balancing in CF8 server with 4 instances on 2 different physical boxes. Below is our server configuration details:
Fedora 9 64bit, CF 8 64 bit Ent-trail edition.
Setup Details: 2 Linux boxes, 2 CF instances on each box. CF is setup as given in different posts, in Multiserver environment. We created 2 instances of CF in both boxes called, CF1, CF2 in BOX1 and CF3, CF4 in Box 2.
Issue: The issue we are having here is, when we add a remote server Box2 instance to Box1, it shows "Network Error". Where as when we check the same using JRun Admin console, it says "The server "cf3" is unavailable for administration on its specified host "10.10.0.14". Please make sure that the server exists, and that at least one server is running and registered with the JMC on the given machine."
We have done following things after going through some posts,
- jrun.subnet.restriction=* - jrun.trusted.hosts=* - We telnet'ed to the running instances port nubmers on other box2 from box1 and vice versa and we are successfully able to connect to each of them from either boxes. - We have disabled firewall on both the servers.
Can you please guide us on the above. Let us know if - we need to do anything else as this is a 64bit server? - Is there any issue with 64bit edition of CF8 on Linux? - Do we need to first join the CF to web server then configure the instances?
It will be great if anyone can help us out of this situation. Thank you in advance.
In particular, note the section on ensuring the JRunProxyService is *not* deactivated on the various instances. That caused me a bit of a problem at first.


