My web application needs to call a .NET assembly which seems to me that allocates “a lot” of memory for a web application (perhaps I’m wrong, that’s why I’m asking).
I already call this assembly from my desktop application and, with the help of Task Manager, I realize that it consumes about 60MB when it runs (it is fast though: it takes less that 0.1 seconds to do the job).
What I need to know is what is going to happen, in terms of memory, bandwidth, or anything else you can come up, if, for example, 10 or 100 users use my web application at the same time. The needed memory will be 60MB x (Number of Users)? And what about the bandwidth?
If you can think of more issues, please give a hint how should I treat this problem.
Some food for thought:
1) Task Manager is not an accurate way of measuring the memory usage (for example see http://www.itwriting.com/dotnetmem.php)
2) Some of that memory is probably allocated for static or initialization-time data, which is only held in a single copy regardless of how many users are accessing the component.
3) Some of that memory is allocated per-request, meaning it will grow linearly with the # of users using the component.
4) Bandwidth is unrelated to memory usage.
The KEY question you need to answer is “was the component designed for running in an ASP.NET web environment”? This actually includes two separate but related issues:
If the component wasn’t designed to run in a multithreaded (if you aren’t familiar with that term then substitute “multi-user”) environment then it will probably die horribly as soon as more than a few users share it.
If it hasn’t been tested under ASP.NET (particularly under load) then there is a fair chance that it won’t play nicely with the rest of your web app. If possible, try to find which IIS and ASP.NET configurations are officially supported and make sure that it fits your requirements.
I would recommend doing the following:
A) Read the documentation to see whether it is multi-threaded and officially supports ASP.NET
B) TEST IT AND SEE FOR YOURSELF. Create a simple test web application and stress it using a load tool.