Scott Hanselman

Penny Pinching Video: Moving an Azure Website between data centers

April 19, '13 Comments [8] Posted in Azure
Sponsored By

I talked about Pinching pennies when scaling in The Cloud last week when I added jQuery lazy loading to my podcast's Website. I wanted to avoid paying any unnecessary bandwidth costs. The result was great and I'll be under my bandwidth this month.

I'm continuing to look for ways to optimize and pinch pennies in the cloud. I realized recently that while my Website was running in the West US Azure datacenter, the database (managed by Carl Franklin's podcasting company) was running in North Central US. This means I was paying for the bandwidth of my database calls. Not to mention, it was slower, not the best idea, plus I was calling into a SQL Server over the open internet (although I had opened the firewall to do so).

This is unusual to have a website and SQL Database so far apart, of course, as you'll usually make your site and database at the same time in the same place. Azure also goes out of it's way to keep these linked resources together as you build them.

However, Carl had setup the database and original website a while back, and I only just redesigned it and moved it to Azure recently. Additionally, the administrative backend for the Hanselminutes podcast was in North Central, so we found ourselves in this position.

Azure Websites capacity opened up in the North Central datacenter, so I took lunch to move my site. You can't just click "move," but it's actually very easy to redeploy. The whole process including DNS changes took less than 15 minutes as you can see in the YouTube video above.

Here's the steps I used:

  • I made a new site in the new Data Center
  • I made it Shared so I could use a custom domain (or you can use Reserved)
  • I took the domain names off the West US site, and moved them within the Portal to the North Central one
    • If this site was super important I would have had a load balancer and kept both sites up while I waited, but total downtime was like 5 min so I didn't sweat it for this.
  • I ensured the database within North Central was a "Linked Resource" within my Website
  • I made sure my new website had the right connection strings in configuration.
  • I downloaded the new website's publish profile and imported it anew into WebMatrix (or Visual Studio, etc)
  • Published the site using the new publish profile.
  • Cleared DNS and visited the site and confirmed it worked.
  • Deleted the old site.

It worked well and I'm happy with the result. My next penny pinching step (and a nice geo-load balanced optimization) will be to move all the images to the CDN so that folks overseas get edge caching...that means that Australians will get the images for the site served from a nearby datacenter. I'll get this extra benefit for less than I am paying for website bandwidth.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Installing Helvetica Neue Fonts with Google Chrome on Windows considered harmful

April 17, '13 Comments [24] Posted in Bugs
Sponsored By

A few days ago, I visited the Xamarin.com website and noticed this. The word "Pricing" looks like "Prioing."

The C looks like an O in Chrome

It's not an illusion. It looks wrong in Google Chrome. See this zoomed-in shot.

The C looks like an O in Chrome

Here's the same menu in IE. Note the subtle"bites" that have been taken out of the g and s, but the c is OK. The hinting is OK, but the font is somehow "wrong."

It looks OK, if a little choppy in IE

I emailed support@xamarin, and mentally blamed Google Chrome as it's well know they've been having trouble with their Web Font rendering of late. In fact, Jin Yang (@jzy) had to abandon Montserrat, our Web Font of choice, for a more conservative one whilst doing the Hanselman.com redesign due to Google Chrome's poor font rendering on Windows. (It's lovely on Mac.)

I also happened to be at the Xamarin Evolve conference this week, so I mentioned it to the team down there, thinking they could pick another font.

Fast forward, and I'm on the plane, checking my email with Gmail Offline (the HTML5 offline version of Gmail) and noticed this.

These fonts look like crap too!

Helvetica Neue has messed up my Gmail Offline

What's going on here? What's changed? Doesn't it seem like "What's changed?" is the question we engineer-types ask the most?

Well, what's changed is that I gave a talk at Xamarin Evolve this week, and in preparation, installed Helvetica Neue. It's a lovely font and I think it worked nicely for my talk and looked great in PowerPoint.

Helvetica Neue is a nice font for presentations

However, Helvetica is super common font that is mentioned in Stylesheets - often explicitly when CSS is designed on a Mac - and Arial on Windows usually steps in as the replacement on Windows.

The Helvetica Neue font that I installed for my presentation is very poorly hinted (if at all) at small sizes like the one's being used. It's just not a Web Font, and while it's great for the giant sizes I needed for my talk, it's lousy for the web.

Both  IE and Chrome were picking up that my system had a Helvetica available on the system and used it instead. The Stylesheet said "hey, gimme Helvetica" and the browser said "Cool, here's one."

While it's obvious it would have major effects in retrospect, I had never realized that a machine-wide "common" font installation like this could mess up font rendering in my browser. I think the best solution (even though I'm deleting Helvetica Neue) would be to use an explicit Web Font in your stylesheets when possible rather than relying on a system font like Helvetica, even though they are the ultimate fallback. Any designers want to  weigh-in the comments?

Here's Chrome now on Windows with Helvetica Neue removed:

Chrome on Windows looks nice

And IE

IE on Windows looks nice

I hope this post helps someone who might bump into this font issue. My sincerely apologies to the lovely Xamarin employees who took my "bug" seriously! Thanks to Damian Guard for his Font insight!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

How to disable the On-Screen Touch Keyboard in Windows 8

April 17, '13 Comments [17] Posted in Win8
Sponsored By
image

It's lovely, isn't it. It's the Windows 8 on-screen keyboard, except I don't need or want to see it. I have a Lenovo X1 Carbon Touch and it already has a keyboard. I will never ever want to use the Windows 8 touch keyboard. Unfortunately there is no checkbox or "just turn it off" way to disable the keyboard with a supported option.

However, there is a way to effectively disable the keyboard by stopping the service that controls it.

  • Press the Windows key + W
  • Type "services," and press Enter
  • Scroll down to "Touch screen keyboard and handwriting panel"
  • You can either right click and "Stop" or you can double-click and change it from "Automatic" startup to "Manual."

This will of course, disable both the touch keyboard and handwriting service, so you'll lose handwriting recognition. This was totally worth it to me and has made my touch screen laptop experience much better, especially when I'm using the Full Screen Browser. I hope this helps!

Note that if you have a touch only device, or a detachable keyboard, you could get yourself into a tough spot without an on-screen keyboard, so just have your mouse ready and a plan to turn this service back on if you get in trouble. ;) 

If you're having any other problems with Windows 8, I encourage you to check out my simple "Windows 8 Missing Instruction Manual" blog post and YouTube video. It's helped a lot of people and could help you!

Thanks!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Hanselman's Newsletter of Wonderful Things: April 3rd, 2013

April 12, '13 Comments [9] Posted in Newsletter
Sponsored By

I have a "whenever I get around to doing it" Newsletter of Wonderful Things. Why a newsletter? I dunno. It seems more personal somehow. Fight me.

You can view all the previous newsletters here. You can sign up here Newsletter of Wonderful Things or just wait and get them later on the blog, which hopefully you have subscribed to. Email folks get it first!

Here's the MOST RECENT newsletter, delay-posted as I do.


Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up at http://hanselman.com/newsletter and the archive of all previous Newsletters is here.

Scott Hanselman

(BTW, since you *love* email you can subscribe to my blog via email here: http://feeds.hanselman.com/ScottHanselman DO IT!)

P.P.S. You know you can forward this to your friends, right?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Windows task manager shows wrong CPU Speed when using Hyper-V

April 11, '13 Comments [21] Posted in Bugs | Tools
Sponsored By

My buddy Damian and I both recently bought the Lenovo X1 Carbon Touch. It's got Intel SpeedStep technology so it changes the CPU speed dynamically based on load. These two laptops of ours are identical. However, here's Damian's Task Manager when mostly idle.His speed is 0.60 GHz

Here's mine.

His speed is 2.49 GHz

What the heck is going on? His CPU is reporting 0.60 GHz of a potential speed of 2GHz, indicating that the chip has chilled out. Mine is reporting "full speed ahead!" at a speed that it doesn't even support, 2.49GHz!

We went around and around on this for a while until we realized that I had turned on Hyper-V Virtualization for Windows Phone Development and my Ubuntu VM. He hadn't.

We installed CPU-Z, a low level and very smart CPU utility and got the truth. In fact, both machines are stepping down, but my Kernel is running within the Hypervisor and it's CPU speed is being reported incorrectly to Task Manager. Task Manager is showing the MAX speed, and not the real (Hyper-V virtualized) speed.

cpuz

lenovocpu

NOTE: CPU-Z is lovely but the Download.com wrapper that they put around it is evil spyware and you need to really pay attention when you install or you'll end up installing a bunch of toolbars. Be warned.

I hope this helps someone! It wasted 30 minutes of my life.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.