0 Replies Latest reply on Jun 9, 2009 6:07 PM by Mark Varley

    Caching in the cluster: any tips?

    Mark Varley Newbie

      Hi all - I have 2 Jboss (5.0.1GA) instances running on 2 servers fronted by Apache (on a separate) load balancing using proxy balancer with sticky sessions.  This is all working nicely but I would like to optimize the performance through caching and this being my first clustered app I'm trying to get my head around the multitude of caching options available.  I have mysql query cache enabled on my db server and have tuned this with help from the mysqltuner.pl script however I would like to tune the jboss servers as well.

      When my app was running on a single instance I had a single application scoped referenceData pojo class which acted as a factory for all of my reference data, some of which were pulled from static constants (i.e. things which NEVER change) and others from the database, the latter observe any change on the entities to force a refresh.  I also had @Cache(usage=READ_WRITE) annotations on the things which get displayed a lot but may change fairly often such as products I am selling.  This was working fine but I guess will cause me problems in a clustered environment.

      Can anyone recommend a course of action for caching the following based on my architecture:

      • Reference data (e.g. Countries, Credit Card)

      • Transactional Data (e.g. Product, Vendor)

      • Top Ten type Data (e.g. Top 10 Products sold today)

      Any tips at all would be much appreciated - I've read the docs and been googling for the last couple of hours but can't see a clear solution to this.

      Thanks in advance,