Windows Server AppFabric Web Farm with NLB - nlb

We have the need to setup a highly available load balanced Windows Server. Is there a guide on how to setup a web farm with NLB configured? Our operations team tried to use the Web Farm Framework 2.2 to create the web farm and then configure windows NLB on the machines but we haven’t managed to get it to work. Have anyone done this before? What’s the best practice and the recommended way of doing this?
Cheers,

The MS recommended way of doing this is by using 2 or more Web Farm Framework 'controller' servers running ARR and windows NLB, and then Primary/Secondary servers below that.
There's details on how to set this up here: http://learn.iis.net/page.aspx/511/achieving-high-availability-and-scalability---arr-and-nlb/
You can also use hardware based load balancers, some have specific support, others will work, but won't integrate nicely into the WFF console.
Details on doing this with an F5 Big-IP load balancer are here: http://blogs.iis.net/gursing/archive/2011/01/21/how-to-integrate-f5-with-web-farm-framework.aspx
You can also just use the standard microsoft NLB with WFF and without ARR, but there doesn't seem to be much documentation on how to do this. I've got it working on a 2 group by:
install windows NLB on both servers and create a standard cluster with a shared IP
installing WFF on one server
setting that server as primary but don't tick the 'ready for load balancing' tickbox (this tickbox really means add this server to the ARR load balancing).
Then add the second server and again don't tick the 'ready for load balancing'
You should then have the config sharing/updating benefits of WFF with the load balancing/redundancy of NLB using only 2 servers.

Related

Multi-host deployment of ASP.NET Core applications

I am quite confused as I haven't seen any blogs or instructions on how to host ASP.NET Core/.NET Core applications with HA and multi-host deployments. All examples are either:
1) One NGINX reverse-proxy, one Kestrel
2) One IIS reverse-proxy, one Kestrel
And both components on same host. In real-life production environments, you have LB maybe service discovery, multiple frontends, multiple backends, etc. But for this case there are no instructions whatsoever. So my questions would be for multi-host environments:
Do I deploy one IIS/NGINX as LB/Reverse-proxy, and redirect requests to Kestrels running on many separate VM:s, i.e. various different IP:s?
Or do I run an NGINX/F5 for load-balancing on one host, then route http traffic to various VM:s that run IIS+Kestrel, or just Kestrel? Is IIS required in this setup as NGINX acts as LB?
If I run IIS or NGINX as reverse-proxy, can they keep alive Kestrels on different VM:s, or does each Kestrel require exactly one IIS/NGINX to keep it alive? I.e. the Kestrel process must be on the same same host as the reverse-proxy?
All answers are very welcome, and thanks a lot in advance! :)
I'm running NGINX at the edge as a load balancer and for SSL Termination and multiple servers with IIS + Kestrel serving MVC. This is working well for us. You may not need it but I've found NGINX to be quite a bit more sophisticated and powerful than anything you could do with IIS. Obviously F5 or something would work as well. Previously I also ran for a while using AWS ELB load balancers which also worked fine, just didn't have much configurability. So depends on your needs.
As was mentioned already, IIS is needed on each box running kestrel to manage the process. You could do this some other way, but using IIS is the easiest.
I have a setup with one VM using (IIS as LB) + several VMs with (IIS + Kestrel). It's working fine for my usage, but I'm curious to see if other people have different suggestions. Then it depends on what you are doing, if you use encryption, machine key needs to be shared between VMs, you might also needs to share session between VMs (https://www.exceptionnotfound.net/finding-and-using-asp-net-session-in-core-1-0/), store things in database ...

Excluding a particular IIS website from the web farm environment

We have developed a website that uses In-Proc sessions, stores images uploaded from it on a folder inside its own virtual directory, and uses a third party tool that uses server side caching. This setup works just fine in a single server instance.
But the client has a web farm environment. When we deployed this site on client's web farm. Things started failing. Till now -
we have enabled out-proc session, using SQL state management server
we specified a machine key in the web.config of the server
But the other two, specially the third party tool, is proving difficult to crack.
Will it be possible to remove this one website from the web farm? excuse me if the question sounds naive but I am not a server administrator and not aware of its nitty-gritties
Will it work if we just deactivate one of the websites?
Can we deploy this website on one of the servers in the farm, but keep it outside the web farm's load balancing?
Is there any alternative, other than deploying the website on a completely different server?
Not sure on what vendor the balanacers are but the network admin should be able to setup a VIP (Virtual IP) that translates only to the once server in question.
That is a simple answer but there are many other variables in the network architecture that would have to be answered to accomplish this. I suggest you contact the administrator of the load balancers and ask them if you can isolate traffic for the website to the specified server.

Is it possible to run two websites in parallel on IIS?

We are planning to redesign a current ASP.NET website but would like to measure the effectiveness of the new design. We want to create two website instances and send a small proportion of traffic to the new site, ramping the traffic up only when we're confident that the new site is performing well.
Is it possible to do so with only one server (vanilla Windows Web Server 2008 without VMs) and no external load balancer? Is there a load balancer built into IIS that I'm not aware of?
Using: Application Request Routing on IIS this is possible.
http://www.iis.net/downloads/microsoft/application-request-routing
As to whether this is on your install you may have to check, some 'Vanilla' installs include this nowadays, if yours doesn't you can do a quick install using WebInstaller.

IIS, EC2, Web Farm, Web Deploy and ELB

I'm a developer now developing my startup. I really don't know much about IIS setup. I will host my startup on Amazon EC2. And I want to know how can I scale my application if my traffic increase. I been reading about MS Deploy and Web Farm Framework here: https://serverfault.com/questions/127409/iis-configuration-synchronization-for-web-server-farm . And I want a simple architecture, with not to much configuration. So I been looking an experience with an IIS web farm and Amazon ELBs. And I did not find any one.
So the question is:
It is possible to make a IIS web farm with Amazon ELBs?
Any experience on Ec2? IIS web deploy or WFF and/or without ELBs?
What you recommend for an easy web farm setup?
You can do almost anything you want with IIS on EC2. They are full servers (well window 2k8 datacenter edition) and you can open any ports you need to communicate between servers. Here is an explicit tutorial on how to set up WFF, for example, on EC2.
The question is, are you sure you need to build a web farm? If you simply want to have multiple servers running your code then you can accomplish this without anything more than IIS and the tools that EC2 provides.
You build your app so it uses shared resources (like a session state server, central location for storing user uploaded content), configure a server the way you like it, and capture a server image (AMI). You use this image when you configure AutoScaling to launch new instances based on server metrics (like CPU usage), and they would be automatically added to the load balancer when launched.
The last challenge is ensuring servers launched automatically are running your latest code. You can write a custom program to get the latest code from somewhere (like SVN) on server startup, or you can use something much simpler like Dropbox to handle the synchronization.

Same ASP.Net application - Multiple IIS Sites

A quick ASP.Net performance question...
I have an ASP.Net 3.5 SP1 Application that I want to run on IIS 6. For SSL certificate reasons I need to run it on separate sites in IIS. It's a CMS, and some clients will need the add their own SSL certs.
1) Can I run the same set of ASP.Net files on the disk on multiple sites in IIS or do I need to mirror them?
2) What considerations do I need to make in terms of performance, e.g. having multiple database connections from each site?? Or will they be 'pooled'?! Also, I am using Linq to SQL and am caching the results using ASP.Net's cache. Will it be an overhead to have separate caches for each IIS site of essentially the same data? Are there any other performance or application design considerations for this scenario?
3) Does running the IIS sites under the same App Pool make any difference?
Or does anyone have a totally different recommendations?
Any guidance you can give would be much appreciated. I'm looking for as many varied opinions and experiences as possible here, so please do add an answer if you can help.
Cheers,
Tim
Maintenance will be WAY easier if you only have one IIS site to manage. A more efficient way would be to deal with the SSL issue somewhere else (eg, hardware load balancer, content switch, Apache box, etc) and reverse-proxy to a single IIS instance with a single version of the app running. Sharing the app pools won't help (assuming you're using SQL Server with the managed client anyway), because each web app gets its own Appdomain and hence its own connection pool. Sharing app pools causes them to share a process, but not an appdomain.
I've done this on the cheap before by having Apache installed on the same machine as IIS, listening only on port 443 (for however many IP/cert combos were needed), then have Apache set up as a reverse proxy to IIS on the same machine listening only on port 80 (but for any host header).
I agree it does not make sense to run different web sites for the same applicaiton.
You can set SSL port in the web site with IIS manager. If you do not set IIS to require certificates, some users can use the HTTP version without the certificate error and the others can use SSL.

Resources