J2EE coding practices for clustered environment?

Discussions

Performance and scalability: J2EE coding practices for clustered environment?

  1. J2EE coding practices for clustered environment? (1 messages)

    Hi,
    I am interested in pointers as far as what NOT to do in an enterprise application (jsp/servlet/ejb + xml + jms + etc.)running on clustered servers. What are known pitfalls, tricks and tips? Any info is appreciated.
    Thanks,
    Alex
  2. Here are some rules that I use, I try to design for a completely stateless environment if possible, in the end there will be less code. If your site will run with multiple non-clustered instances it may even be faster and more reliable, I have seen this when benchmarking Weblogic.

    prefer the database as a single source accross the cluster avoid large amounts of session data if using session replication
    avoid using files
    avoid in memory structures such as caches of transactional data
    cache at the presentation layer if possible
    be careful with JMS, most implementations do not cluster the home destination
    structure your log files so that they can be combined later
    use a hardware load balancer

    Rob
    robmurtha at bebopsoftware dot com
    Bebop Software LLC