0
votes

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.

1
So you want only single user to be active for whole server?? Thats horrible waste of resources, and not really good design.Gas
Thanks, may be because I did not explain use case in my question. I added use case details now. Hope this helps.Vaibhav Chavan
So from my point of view it looks like a playgroud/sandbox for users. In that case I'd suggest to create container like vmware image or docker, with WAS and database, and instantiate it on demand for requesting user.Gas
thanks Gas, that's one of the solution we have in mind as well. Not sure though if we will use Websphere within docker in that case. I exploring Websphere cluster option in case client does not want to go for docker due to their infrastructure constraints.Vaibhav Chavan

1 Answers

1
votes

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.