Yes, the handler is common to all users. It is not tied to any session object.
If you set Reuse to true, the instance will be cached and reused in other requests, simply repeating its ProcessRequest method again and again, without creating new instances. The handler does not look at the session for this. The application will create as many handlers as necessary to handle the current load.
So, if you have 20 users at the same time as your application, 20 instances will be created. If, on the other hand, you have 20 users accessing your handler sequentially, only one instance (re) will be used.
You cannot control the number of created instances; this is done on demand.
The downside is that if you use most of the memory in the handler, it will negatively affect memory usage, as these instances will survive GC loops.
You must also ensure that the state at the end of the processRequest is valid for the next request.
source share