Reputation: 3615
Our web application depends on a closed source proprietary DLL/Library that seems to set static variables that seem to persist and mess with state across different requests. This fine for a single-user's batch of requests, but if another user begins utilizing the app, the static variables from the first user in the process scope mess with the second user's interaction.
What is the best way I can scope this static memory usage of a third-party DLL on a per-user/request basis?
I believe the simplest implementation of this would be to route each request to a particular Web Worker (different process' memory space), but I can't seem to find any IIS/ASP APIs that would control how IIS chooses a particular web worker for a request.
Upvotes: 2
Views: 369
Reputation: 82
You can only route traffic to the app pool itself. IIS only does roundrobin routing to the worker process' of each app pool. You could create multiple app pools with a single worker and then use something like HAProxy to route the requests to different app pools.
Upvotes: 0