Caching ColdFusion Web Application Layer Queries

We have multiple web servers, each running one version of ColdFusion. The cluster has a load balancer in front of it.

Obviously, each of these servers has its own CF application and this implements query caching at the CF application level. However, since these servers are all serving the same web application, many of these cached requests are duplicated across CF application instances.

Is there a way to implement request caching at the web application level, i.e. in many CF instances. Or if it doesn't, is there a better way to set up our cluster to minimize the load on our database server?

Hope I said clearly :)

Cheers, Ciarán

+1


source to share


5 answers


Decided to use EHCache on each of our web servers as it allows for partial page caching and can be expanded to a centralized cache server like memcached. Very happy with it so far.



Thanks a lot for all the suggestions!

+1


source


You might consider giving memcached a try.



+3


source


I'd take a look at memcached - there is an open source project here for integrating it into ColdFusion: cfmemcached .

If you are using Railo I have heard that it also has a "clustered" volume.

If none of these are available or reach out to you, you can alternatively configure one of your servers to handle the requests you want to cache and then retrieve them from that server directly through the web service. This way you can only cache them on one server, which will reduce the amount of memory in the cluster and also reduce the frequency of access to the db server. You might want to take a server that handles request caching from the cluster and just devote it to request caching and what you want to disconnect from front-end computers while others handle external traffic.

+2


source


you can group and own an application scope shared across servers, but you must use an enterprise version of ColdFusion. More information here: http://livedocs.adobe.com/coldfusion/7/htmldocs/00001774.htm

0


source


Session scope can be grouped in ColdFusion if you enable j2ee sessions. But the whole cluster area is copying data across servers. This way, the requests will still be copied across all three servers. So, you will return to where you are now.

However, I would just use the CachedWithin cfquery attribute instead of using the application scope. This is how you let the CF engine do the cache management. Keeping memory out of control and you don't add the overhead of copying large amounts of data between servers.

0


source







All Articles