Windows Web Hosting, Web Technologies, etc
Windows Administration
JessCoburn.Com running on ARR! and that not be Pirate speak thar Matey!
Aug 9th
3 Blog posts to say “Hey I’m running on my site load balanced using ARR”. This is the third and hopefully last blog post for tonight. I posted two other posts tonight:
- Discusses the first stage of Applied Innovations Cloud Initiative.
- Discusses ARR & Load balancing.
All of this was to explain how I’m running my website currently (which I tend to test everything on first so I break it a lot but you have to break eggs to make cake, right?).
ARR or Application Request Routing is a new extension to IIS7 that allows you to turn a Windows Server (or VPS as in my case) into an Application Aware Load Balancer with such features as offloading compression and SSL encryption!
How I’m running JessCoburn.com
For the past year and a half, JessCoburn.com has (and continues to) run on a shared web hosting server that runs IIS7 on top of Windows Server 2008. My site is treated identically to how my customers sites are treated as I firmly believe in eating your own dog food (no not ALPO but using the same services you sell). The site makes use of FastCGI to run the PHP engine and backends to a shared MySQL server. All of our shared web servers connect to the SQL servers via a private dedicated gigabit network for optimal performance. In addition, I make use of expiry headers for output caching of my images and also use the wordpress plugin supercache to reduce my reliance on MySQL queries so my pages render faster. So that’s why it’s been fast, I think you’d agree that’s pretty well optimized for a Windows shared hosting website (same thing you could for as little as $8.33 a month with one of our Windows hosting accounts.. Sure it’s optimized but there’s still a problem.
What’s the problem with JessCoburn.com?
The problem is my web site runs on a single web server. This means if there’s maintenance on the box (don’t worry we do this during load traffic times) there’s still potentially downtime. This also means if my site ever gets popular enough to make the first page of DIGG or REDDIT (use those social bookmarks please) then no matter how much I optimize my site on that one web server, I could have a problem… These are the trade-offs we accept with shared hosting (today).
But what if, I could run JessCoburn.com on multiple web servers and load balance them? Yeah who’s going to go out and spend 20K to load balance his little wordpress blog (the profit margins aren’t that good you know). Well thanks to our own cloud computing initiative and the good folks on the IIS Team at Microsoft I can do just that for peanuts! Today!
My new configuration
I have a Windows 2008 VPS running IIS7 with ARR 2.0 Beta 2 on it. It’s of course running on our High Availability Managed Windows VPS Hosting Cluster. I also have JessCoburn.com still running on the shared Windows Hosting server running on IIS7 and I setup another VPS server running on top of Virtuozzo running Windows 2003 and copied the site there. Just to show that you can route requests to any kind of server. Both servers back end to the same MySQL server.
All requests for JessCoburn.com come into the ARR server and it then proxies these requests between the Shared Server and the Win2003 VPS server. In the event one of the sites crashes, is down or has problems, ARR will redirect all requests to the other server.
A little info about Application Request Routing (or ARR) in IIS7.
Aug 8th
In the 10 years I’ve been working with Windows as a web hosting platform (and the 15 or so I’ve been working with web servers period), I can confidently say that IIS7 is without question the best web server platform to date. Microsoft has been working on a plug-in for IIS called Application Request Routing (or ARR). The first version of ARR provided a suite of tools that allowed it to function as a Application Layer Load Balancer! The recently updated beta version extends that functionality and now makes it easy to turn a Windows Server running IIS7 into not only a Load Balancer but also a Reverse Proxy / Cache Server. Meaning you could potentially power a CDN using a bunch of Windows Servers.
What’s an Application Layer Load Balancer?
First I should define a load balancer. When you have a very popular website (think yahoo, Amazon, etc) you need a bunch of web servers to accept all those web requests. One server just won’t cut it. In order to keep things all tidy and in order you use a machine that controls those requests and which web server it goes to. You extend that machine and have it start monitoring your web servers and your web visitors and it can start managing those requests and directing it based on things like:
- The visitor’s browser type
- The visitor’s IP address
- The type of content being called (JPEG, MOV, HTML, ASPX, etc)
Then you get a step fancier and not only direct those requests based on the request but also on the state of the server, who’s had the most bandwidth, which server do you prefer requests to go to, which server is working hardest? etc.
Now the Layer 7 Load Balancer or Application Level Load Balancer can distribute requests based on the various application specific information. This could be a cookie for instance or information within your app itself.
NOTE: I’m not going to go into this any further you have the basic understanding of a load balancer and I’m not going to deal with NLB and layer 4 and all that fun stuff. Go Bing! it (yeah I said Bing!).
Wait aren’t load balancers expensive, complicated and require a whole other level of geek?
You bet! But they’ve gotten better and there’s a fair number of open source ones out there (in fact, I was reading earlier that wordpress.com was running on an open source one).
Well didn’t Windows Always have this?
Not really. Windows had Network Load Balancing which would allow you to run a couple servers with the same application on it. It would monitor ping on the machines and if one machine died all requests went to the other. So that was really load balancing at the machine level. This was good enough for most but what if the machine was fine but your service (perhaps IIS itself crashed?) . Then they had Clustering services. Now clustering services was service aware. Meaning if your service (perhaps IIS ) crashed on one of the machines it would failover to the other machines but it didn’t really know anything about your website’s application (perhaps an ecommerce store) so you could have a server online and the web service online but the actual application on that server failed and still be sending requests to it. So in comes those clever folks in the IIS team at Microsoft with Application Request Routing (ARR … Matey!).
Video Introduction to Application Request Routing and more info
Microsoft has a great video on ARR and it’s geared towards webhosts but does a fantastic job of showing the functionality of ARR and just how easy it is to configure and make use of. You can see that video on the IIS.net site at:
http://www.iis.net/extensions/ApplicationRequestRouting
In addition to the video they really spell out all of the features and benefits to ARR in detail. Some of those features include:
- HTTP based routing decisions.
- The ability to offload SSL requests
- The ability to offload compression
- Health monitoring of live traffic and specific URLs to monitor and adjust routing of requests.
- Support for extensive debugging through Failed Request Tracing Rules.
Installing Windows 7 From a USB Thumb Drive
Jun 23rd
My most popular blog post is about installing Windows 2008 from a USB thumb drive. Over the weekend I decided to upgrade my Laptop from Windows Vista to Windows 7 and used the same instructions to do that upgrade. So the instructions for:
- Installing Vista from a USB Thumb Drive
- Installing Windows Server 2008 from a USB Thumb Drive
- Installing Windows 7 from a USB Thumb Drive
are all the same: http://jesscoburn.com/archives/2007/10/15/installing-windows-2008-via-usb-thumbdrive/
Terminal Services Across Multiple Monitors
Jan 14th
At work and home I have the same setup, dual monitors. I always RDP into my desktop these days instead of installing Outlook, Office, etc at home and I’ve always found myself not working in dual monitor mode because of this when working remotely.
Turns out you can use multiple monitors in Terminal Services afterall.
Enabling Multiple Monitors via RDP
To enable multiple monitors in an RDP session you’ll use the switch: /span so you’ll start RDP with the command:
mstsc /span
When it loads just log into the machine as you normally do and your display will now span both monitors. The monitors will have to be the same resolution, only supports side-by-side configuration and a maximum resolution of 4096×2048
Remotely Kill Process on a Windows Server
Oct 10th
Ran into a problem today where I needed to kill a process on a server that I didn’t have remote KVM access to and couldn’t RDP into. This particular machine had only VNC and the VNC service was hung.
Windows Server includes two commands tasklist and taskkill that allow you to remotely list the processes running on a machine and then kill these processes.
Viewing Tasks on Remote Computer
To view the processes just use the command:
tasklist.exe /S SYSTEM /U USERNAME /P PASSWORD
Killing Tasks on Remote Computer
Once you have the PID of a process you can execute
taskkill.exe /S SYSTEM /U USERNAME /P PASSWORD /PID PID_NUMBER
I found this great tool by googling it and finding the watching the net blog article on it, there’s more information on their blog (along with a ton of google adsense ads..).