Scaling out JSF 2.0 app

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

+5
source share
3 answers

This can be achieved by adjusting load balancing in sticky session mode.

More info

Thus, all your subsequent requests are sent to the same application server.

+2

Jelastic PaaS:

2- . , , , , . .

, , , , . , , .

, 1. 2. . , , .

Jelastic. : http://jelastic.com/docs/session-replication.

: , JSF2, Jelastic. , .

+2

""?

( ), , .

Buddy .

0
source

All Articles