I believe i have a fairly unique use case, I am looking at wrapping a legacy native windows application that has a lot of static state with a REST interface and then deploying a React front end to interact with the REST interface. This leads me to need session affinity and there are some straight forward methods to achieve that, but because of the static state the container is very stateful to a particular session. Its basically a legacy desktop process with a lot a singleton and static state hosted in a container.
What i am wonder is it possible to make the container have the same lifetime as the client session.
When a new session is created we need to create a dedicated container that then has session affinity. When the session is closed or expires after some time threshold the container is destroyed.
If this ends up being hard to do, my plan B would be to just use session affinity to the container and then implement either interact with a child process with some sort of IPC or make the the container a reverse proxy and where i can spin up internal webservers.
Cloud being used: azure
Host OS: windows