Best Practice IIS Web Sites - asp.net

I am looking for general information regarding the below scenario. I am just looking for opinions. I myself think the first option is better and offers less headaches.
You have an IIS website (www.site.com) that is hit millions of times per day. You have 5 web servers serving the traffic. After a while, the worker processes begin to reach their limit. There are 3 worker processes and one app pool per server.
Option 1: Turn these 5 physical servers into virtual hosts and run 4 VMs from each. That increases the pool of servers to 20. Drop worker processes to 2 and have 1 app pool per VM.
Option 2: Add 5 for IPs for each physical server and 5 instances of the same site on each physical server. For example, Server 1 will have 5 IPs and 5 IIS app pools and 5 IIS websites called something like this. Site1, Site2, Site3, Site4, Site5. Yet all of these go to www.site.com.
I personally think Option 2 is ridiculous.
Please let me know what you think.

Good you ask. Both options seem to go in the wrong way.
Option 1 : Turn a physical server into a host and set up 4 virtual machines on it. Each VM will get a quarter of the memory, processor cores and processor time. The host also uses some amount of resources itself. This means that you end up with less power after this change.
Option 2 : You're right, it is ridiculous. It will not improve anything, just add useless complexity.
If your management has such absurde ideas like you discribe, you should really hire a consultant. At least you could get some realistic scenarios to choose.
Is there something that requires the web server to run on premises ? I'd recommend to move to a managed server with a hosting company. They would take care of system administration. This will take a burden off your system administrator ( that doesn't seem to be very competent ).

Related

Asp.net website on AWS ec2 t2 medium

We have an asp.net application currently running on a shared hosting provider.
The application specifications are
.NET 4.5 Web forms webiste.
1 MSSQL data base of size - 100 MB
Web Application size including images - 1.2GB
Page visits/day - ~2500
Bandwidth consumed/day - ~200MB
We are not happy with the Hosting providers and have faced a lot of issues recently. Our application requires trust level as full for some of the services and the hosting provider is unwilling to set the trust of the application as full.
Statistics obtained(1 week) from the hosting provider(See image below)
(We have around 2500 page visits a day on week days and 500 page visits on weekends)
Based on the above information, we are planning to move to AWS. I was thinking to go with a t2 medium reserved windows instance(It has 2 cores and 4 gb ram) and EBS storage(Will cost us around 50 USD a month)
Since we have a small database when compared to enterprise standards, I was thinking to host it in the same instance. We are also planning to go with Sequel server express as this does not need licensing rights.
I have read up a lot of documentation and I am not able to reach a conclusion about the size of the instance to go for and will the t2 medium EC2 instance be able to serve my purpose?
1. It would be great if anyone can tell me if the above t2 medium ec2 infrastructure will suit our needs?
2. Do I need a t2 medium instance or can I go for a lower level
configuration ?
Open to suggestions on change of above mentioned infrastructure as well.
Instead of quoting page visits, etc, you are better off showing RAM and CPU utilisation.
A couple of things to consider:
1 - The t instance is a burstable throughput CPU. That means you gain 'credits' when your CPU is not being used, and when you use it (I cant remember exactly but possibly >10%?) you use up credits. This means if your average workload is either very low, or very bursty, the t series is a good choice, but if your workload is quite constant and high, it is a very bad choice.
2 - How static is the website? You might see benefit in decoupling the database onto an RDS instance that matches your needs, and then having the website on a spot instance to reduce cost, for example.
3 - With respect to configuration requirements, only you can answer this.

IIS bottleneck?

I have 3 machines - one which is IIS, one with a database and one from which I test the efficiency of my application - which means:
Using The Grinder I run 1000 instances of my application (hosted on the IIS and operating with the database on the machine with SQL Server). And using perfmon I observe that there really are 1000 requests.
BUT the problem is that connecting to this application (IIS) from another computer is very slow. I suppose there is some bottleneck on the IIS side but I cannot find it - CPU usage is less than 10%.
I think I changed every option in the IIS Manager and machine.config and web.config files - nothing seems to have any effect.
First thing is you need to confirm if you have a slowness issue while browsing the site
Check the IIS logs and look for the time-taken field. If the time taken is more than 10 seconds then it is considered as a Slowness.
The slowness might be because of several reasons. It might be because of the Network or might be because something in your code might be causing it.
I suggest you to capture a Network trace using Netmon or WireShark in case if its a Network related.
If its not Network you can collect a Process dump using Debug diag 2 update 2 tool.
You can check the below link to collect the dumps and check them and try to find out if there is any slowness:
https://msdn.microsoft.com/en-us/library/ff420662.aspx

ASP.NET & IIS application pools - any reasons not to create a pool for each app?

I understand that having one app pool per app helps isolate errors in one app from impacting other apps.
However, sometimes apps are configured to share the same pool.
Is there any benefit to this, other than having the (memory?) overhead of one-app-per-pool?
Does this configuration permit scenarios not possible in one-app-per-pool?
Maybe in-pool inter-process communication? (Or rather, inter-app communication, since the apps share the same w3wp worker process)
To my knowledge there is no inter-app communication benefit (specifically, if you have two applications in the same pool which both happen to load the exact same dll file, it will still load it twice, you're not saving there).
The advantage is in managing resource limitations. Letting two apps share 500MB is more flexible than each app getting its own 250MB (or my personal favourite way of describing this, you're better off with 2 bathrooms for 4 people, than 1 bathroom for 2 people). You lose isolation, but you gain some headroom on resources (assuming the two applications peak at different times).

Running Asterisk on Windows Server 2008 R2 as a virtual machine?

I am configuring a site for a Service Center and i have an HP Proliant server with a dual Xeon CPUs. I want to know if its a good idea to run the Asterisk platform as a virtual machine on Windows Server 2008 R2.
Up to 15 agents will be active concurrently and beside that i will probably need to activate Recording of calls, generating reports etc.
You can run asterisk in vmware or virtualbox. Running in hyper-v never sucess for me. Vmware have more chance to work ok.
But under hi load(more then 10 call) you can experience sound quality issues.
So it is not recomended run in production with 15 concurrent calls.
Since voice is likely the single most demanding network traffic stream that most of us sysadmin will ever come across, you need to be way, way, way, out ahead of this one. Unless you are prepared to dedicate many years, non-stop, of your life to debugging and programming and mastering the tiniest nuances of timing sources inside of guests, using various hypervisors, with various hypervisor configurations, at 1000 clock ticks per second as that relates to which CODEC you are using, baed on whether or not you are going to have 1 call or 10 calls or 100 calls going, and whether or not you will be recording those calls, and whether or not any one else on the system will be having a conference call at the same time, based on the exact version of the daemon and the driver, then, I would humbly and professionally recommend going another route now, and saving your head and your hair for some thing actually worth your time.

ASP.NET Hosting on Virtual Servers running on VMWare

My Company is running several international websites for selling insurance products.
Our current setup is a Webfarm with multiple Loadbalanced Webservers hosting our ASP.NET applications. The backend is a single - yet powerful - SQL Server. (all in one data center)
Our network admins want to move to virtual servers running on VMWare.
Scenarios could be
Webfarm: Multiple standard webservers, Loadbalanced (current setup), Session state on SQL Server
Virtual Webfarm: Multiple virtual servers, loadbalanced on one physical VMWare Host, Session state on SQL Server
2.a same as above but with multiple physical hosts
Single Virtual Webserver: One big powerful virtual webserver, no loadbalancing required, session state can be kept in process
There is a big hype around virtualization and I can see the benefits, but have no experience with this. I cannot tell what issues we will face and to what we should pay special attention.
Does anyone have experience with such a virtual setup?
What are general recommendations?
I tend towards 2a. I am afraid of having all webservers on one single physical machine.
Many thanks in advance to share your thoughts.
There are three reasons to use more than one webserver for an application:
Scaling - More grunt is required than one machine can provide
Reliability - Website should keep running in case of failure (a. hardware b. software)
Prioritization - One of the webservers takes on heavy work (perhaps scheduled tasks) leaving the other to respond to client requests quickly.
Marrying that up to you scenarios:
Scenario 1 provides 1, 2, 3
Scenario 2 provides 2b (perhaps 2a if it is fully hardware redundant (doubt it))
Scenario 2a provides 1, 2
Scenario 3 provides none of the above
Advantages of Virtual Hosting:
Lower Total Cost of Ownership (TCO) on big cluster serving multiple purposes is cost effective
New servers can be created quickly if needed
Redundant hardware is easier to justify if the cost is shared among many applications
Disadvantages:
Other virtual machines may suck away your CPU/Disk IO capacity
IMHO there is little point to load balancing multiple virtual machines on the same virtual server.
Robert's pretty much covered it all, I'm mostly just adding a note to say that at least one of our clients is currently running with option 2a.
So we have multiple loadbalanced web servers running on a couple of VM hosts, talking to a non-virtualised SQL cluster - this works quite well for them.
One other advantage of virtualisation is that it allows you to more fully utilise your hardware - however, you need to be aware that if you're running your virtual host at around 90% capacity with multiple VMs, you've not got a lot of spare capacity for any traffic spikes - if you're not expecting any, then great, but if you are, you'll need to have something in place to cope.
I agree with all of the above answers, and I actually work at a webhost. :-) If you're using multiple load-balanced webservers now then I can only assume the reason for it is either
Hardware Redundancy: If a single app server fails then those sessions are lost, but the app keeps running on the other servers and users can immediately re-connect.
or
Application Load Distribution (it's late so I can't think of a better name): Your traffic dictates that you have multiple app servers since all of your users would crash a single app server.
If #1 is the reason, then going to VMWare defeats the purpose since you only have one server supporting everything, and in case of hard drive crash, etc, you are down while it is repaired. If #2 is the reason then a VMWare based solution MAY work, however keep in mind that the hardware you'd use would almost necessarily be of a higher caliber than what you're currently using. So you maybe get more bang for your buck, but you STLL lose the redundancy that multiple physical machines gave you.
Now, you could always combine the two by having multiple physical machines all running VMWare, but that adds a level of complexity to things that you may not necessarily want either.
It doesn't sound like there would be any tangible benefit from running multiple virtual servers on the same physical host, you're just adding overhead. Unless I'm missing something with the way you've described the setup, there wouldn't be any benefit at all from moving to VMware - unless you're looking at taking advantage of features such as VMotion
VMware is most useful for consolidating underutilized hardware. If your hardware is running at near-capacity during peak periods then you don't want to run multiple VMs on the one machine.
There are benefits to Virtualization but your network admins need to prove that there is a benefit for your company before you even consider switching. I would say if you have multiple apps running on dedicated servers with low traffic (i.e. each app has it's own physical server) then sure, Virtualize. If you have one app over many servers, then don't.
You should be able to use virtual machine hosts with multiple vm per host and load balance across all of them.
Microsoft is doing this with msdn and technet http://virtualization.info/en/news/2008/05/microsoft-migrates-msdn-and-technet-on.html.

Resources