Given that JavaServer Faces is inherently stateful on the server side, what methods are recommended for scaling out a JSF 2.0 application?
If an application starts multiple JSF servers, I can imagine the following scenarios:
- Sticky Sessions: send all requests matching a given session to the same server.
- Question: What technology is commonly used to achieve this?
- Problem: Server error leads to lost sessions ... and usually seems to be a fragile architecture, especially when starting a new one (not trying to scale an existing application)
- State (Session) Replication: JSF State Replication on All JSF Servers in a Cluster
- Question: What technology is commonly used to achieve this?
- Problem: does not scale. cluster shared memory = shared memory on the smallest server
- To instruct JSF (through configuration) to save its state on an external resource (for example, on another server with a very fast database in memory), then access this resource from JSF servers when the application state is required?
- Question: is this possible?
- Assign JSF (via configuration) to be stateless?
- Question: is this possible?
[EDIT]
Updated in response to Ravi's Sticky Sessions offer
source
share