weblogs.asp.net Now Running On Orchard and Azure Web Sites

I'm incredibly happy to announce that my blog - and all 750 other blogs running under weblogs.asp.net - are now powered by Orchard and Azure Web Sites! That's 750 blogs, all hosted in 4 Azure Web Sites all running on only one large virtual machine.

A bit of nostalgia

Olde Tyme Blogge

I've been blogging on weblogs.asp.net since May 2003 - over eleven years. Back then it was called dotnetweblogs and ran on an open source blogging platform called .Text. Over the years, it got moved through varivous versions of Community Server, and had been stuck on an old, customized version of Community Server for almost seven years. It was hard to take myself seriously when blogging about web standards when my blog was being forced to quirks mode in IE due to an ancient HTML header.

I'd exported my BlogML several times and thought about moving, but I really didn't want to. I'd been part of the weblogs.asp.net community for a long time - for a while I subscribed to every single RSS feed and read each of them daily - and I'm a pretty big ASP.NET fan, too. I resorted to cramming a bunch of JavaScript into the "News and Announcements" HTML field on the left. It pulled in jQuery from a CDN and did all kinds of terrible things to insert widgets and hide elements I didn't want and make the page jump around for a few seconds while loading. Kind of like most news websites these days, so maybe I was ahead of my time.

I'd campaigned internally a few times to get the blog platform updated, but understood it was a big job to update several hundred weblogs - with history, and without downtime. Fortunately there's another very high profile blogger on the weblogs.asp.net platform; that may have had something to do with getting the update to happen. :-)

So I was extremely happy to hear that there was finally an effort underway to make the move!

Disclaimer: I did not do any of the dev work for this migration. In fact, I was one of the top whiny customers - my blog was one of the test cases for the migration, and I gave Sebastien Ros and the Neudesic dev team (Peter Fuerte, Samir Patel, Zac Hall, and Terri Morton) tons of feedback and piles of feature requests.

Hosting Details

Orchard is hosted as Azure Websites on a single basic large instance using using 4 websites on a single instance to scale out the memory limit on 32 bits.

We use 4 Azure SQL Database instances, Business edition set to 10GB. Each azure website points to a SQL Azure database, and each database contains around 200 blog using table prefixes.

Each website points to an Azure Cache Service for output caching

All blogs point to the same blob storage account

An Azure Queue is used to synchronize the main portal and the blogs

One ARR proxy in an Azure VM is used to route the requests to the Azure websites. We set it up this way because we already had this VM set up to do the proxy work for the rest of *.asp.net.

Here's a general diagram (stolen with permission from Sebastien's talk at the Orchard Harvest conference this week):

weblogs.asp.net infrastructure

Performance Statistics

Here are our monthly estimated statistics for weblogs.asp.net:

  • Bandwidth out – 17 terrabytes
  • Page Views – 1.3 million
  • Unique Visitors – 750,000
  • Visits – 1.1 million

Here's the thing: Azure Web Sites is fast and efficient. I was already convinced of that, having run a lot of sites on it over the past few years. But Orchard is crazy efficient, too. I did not know that. I recently saw Sebastien give a presentation on Orchard, and it blew my mind. If you had heard or read that Orchard is slow, bloated or inefficient, you owe it to yourself to look again. I've been shocked by how fast and efficient the current release of Orchard is.

The Orchard output cache module includes pretty moderate caching but delivers pretty extreme CPU performance benefits, as shown in the CPU charts from the production site below. Notice we're hovering around 20% CPU most of the time:

weblogs.asp.net output caching

Hosting Cost Summary

It's incredibly cheap to host all 750 weblogs on Azure Web Sites, SQL Database, Storage and Cache. Here's a per-month cost estimate (keep the above stats in mind when you read these):

Item Usage to Date Cost to Date Estimated Cost Per Month

Data Transfer OUT (GB) - Zone 1

1428.41 (GB)

170.81

196.43

Data Transfer IN (GB) - Zone 1

1.21 (GB)

0.00

0.00

Database Units (in 10s) - Business Edition

0.54 DB Units (10s)

53.88

61.96

Storage Transactions (in 10,000s) - Data Management

323.84 (10,000s)

0.16

0.18

Basic (128 MB) - Cache

2.52 (128 MB)

31.52

50.00

Data Transfer (GB) - Zone 1

0.08 (GB)

0.01

0.01

Standard IO - Block Blob (GB) - Geo Redundant

1.92 (GB)

0.09

0.10

Large Basic Web Sites Hours - Web Sites

609.00 (hours)

187.20

215.28
Grand Total  

443.67

523.47

This works out to under about 70 cents per blog per month, which is pretty impressive.

What was changed in Orchard to support multi-blog

Nothing!

Multi-tenancy is a native capability of Orchard CMS. It is the primary reason we chose Orchard as the platform. So that's neat.

We're using 4 websites on a single Azure instance to scale out the memory limit on 32 bits, and any optimizations that were made to Orchard itself for this project were rolled back into the core platform (for v.1.8.1.0 and later).

Migrating 750 weblogs (with more than 75k posts and 250k comments)

weblogs.asp.net supported BlogML export and import. BlogML is an open format for Blog content, and it includes everything you'd need to migrate eleven years of blogging - including posts, comments and tags. It's not a slam dunk, though. Years ago, I tried to export my blog and the requests kept timing out because the export (including comment spam) was something like 5 or 6 MB. A year ago I was sick with a flu so I decided to do some blog spam analysis; Terri and team incorporated the results into their spam filters which cut the spam levels quite significantly. Still, lots of data.

On the Orchard side, they took advantage of custom Orchard recipes to handle the import. Recipes are great - they include everything you'd need to initialize a new site, including blogs, users, etc. And they can be based off a template, so you can create multiple (say, 750) recipes from one template. Slick.

At a high level (because I didn't write the code), Sebastien and friends tackled the problem like this:

  • Export all sites to BlogML
  • Convert the BlogML to custom Orchard recipes to create the new blogs including:
    • Posts
    • Comments
    • Users
    • New passwords
  • Generate custom commands to automate the recipe processing

Automation was important, because they reran this migration several times.

One other neat thing about the import: they used the VM Berserker technique (my name, I hope it sticks). You may have read about this approach before on Troy Hunt's post titled Working with 154 million records on Azure Table Storage – the story of “Have I been pwned?”

The VM Berserker technique takes advantages of one of the most unappreciated values of cloud computing: the ability to develop cheaply, scale way up for a short time, and then turn off. This lets you do big things for less than the cost of a cup of coffee. Scaling up is nice. Scaling up and then back down is even nicer. So for this migration, they tested things out on a VM, then scaled it up to handle the migration, then turned it off (to stop paying). Done. Oh, and by running in an Azure VM they were running the processing in the same datacenter as the data, so it was really fast.

This is the kind of thing that tells me that cloud computing is the future. Sure, it's great to spin up sites and VM's and worker roles and stuff in the cloud. It's great that I can amp them up when I want. But often lost in the discussion is the power of being able to scale hard for an hour or two, then shut down. The cost-per-awesome on that transaction hasn't sunk in with most developers yet.

Sebastien announced at the Orchard Harvest conference this week that the tools that were written to migrate the content from the old system to Orchard (running Orchard recipes against BlogML export files) will be released publicly very soon.

New Blog Goodness

So much good stuff!!!

New Bootstrap blog theme

This is probably my favorite.  In the past I'd written a few custom or inline styles, but now the system's running on a great framework. Bootstrap's tons of fun. There are individual styles and components that make things look better, so I can throw in a Bootstrap table style or grid whenever it's useful.

Plus, it's easy to drop in a new theme from time to time. I grabbed one off Bootswatch to get started, but am looking forward to tinkering with it.

Mobile friendly display

Since Bootstrap 3 is a mobile first framework, it always looks good on smaller displays. Posts automatically scale down for mobile devices using media queries.

More Authoring Options

I've always been a fan of Live Writer, and that's still supported. And there's HTML support, which is good. But Orchard also introduces Markdown editing support, which I'm told will cause my pants to shrink and my beard to grow out. So that's something.

Widgets!

Orchard Widget Zones

I'd been sneakily creating widgets for years by injecting HTML and JavaScript, but now there's real support. Orchard has some nice widgets, and you can drop them into 19 different zones, as shown on the right.

As I was beta testing, I asked Sebastien if we could move the comments from the content to an after content module so I could insert custom HTML widgets above the comments, and he set that up.  So far, the widgets have been incredibly flexible. No complaints at all there.

Spam Control

As I mentioned earlier, the spam was a bit out of hand before. Orchard adds ReCAPTCHA support. No messing around now, I can barely pass it.

Social Media Tag support

Orchard automatically includes support for all the fancy og:tags that are so hot these days. Sebastien wrote a post with more information.

Custom Script Support

I have already admitted to jamming script tags in HTML areas on the previous site. The new site includes the ability to add custom scripts for analytics, syntax highlighting, etc. It's supported, and I can include them in the header or footer as appropriate.

Site Nav Integration

Now new pages can be integrated into the site navigation. Cool.

More Goodness!

There's a lot more! If you're running a blog that's hosted on weblogs.asp.net, see the updated support here. If you'd like to learn more about Orchard - or contribute, as it's an open source project - check out the Orchard Project. I'll be posting more about some things I've learned in customizing my blog a bit, including the code formatting.

10 Comments

  • Looks great! Well done on the migration. Having used Orchard and Azure, both separately and together, I can testify to their awesomeness. The abstraction power of both platforms is outstanding, and imo, under-utilised.

    Throw in tools like Web Platform Installer on an XS Azure VM for easily installing Orchard CMS and then I wonder why I'm needed as a software developer. And then when I was dreading styling it, to discover Bootstrap. Add in some Bootswatch (for colour/theming) and maybe some Bootnsnipp (for layout components) and It's all too easy!!

    Again, well done...

  • something is wrong. I used to write blog in windows live writer, but it's response http 404 now.please check.

    http://img31.mtime.cn/mg/2014/06/11/111227.66617622.jpg

  • @gOODiDEA, you need to reset your blog settings for the new Blog. Please follow the documentation that Terri sent to everyone.

  • Well done! Thanks to all the weblogs.asp.net team, especially Terri Morton, for making the transition so smooth and for the help they provided!

  • Congratulations Jon! It's about time. But I am saddened a little - it is an end of an era. Congrats to @TerriMorton and team.

  • Nice work. Would be great if you didn't get a mixed content warning on IE when you visit weblogs.asp.net.

  • I was skeptical at first if it could be done because like you I tried exporting my blog several times over the years (my first post goes back to 2004) and it would crap out. Community Server was horrible and stopped working (for me) on IE11. I'm so happy to see this and look forward to what I can do with my blog now. Thanks to everyone for this.

  • We're working on that, Sanat. That happens when you visit weblogs.asp.net over https. We should have that sorted within the next couple of days.

  • Outstanding! Looks great. Here's hoping we can move Blogs.MSDN.com as well :)

  • orchard looks very simple in ui compared to other blogging systems like wordpress.
    you should try hard to find a satisfying theme for it but it is good for articles and development techniques sharing.
    don't you agree?

Comments have been disabled for this content.