Expand my Community achievements bar.

SOLVED

Sticky session vs Coherence*Web in Production environments

Avatar

Level 3

 In the clustered environment (multiple publish instances) Sticky load balancing/Sticky session has to maintained due to the fact that user requests across a set of servers should be in such a way that requests from a given user are consistently sent to the same server.

Now recently I have come across Coherence*Web in oracle docs which maintains the one single location for session variable storage so the clustered environments (i.e. different JVM's) can access the session objects. If this is achieved there is no need for sticky sessions where we can achieve optimized load balancing. This approach provides looser coupling between Web applications, but suffers from a performance impact because objects must be serialized-deserialized for transfer between cluster members.

My question are

1. Is there any Coherence*Web implementation OOTB in AEM.

2.Which approach is better either Sticky session or Coherence*Web in AEM perspective.(In most of the production environments I have seen using sticky sessions)

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

the feature you're looking is session replication and it is not specific to Weblogic, it's also available for example in Tomcat [1]. So it's a feature of the application server and not a feature of the application. You can run AEM on an application and use server-side sessions and session replication. I've never done this in my projects. Depending on your individual usecase it's either the only viable solution or just overkill and un-necessary complexity.

Sticky session is of course the simplest solution and for many cases the right approach. I would start with that first and if it turns out, that it doesn't fulfill the requirements, you can choose a more sophisticated and complex solution (session replication is also not for free!).

Jörg

[1] https://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Hi,

the feature you're looking is session replication and it is not specific to Weblogic, it's also available for example in Tomcat [1]. So it's a feature of the application server and not a feature of the application. You can run AEM on an application and use server-side sessions and session replication. I've never done this in my projects. Depending on your individual usecase it's either the only viable solution or just overkill and un-necessary complexity.

Sticky session is of course the simplest solution and for many cases the right approach. I would start with that first and if it turns out, that it doesn't fulfill the requirements, you can choose a more sophisticated and complex solution (session replication is also not for free!).

Jörg

[1] https://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Avatar

Employee

Hi,

what is your use case that requires a sticky connection(each request to AEM is stateless, so hence sticky connection and not sticky session)

I can see the requirement if you have logged in(not in AEM6.1 though[1]), in previous versions of AEM the token only existed on the instance you logged into. 

Regards,

Opkar

[1] https://docs.adobe.com/docs/en/aem/6-1/release-notes.html