Search code examples
javaspringwebsphere

Session Management on Websphere


We are building simulations of the production scenario where we want to run 20 instances of the application in 20 Application Servers under Websphere cluster. Here when user-n logs in we want to allocate server-n instance to him and ensure no other user can use the same server until user-n is active on that server. I can think of using round robin load balancing from within plugin-cfg.xml file but how can I ensure that only one user(or Session) is allocated to the server instance. When there are more users than available servers we want to block them on UI suggesting to try after some time. Our application is spring based.

Use Case: In the use case we are trying to address above, users expect to simulate futuristic scenarios on snapshot of production data and calculate results which will help them in decision making. E.g. What happens when some master data changes, how my inventory will change etc. These operations are expected to happen in isolation where user-1 should not see changes made by user-2 rather expects to have production snapshot always. To address this we wanted to provide a Application + Data base copy in dedicated container/VM and this is where we want to restrict user to single server. Since application which I am talking about is already developed and in production we do not really want to make any major changes. One of the solution that we also thought was to provide virtualized DB schemas to each user inside single application but due to the back-end limitations we are not able to scale this approach and another issue in this case snapshots take long time.


Solution

  • In practice this is not feasible and not the intent of how application servers are used.

    In a toy environment, you could configure Apache/IHS with a single child process (MaxClients == ThreadsPerChild), then configure WAS Plugin with MaxConnections=1, and of course only run a single webserver instance.