Clustering overview and misconceptions
Clustering is the ability to mitigate and take care of server failures, such as JVM crashes, physical server crashes, network unavailability, and everything that can take down your system.
Clustering means that when your application is running on a server, it can continue its task on another server exactly at the same point it was at, without any manual failover. This means that the application's state is replicated across cluster members.
The term clustering is meant at the application level; it's not a system cluster, thus at OS level. Hence, your applications, at least your web application, needs to be cluster aware, which means that it needs to be declared as distributable in its deployment descriptor, as follows:
<web-app> <distributable/> </web-app>
Pretty easy, right?
Note
One more thing that you should keep in mind is that clustering a stateless application does not make sense, so your RESTful Web services do...