-
1. Re: Wildfly 10 very slow in cluster with session replication
lagoria Nov 27, 2017 7:36 AM (in response to lagoria)Update: Now I am getting timeouts errors from the infinispan cache.
From my point of view session replication just doesn't work (and can you find other people saying the same complaining about bug ISPN000299).
Fortunately, session replication is not very important to me. I am ok if WildFly still can replicate my EclipseLink L2 cache (this is done through clustered JMS) and some Infinispan replicated custom cache I am using to save on sql queries.
At this point, my question is: can I just drop the <distributed /> tag in web.xml and still use the <distributed-cache> provided from the standalone-full-ha profile or should I configure a local cache?
-
2. Re: Wildfly 10 very slow in cluster with session replication
pferraro Nov 27, 2017 8:50 AM (in response to lagoria)- Which WildFly version are you using?
- Don't use ASYNC mode. This does nothing to improve performance - and will only exacerbate thread contention. Infinispan cache txs are committed after the response is sent to the client, so the behavior of a SYNC cache is already asynchronous from the perspective of a web client.
- Are you load balancing requests to your cluster? If so, do you have sticky sessions enabled? If not, performance will be impacted as transactions against the session must be coordinated by the node owning the associated Infinispan cache entries.
- Does your application process concurrent requests for the same session? If so, you will likely observe better performance using the "concurrent" cache configuration.
-
3. Re: Wildfly 10 very slow in cluster with session replication
lagoria Nov 27, 2017 8:50 AM (in response to pferraro)Thanks for your reply.
1. Version is 10.1.0.Final
2. ok but the configuration I pasted comes straight from default standalone-full-ha profile. You should probably fix the provided configuration if that's not ideal.
3. I will, at the moment I was just sending all requests to one node though.
4. Nop, also I was testing it using JMeter that I am pretty sure does not send in session parallel requests by default (thus waits for a response before sending a new HTTP request).
Now that I am using a non clustered session configuration (no distributed tag in web.xml), performance is so much better and there is no Infinispan timeout error or slow down caused by infinispan. Anyway I am still using full-ha to leverage clustered JMS and infinispan replication (but not in web cache).
-
4. Re: Wildfly 10 very slow in cluster with session replication
pferraro Nov 27, 2017 9:06 AM (in response to lagoria)- 11.0.0.Final will deliver better performance and improved stability.
- We did. wildfly/infinispan.xml at 11.0.0.Final · wildfly/wildfly · GitHub
- OK - that's fine for measuring performance, as cache entries are owned by the node that created the session. Ownership can only change in response to a cluster topology change (i.e. nodes joining/leaving).
- If the response contains links for session specific artifacts (e.g. stylesheets, images, etc.) does JMeter send subsequent concurrent requests for these? Or do the measurements only include the initial response? If these linked artifacts are not user specific - make sure you do not append the JSESSIONID to these, as that will result in unnecessary operations on the Infinispan cache - and would have a sizable impact on performance.
If you don't need HA web sessions - why enable it in the first place? It would be unreasonable to expect comparable performance between a distributed session manager and a simple in-memory session manager - regardless of vendor.
-
5. Re: Wildfly 10 very slow in cluster with session replication
lagoria Nov 27, 2017 9:20 AM (in response to pferraro)I'll try WF 11 then.
As for point 4, I have excluded every css,js,images etc resources, so it's not the case.
Need for HA: would have been a nice plus in case of single node failure. However I don't expect frequent failures, so if users (once in a year hopefully) are just logged out and redirected to the page they were before, should not be a big issue after all.
Performance: yes I realise what you say now. I reckon this is especially true if you are using JSF with a good number of session or view scoped beans.
Ah, my original question still applies: if I am not using HA web sessions, should I configure a web <local-cache> instead of the one provided by default in standalone-full-ha profile?
-
6. Re: Wildfly 10 very slow in cluster with session replication
pferraro Nov 27, 2017 9:34 PM (in response to lagoria)lagoria wrote:
Ah, my original question still applies: if I am not using HA web sessions, should I configure a web <local-cache> instead of the one provided by default in standalone-full-ha profile?
You can, but only if you need the behavior it enables. There are 2 Infinispan configurations for distributable web sessions in standalone.xml (or standalone-full.xml) that do just this, to support a distributable session manager that supports session passivation, where old sessions are persisted to disk when the number of active sessions exceeds a given threshold; and another that support persistent sessions, where session are persisted to disk per request. The former is more performant, though a node crash will result in loss of session data.