Will The Real GoDaddy SOPA Numbers Please Stand Up?

So Ars Technica just ran a story titled “GoDaddy wins, and loses, Move Your Domain Day over SOPA”.  Well, that’s the story title now, but you can see from the URL the original title was “Move your domain day only a blip, but GoDaddy officially opposes SOPA”.  Which set me off because the entire article is around one day of data.  Shame on you Ars, this is lazy at best!

Ars linked to a source from DomainTools that shows daily changes for registrars.  With a few minutes of effort I compiled stats for GoDaddy for the month of December.  This chart tells a better picture of the SOPA impact on GoDaddy:

Godaddy-Net

December 23rd is the day GoDaddy announced support for SOPA.  Doesn’t look like the GoDaddy Girls had a very merry Christmas this year as many did not wait on the “official” boycot day.  Since I often work on Business Intelligence projects however, I don’t put too much faith in aggregated numbers without looking underneath them.  Here is a chart showing Domains In vs Out, what the Net change is based on:

Godaddy-InOUt

I can see that GoDaddy has a weekly rhythm to it’s domain business, and because the bulk of the Out domains came on a weekend, the impact is probably exaggerated a bit.  Still I can’t imagine any corporate getting excited at these charts.

Before I would really say what the impact was, I need more data.  I’d like to see these charts for the last 6 months, and also compare to year-over-year numbers.  I need to get a handle on what is typical for this time of year, and what an average week looks like.  What do GoDaddy’s numbers look like compared to the other top 5 registers?

Some other questions are what happened on the 15th?  If I had to guess I’d say it was a reporting or system error that was fixed a few days later, but how common is this occurrence?  The numbers for the boycott day also look high compared to the others.  There are many reports that GoDaddy is stalling on transfers and even registering domains itself to make the numbers look good.  This dataset is no smoking barrel, but it does hint at something out of the norm is happening and following these numbers for the next month may reveal a different picture.

Incase you want to do more digging, here is my data from DomainTools used in the charts above.  It will only be up for a week or so, so after then this will be a broken link.

More than enough time for Ars to do some real journalism, and cover the whole story.

Posted By Mike On Friday, December 30, 2011
No Comments

Moving to Azure: Worker Roles for Nothing and Tasks for Free

If you’ve been to at least one Azure presentation you’ve probably heard Azure has two primary roles: Web Roles and Worker Roles.  Web Roles run websites, and Worker Roles run tasks.  The two sites I’m moving, XboxIndies.com (which is moved, yay!) and GameMarx.com, use a few automation scripts to update the database and aggregate news feeds.  This sounds like a perfect excuse for a Worker Role, but there is a draw back to spinning up another server: cost.  There is a cheaper alternative though…

Roles in Azure are really customized VMs running some flavor of Windows Server 2008.  This means there is a Task Scheduler we can use to run automation tasks!

The easy way to setup a scheduled task in an Azure Web Role is to enable Remote Desktop, log in and add a task.  I won’t cover details, but setting up Remote Desktop access with the Azure SDK 1.5 is simple and 100% GUI supported.  You will have to start the Task Scheduler service as by default the service is set to start up “Manual”.

Setting up the task manually is good for development, but you’ll probably want to automate the process to simplify deployments.  Note:  Any startup scripts will be run per instance of your Web Role, so make sure there is no harm in the application by having multiple servers run the same script.

Now, before I show you my solution, I want to say I tried to use PowerShell like the cool kids.  An hour into to trying to figure how the Task Scheduler API works inside of PowerShell I decided to scrap that approach and go with what I know works without fuss – Windows Shell Scripts!

Here is my startup script:

net start "task scheduler"
net user autoguy n0t@RF45$_ /add
net localgroup Administrators autoguy /add
schtasks /create /SC DAILY /MO 1 /ST 08:00 /TN DBUpdate /TR %~dp0XBLIGUpdate.exe /F /RU autoguy /RP n0t@RF45$_ /RL HIGHEST
schtasks /create /SC MINUTE /MO 15 /ST 00:00 /TN StoryUpdate /TR "%~dp0SitePing.exe http://www.xboxindies.com/hiddenupdateurl" /F /RU autoguy /RP n0t@RF45$_ /RL HIGHEST

I saved this script as “startup.cmd” in a folder called “ServerScripts” in the root of my WebRole.  I also placed a web.config file in this folder set to deny all access from the web.  </>

A quick rundown of the commands in the script:

  • “net start” starts the task scheduler service.
  • ”net user” creates a new user on the server.  The arguments are the username and password.
  • “net localgroup” adds the new user to a local group on the server.  I am adding the new “autoguy” user to the Administrators group.
  • The last two lines add the scheduled tasks.

You can get help on the various task creation switches by running “schtasks /create /?” at your local command prompt.  The only magic in these line is the command script variable %~dp0 which is the folder the script is in.  I added the programs XBLIGUpdate.exe and SitePing.exe to the same folder so it would be easy to reference in the script, since I can’t make full path assumptions in Azure.

To run this script when the role is instanced, add the following to the <WebRole> section of your ServiceDefinition.csdef file:

<Startup>
  <Task taskType="background" commandLine="ServerScripts\startup.cmd" executionContext="elevated"/>      
</Startup>

I chose to place the task in the background so that it doesn’t block the startup of the Web Role.  If you set the script to “simple” and it fails, your Web Role could fail to start.

Posted By Mike On Monday, October 24, 2011
Filed under azure | No Comments

Moving to Azure: Static Assets

You may not have noticed, but this image came from the cloud!

The next stage in migrating GameMarx.com and XboxIndies.com to Azure is moving the static assets website static.gamemarx.com.  This site hosts game boxart, screenshots, video thumbnails, and the podcast.  In a traditional web hosting scenario, it’s common to create a static site for performance.  On the server side all dynamic content and script plugins can be disabled, resulting in a faster turnaround for content.  On the client side, most browsers will limit the number of concurrent connections to a single server.  By using a second server for the same page, the number of concurrent connections will increase, resulting in a faster load time.

With Azure there is another good reason to add a static site – it’s cheap!  Currently Azure Storage is $0.15/GB sent (uploads are free) + $0.15/GB stored per month.  20 GB of transfer per month would be a decently busy site, and would only cost $3!  Running a website out of Azure Storage does not require any WebRoles or VMs, so you’re only paying for data.

Cloud URLs

When you store a file as a blob in Azure Blob Storage, the URI is created using the blob name, storage container, and storage account.  The structure is:

http://<account>/<container>/<blob>

Within the Azure control panel, you can map a custom domain name to the account.  In my case I’ve setup a CNAME of static.gamemarx.com pointing to gamemarxstatic.blob.core.windows.net.  The container can only include letters, numbers, and dashes.  The blob name can contain pretty much anything, but special characters need to be URL escaped.  My example image above has the following URI:

http://static.gamemarx.com/games/images/66acd000-77fe-1000-9115-d80258550998/lg_screen2.jpg

Where did the extra folders come from?  Well, they don’t exist – like the Matrix they are just a construct of the mind.  In my example, the blob is named “images/66acd000-77fe-1000-9115-d80258550998/lg_screen2.jpg”.  “/” is a legal character in a blob name.

File Management

The blob name trick may be nice for the browser, but you will have to deal with reality when managing files on the server.  In the Azure SDK Microsoft includes a class CloudBlobDirectory to make things easier.  When you call ListBlobs() on the container, the result will (by default) will include CloudBlob and CloudBlobDirectory objects.  The directory objects use the blob names to create a virtual hierarchy, and have their own ListBlobs() method plus a GetSubdirectory() method for walking the tree.

If you need to create a file in the root of the site, such as a clientaccesspolicy.xml file, you can setup a special container named “$root”.  Blobs in “$root” can be accessed with or without the container name in the URL.

Be sure all the containers you create are set to public read access to avoid clients getting 403 – Forbidden errors.

Storage Issues

Azure does not compress content automatically when requested by a client (i.e. GZip the document and send a “Content-Encoding: gzip” header).  For me, this is not a big deal – I’m only serving jpegs and mp3s, which are already compressed.  If however you have text documents stored, you will want to compress these not only for the Data Out savings, but to increase the page load time as well. 

To enable content compression, you will need to compress the content before uploading, and set the ContentEncoding blob property to the method used.  Sriram Krishnan has a good write up on sending gzip content from Azure storage.  There is a downside – the content will always be served compressed, no matter the client’s AcceptEncoding headers.  All modern browsers accept compressed content, but if you are supporting some non-standard clients they will not be able to read the content.

Update: Adding another gotcha that bit me today.  The URLs to the static website are really URIs to the content in blob storage.  According to spec, only the scheme and host are considered case-insensitive.  This means you will need to be consistent when uploading and linking to the blobs, as an incorrect case match will mean a 404 error.

Finally, there is no default document feature in Azure Blob Storage.  If you publish a fully static website to Azure Blob Storage, no one could load the homepage!

Going Web Scale!

Negatives aside, there is still another advantage for using Azure Storage beyond cost: the Azure Content Deliver Network.  With a simple configuration change in the azure control panel I can send my content out to 24 datacenters around the world, speeding delivery and providing alternate routes during internet outages.

To active the CDN once you have your content in blob storage, log into the control panel and click “Create CDN”.  Then point the CDN at the storage account as the “master” server, and setup a DNS CNAME and you are done.

I did not do this with my site however, because I do not have the traffic levels to warrant the need.  The CDN rates are similar to Storage (nodes outside Europe and North America are $0.20/GB data out) but there is a “double charge” for content as it’s loaded into a CDN node.

When a user in London requests an image, they will first try the Europe CDN node.  If the node hasn’t already cached the image, the node will request it from the Master Blob Storage Account.  Then the London CDN node will send the image to the user.  There will be a Data Out charge from the Master server, and again from the CDN node.  Subsequent requests to the same CDN node will only have a single charge, as they will be served from cache.

Content is cached at a CDN node based upon request traffic.  Since I don’t have that much traffic, it’s likely most of my content will expire before I see a real benefit.  (and to be 100% honest, I cannot find anywhere that states CDN is included in the Bizspark Azure package – sorry London!).

I’d like to thank…

Once again I’d like to thank Brian H. Prince and Chris Hay for writing Azure In Action – which has a section on running a static website from blob storage.

The screenshot is from Pixel Animator 3D – an Xbox Indie Game that let’s you create animations using those Minecraft blocks (aka voxels).

Posted By Mike On Monday, October 17, 2011
Filed under azure | No Comments

Moving to Azure: The Database

Azure has two main services for persistent data storage for application: Azure Table Storage and SQL Azure.  The really boil down to a normal SQL relational database, and an document based database.  Initially Azure had only Table Storage, but it appears Microsoft was ahead of the NoSQL movement that has become popular of late and they were met with a strong cry for SQL.  The good news is both options are robust and well supported, though in many cases its likely Table Storage will be cheaper than SQL.

GameMarx.com and XboxIndies.com share a single database.  The database is running on MS SQL Express 2008.  The sites are a good candidate for Table Storage.  Under the hood, all of the content is cached to disk in document format.  A game page on either site gets data from a single file that will contain all the data needed to render that page.  This simplifies the site down to pretty much applying a template to a data file for more requests and is quite speedy.  It was probably a premature optimization, as neither site does enough traffic to stress a modern database, but we built it for web scale.

Even though Table Storage is an option, time is a factor.  Since I can migrate the sites to Table Storage any time, I will start off using SQL Azure.  Thanks to reading Azure in Action I learned of the SQL Azure Migration Wizard.  This tool makes it easy to export from an MS SQL database and import the structure and data to SQL Azure.  SQL Azure is similar to MS SQL, but not a 100% match and requires several small tweaks to DDL statements.  The Wizard will make all of these tweaks, and alert you to any structures that are not SQL Azure ready (SQL Azure does not like tables without a primary key for example).

In our sites we are using the ASP.NET Membership Provider and I was concerned that database structures needed to support this would not import cleanly into SQL Azure.  I was glad to be wrong.  Our entire database imported cleanly and after changing my connections strings a local dev instance of the sites were running smoothly against SQL Azure.

There was one bump in the road, and that was I did not have SQL 2008 R2 SP1 installed locally, only SQL 2008 R2.  The Wizard requires SP1 to be installed, and if it’s not you’ll get some odd errors when you attempt to connect to SQL Azure.  The good news is the latest Management Studio includes support for  SQL Azure, so many things you can do via GUI instead of command line now.  The support isn’t prefect though, the add user option for example just launches a query window with an template for adding a user via SQL.

Can I be so lucky the rest of the move goes this smoothly?

Posted By Mike On Sunday, October 02, 2011
Filed under azure azuresql | No Comments

Moving to Azure: The Plan and Start

After a conversation with my former webhost about the meaning of "Recurring Annual Discount" (we have different definitions of the word "Recurring"), I decided it was time once again to consider hosting options.

I was hosting around 15 websites on a Windows 2008 VPS server.  This server was running MS SQL Express and IIS for the ASP.NET websites, MySQL for several WordPress websites, and Apache for VisualSVN server.  Oh, the server is also running DNS for the sites. All this ran smoothly even though the server only had 512 Mb of RAM.

Getting all this in one place is expensive, but if I split up the hosting things become cheaper.  The first move I made was moving all the DNS hosting to Zonomi.com.  It's possible I could have skipped this step, since most hosting accounts will include some DNS, but I don't like having the two coupled.  On some webhosts, pointing the DNS at servers not controlled by the webhost can cause problems or is not supported, and sometimes they number and types of DNS records you can create are limited.  For $15/yr Zonomi can host all my domains, and I've been really impressed with how quickly changes propagate from their servers.

The next move was moving all of our SVN source controlled projects to Bitbucket.org.  It was time to move to DVCS anyway and keep up with the times.  Bitbucket provides free Mercurial hosting for both public and private repositories.  There are some limits on private repositories for the number of users, but it's plenty for small teams like ours.

With DNS and source control handled, the next item was the websites.  FuncWorks had not yet joined BizSpark, which now includes a generous amount of Azure hosting.  I googled a bit on running WordPress in Azure, and though its been done my experience running WordPress on Windows taught me it is not really 100% platform agnostic.  I asked around on twitter and emailed a few friends, which lead me to Bluehost.

For $5.95/mo Bluehost has an excellent shared LAMP hosting offer.  I spoke with a representative for about an hour in chat, running down all the sites I had to move and making sure they would be covered in a single plan.  The rep was even nice enough to point out their pricing policy so I wouldn't have a surprise at the end of my introductory price.  Worst case is I pay $8.95/mo, but I could pay for 3 years at once and get a $6.95/mo rate.  This is so awesomely cheap I'm not sweating it!

Side story on Bluehost: Shortly after moving all my WordPress sites over, I received an email from them at some of my sites had a php file with a known security hole.  It seems this file is popular in WordPress themes, but not used in WordPress iteself.  Bluehost reminded me it is my job to keep things patched and safe, but in this case they patched the file for me with the new version, closing the security hole.  Some hyper sensitive geeks may over react with a "how dare they!", but from my view saying "we saw a problem on your sites and fixed it before it was exploited" is great.  Also knowing that they are keeping an eye out for me by monitoring the other account (it is shared hosting) makes me feel like Bluehost is getting hosting right.

Finally we are down to just the ASP.NET sites, which are the sites that run GameMarx.com and XboxIndies.com.  To buy myself some time, and so I could do things the right way, I setup temporary WordPress sites for each of these.  The sites are pretty stock ASP.NET WebForms applications, with enough interesting bits that porting to Azure won't be straight ahead.  My next few blog posts will document the journey and hopefully be of use to someone else who is looking at Azure for the existing applications.

PS.  If you're in the Knoxville, TN area and are also a WordPress fan, come hang with us at the Knoxville WordPress Meetup on Tuesday Oct 11, 2011.  This will be the group's first meeting and is hosted by Daryl Houston who recently joined Automattic (the company behind WordPress, WordPress.com, Akismet, Gravatar, and many other cool sites and widgets).

Posted By Mike On Sunday, October 02, 2011
Filed under azure wordpress | No Comments

About Michael

Michael C. Neel, born 1976 in Houston, TX and now live in Knoxvile, TN. Software developer, currently .Net focused. Board member of ETNUG and organizes CodeStock, East Tennessee's annual developers conference. .Net speaker, a Microsoft ASP.NET MVP and ASPInsider. Co-Founder of FuncWorks, LLC and GameMarx.

Proud father of two amazing girls, Rachel and Hannah, and loving husband to Cicelie who inflates and pops his ego as necessary.

 Subscribe to ViNull.com |  Comments

Follow me on Twitter | Contact Me

XNA 3D Primer by Michael C. Neel

XNA 3D Primer by Michael C. Neel
Buy Now: [ Amazon ] [ Wrox ]

GameMarx

CodeStock

ASPInsiders Member

ETNUG Member