Scaling Up Your Java EE Applications

A decent article on scaling up your java applications: Scaling Your Java EE Applications

Here’s a list of tips:

  1. Make synchronized blocks as short as possible
  2. Reduce lock granularity
  3. Avoid lock on static methods
  4. Use lock free data structure in Java SE 5.0
  5. Be ware of race conditions: HashMap bug / consider using ConcurrentHashMap
  6. Use Non-Blocking I/O for high concurrency (Tomcat uses Blocking I/O, Glassfish uses Non-Blocking)
  7. Parallelize single-thread tasks if possible by seeking independence in order of operations. JOMP or Parallel Java may be used to simplify this task.
  8. To scale up in memory use multiple JVMs and limit the memory allocated to each to about 3GB or less.
  9. Database - pay attention to isolation levels. keep stored procedures to a minimum.
  10. Be ware of operating system and disk I/O limitations such as have a large number of files in one directory.
  11. Synchronous logging

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment