Horizontal scaling of JSF 2.0 application

前端 未结 3 1306
被撕碎了的回忆
被撕碎了的回忆 2021-02-09 02:03

Given that JavaServer Faces is inherently stateful on the server side, what methods are recommended for horizontally scaling a JSF 2.0 application?

If an application run

3条回答
  •  孤独总比滥情好
    2021-02-09 02:35

    Here's an idea from Jelastic PaaS:

    Pair-up application instances in 2-server clusters, and apply session replication between those 2 instances within one cluster. Then you can add as many 2-instance clusters as you want and load balance requests between clusters, with each session sticking to the cluster it originated from. Within cluster, requests could be load balanced between instances.

    This way there is some degree of fail safety, since if one instance in cluster fails, the other takes over, with same session state. On the other hand, memory impact is not as severe as with full replication.

    In short, it is combination of 1. and 2. from your question. Of course, there can be more than 2 instances in each cluster, if availability is of greater concern.

    Link to Jelastic docs I lifted the idea from: http://jelastic.com/docs/session-replication.

    Disclaimer: I don't actually know how to configure this with JSF2, and have no affiliation with Jelastic. Just liked the idea and thought it might help.

提交回复
热议问题