||
|
 Tuesday, April 28, 2009
When Staging Really is for Staging– Deployment Patterns for Windows Azure
So a post that came through on RSS this morning from Ryan Dunn got me motivated to jot down some notes on a topic I’ve bee thinking about for a while. How best to deploy into Windows Azure. I’ll caveat this post with the fact that at the moment the Windows Azure deployment story is fairly simplistic- I don’t think we’ll be deploying via the web portal come RTM. So in Windows Azure you basically have two types of account, Storage and Compute. Within a compute account you effectively have two sets of instances that are grouped behind two URLs. These are referred to as ‘Staging’ and ‘Production’. So you might have two URLs that look something like this: http://foobar.cloudapp.net http://<guid>.cloudapp.net For all intents and purposes there is no difference between the instances that sit in behind these URLs. Basically the Azure Load Balancers are just pointing requests at the two different groups of servers. When you then push the ‘big blue button’ to do a production release you are basically just re-configuring the rules on the load balancer to swap the URLs around. This leads me to my point from the post title. In Windows Azure the idea of Staging really is much more akin to the military idea of a staging area. It’s the place where you marshal the troops ready to charge over the trenches. The ‘Staging’ deployment in Windows Azure basically gives us an area to marshall our instances before we make them live on the production URL. It means that we can achieve a Zero downtime deployment model because the machines are warm when we start routing traffic to them. It also means that you might not be able to (or probably shouldn’t) treat the Staging Deployment like you might traditionally treat a staging server in a more traditional on premise deployment. In an on premise staging server you’ll usually take your application, deploy it into staging, test it (under limited load) then redeploy it into production- this is a very different model. Looking at the image above you’ll see I have 1 instance in my Staging Deployment and 2 Instances in my production deployment. If I do a swap of these then we’ll end up with 1 instance in production and 2 in staging- basically halving the capacity of our production system. This would be bad. You should use your Staging deployment as a true staging area. You should configure it to run the same number of instances. You should give it the same configuration settings (where possible given code/data change vectors). In this way when you flick the switch and route traffic at those warm servers you’ll be ready to rock at full capacity. What does this mean for your Windows Azure development lifecycle? Here’s how I’d configure my accounts for a real world scenario aiming to achieve zero downtime upgrades. I’m going to *gloss over* the considerations of upgrading your data layer and leave that for another blog post. I’d configure myself with 3 storage accounts and 2 compute accounts for my application. foobarDevStorage, foobarStageStorage, foobarProdStorage foobarStage, foobarProd I’d dev my project on my local box using the local computer fabric and local storage. In some situations I’d use the cloud for my Dev storage instead. I’d treat my Stage accounts like a traditional Staging server. In other words I’d configure it with a couple of instances and deploy my package up there for pre-release testing. In reality I’d probably never use the Stage.Production Deployment on my staging server instead contenting myself with the http://<guid>.cloudapp.net URL. When I’m ready to do a production release I’d take the same package I used in Stage and deploy it into the Prod account. I’d use a Production config file and my Prod.Staging Deployment in the foobarProd account would be configured to run the full number of instances- i.e. if my production site runs on 30 instances my Prod.Staging deployment would need to be running 30 instances. I’d then to a quick^^ *smoke test* on the Prod.Staging deployment before finally swapping the Prod.Production and Prod.Staging deployments and basically routing traffic at my new deployment. I’d then suspend my Prod.Staging deployment because I’ll be paying to have those instances running. That’s my current thinking anyway. All subject to change as Windows Azure changes over the coming month. Now that’s the easy bit! Hot swapping the compute instances like this is easy because we are (or at least should be) building them using a stateless server pattern. The harder part is achieving a hot swap upgrade when you need to change your data tier. Because the data tier is stateful we need to consider consistency of the data. This is a problem in on-premise models too and one that does not have an easy solution. Maybe the Azure team will come up with some ‘magic’ that helps here??? I’ve got some thoughts on how it might be done but none of them are particularly elegant or developed yet. keep your eye out for a post on it sometime in the future. If this stuff appears useful to people (including the footnote below) I might bang up a sample and a web cast. Let me know in the comments. P.S. Ryan: Looking forward to seeing that tool! ^^ In reality I’d probably want each instance to have serviced at least one request in order to have JIT’ed everything and spun up. This means, for a 30 instance deployment, that I’d really have to slam the server with some load and probably have some way (setting a flag in the Application.OnStart event?) of ensuring that I had hit 30 unique servers. Easiest way to generate the load would probably be with a Windows Azure Worker role 
Windows Azure|Tuesday, April 28, 2009 11:37:03 PM UTC||
|
BooRah! Back into the boxing workout
Back into working out boxing styles with a PT. My techniques not too bad and power is still really good. Fitness- we’re working on. Lest you think that boxing is not the most killer workout you can do check out the peaks on the chart below. 
Gettin Fit|Tuesday, April 28, 2009 9:13:47 AM UTC||
|
 Friday, April 24, 2009
Essential Microsoft Word Tip: Changing Your Default Paste Setting
Sitting in our all hands sales meeting discussing how to ‘not stuff up the proposal template’. Got to talking about using Paste Special->Unformatted in Word. I didn’t know, but you can change the default paste settings in Word to ensure that cross document pasting is done nicely. The key is setting the default for ‘pasting from other programs’. This way when you cut and paste from PDFs and HTML and other stuf it doesn’t screw with your word document. 
|Friday, April 24, 2009 2:15:16 AM UTC||
|
 Thursday, April 23, 2009
Blew Up My Road Bike This Morning
So my morning road ride ended prematurely this morning. Got half way around the Miramar Peninsula and blew out a spoke. Stupid cheap Shimano R500 wheels- methinks I might get Oli @ Roadworks to build me some nice training wheels. I have got my speedo working properly again though. 
Gettin Fit|Thursday, April 23, 2009 9:30:31 PM UTC||
|
 Tuesday, April 21, 2009
Photo Featured on the Destination Rotorua Site
Way cool. @RotoruaNZ Tweeted me the other day after I posted some photos of Mountain Biking up here. Asked if they could use one of my photos on their Mountain Biking page. Check out Phil Ross on the dipper with the *loud* strobe action going on. http://rotoruanz.com/ If you’re one of my overseas readers I can’t comment the City of Rotorua to you enough. I’ve dreamed of living there since I was at highschool and it’s still 100% on my 5 year roadmap. It’s close to the ski fields, has phenomenal mountain biking (the Redwoods), great kayaking (Kaituna and Wairoa) and great air links for frequent business travellers like me (Can go direct to AKL, WLG, CHC and ZQN). The only query/quibble I have with the Destination Rotorua site is why on earth is it hosted on the other side of the world!?! See the trace-route below. Looks like it’s in Orlando! Looks like their site uses PHP so they’ll probably be a good candidate for the Apache version of the Runtime Page Optimizer http://www.getrpo.com/Product/Apache. Running the RPO site tester it reckons it should knock a couple of seconds off the New Zealand load times. C:\Users\Chris>tracert www.rotoruanz.com Tracing route to rotoruanz.com [66.7.213.144] over a maximum of 30 hops: 1 13 ms <1 ms 1 ms … 2 <1 ms <1 ms <1 ms … 3 1 ms 2 ms 1 ms wlgrtr1-65.intergen.org.nz [202.126.87.65] 4 4 ms 1 ms 2 ms ihwrtr1-129.intergen.net.nz [202.126.87.129] 5 2 ms 5 ms 3 ms 32.114.216.13 6 158 ms 150 ms 148 ms 165.87.71.190 7 150 ms 148 ms 148 ms 12.127.33.6 8 150 ms 152 ms 158 ms cr2.sffca.ip.att.net [12.122.136.74] 9 148 ms 148 ms 156 ms ggr3.sffca.ip.att.net [12.122.136.17] 10 150 ms 149 ms 154 ms att-gw.sanfran.level3.net [192.205.33.78] 11 157 ms 162 ms 161 ms vlan89.csw3.sanjose1.level3.net [4.68.18.190] 12 176 ms 152 ms 160 ms ae-83-83.ebr3.sanjose1.level3.net [4.69.134.233] 13 151 ms 155 ms 167 ms ae-2.ebr3.losangeles1.level3.net [4.69.132.10] 14 148 ms 157 ms 148 ms ae-63-63.csw1.losangeles1.level3.net [4.69.137.3 4] 15 160 ms 163 ms 161 ms ae-62-62.ebr2.losangeles1.level3.net [4.69.137.1 7] 16 183 ms 181 ms 192 ms ae-3.ebr3.dallas1.level3.net [4.69.132.78] 17 202 ms 181 ms 180 ms ae-93-93.csw4.dallas1.level3.net [4.69.136.166] 18 190 ms 197 ms 181 ms ae-91-91.ebr1.dallas1.level3.net [4.69.136.133] 19 215 ms 214 ms 224 ms ae-1-14.bar2.orlando1.level3.net [4.69.137.153] 20 220 ms 218 ms 210 ms ae-9-9.car2.orlando1.level3.net [4.69.133.69] 21 212 ms 210 ms 211 ms hostdime.car2.orlando1.level3.net [4.79.118.38] 22 211 ms 211 ms 213 ms dime151.dizinc.com [66.7.213.144] Trace complete.
.NET | Adventure Sports|Tuesday, April 21, 2009 11:11:42 PM UTC||
|
Lovely Ride Around the Miramar Peninsula This Morning - 50km
So just a great morning here in Wellington today. Rode into the office and dropped off my laptop then did 50km around the bays. Rode out around the peninsula to the round-about then back again. About 1hr 45min all up but the last bit from Kilbirnie home was pretty cruisy. Training effect on the Suunto T3c was 4.0. Speed on my Polar is broken due to a spoke that keeps coming loose. 
Gettin Fit|Tuesday, April 21, 2009 9:41:57 PM UTC||
|
 Sunday, April 19, 2009
Playing with the Canon 5D MkII plus some Strobes in the Redwoods MTB Park in Rotorua
So I spent last week Mountain Biking in Rotorua and generally recovering from my 3 months of travel. Got out with the Canon 5D MkII and some strobes for a bit of run in the Redwoods. Photos were taken by a variety of Myself, Phil Ross, James Ogle and Sarah Bolland. %20Photo%20Ride%20(1%20of%2013)_thumb.jpg) Phil Ross on ‘The Dipper’. 5D MkII, Sigma 14mm F2.8 EX DG + 580 EX II on ‘Ebay Triggers’ %20Photo%20Ride%20(2%20of%2013)_thumb.jpg) Chris Auld on ‘The Dipper’ 5D MkII, Sigma 14mm F2.8 EX DG + 580 EX II on ‘Ebay Triggers’ %20Photo%20Ride%20(3%20of%2013)_thumb.jpg) Canon 20D and Canon EF 50mm F1.8 II %20Photo%20Ride%20(4%20of%2013)_thumb.jpg) Chris Auld on the Dipper Canon 5D Mk II w/ 70-200 F2.8 IS L 1 x 580 EX 1 x 580 EX II fired by ST-E2 %20Photo%20Ride%20(5%20of%2013)_thumb.jpg) David Addison Canon 20D and Canon EF 50mm F1.8 II %20Photo%20Ride%20(6%20of%2013)_thumb.jpg) Chris Auld and David Addison on The Dipper Canon 5D Mk II w/ 70-200 F2.8 IS L 1 x 580 EX 1 x 580 EX II fired by ST-E2 %20Photo%20Ride%20(7%20of%2013)_thumb.jpg) Chris Auld and David Addison on The Dipper Canon 20D and Canon EF 50mm F1.8 II %20Photo%20Ride%20(8%20of%2013)_thumb.jpg) Getting the strobes setup Canon 20D and Canon EF 50mm F1.8 II %20Photo%20Ride%20(9%20of%2013)_thumb.jpg) David Addison on The Dipper Canon 5D Mk II w/ 24-104 F4 L IS 1 x 580 EX 1 x 580 EX II fired by ST-E2 %20Photo%20Ride%20(10%20of%2013)_thumb.jpg) Chris Auld on The Dipper Canon 5D Mk II w/ 24-104 F4 L IS 1 x 580 EX 1 x 580 EX II fired by ST-E2 %20Photo%20Ride%20(11%20of%2013)_thumb.jpg) Canon 20D and Canon EF 50mm F1.8 II %20Photo%20Ride%20(12%20of%2013)_thumb.jpg) Canon 20D and Canon EF 50mm F1.8 II Chris Auld on The Dipper Canon 5D Mk II w/ 24-104 F4 L IS 1 x 580 EX 1 x 580 EX II fired by ST-E2
Adventure Sports | Photography|Sunday, April 19, 2009 10:48:40 PM UTC||
|
 Wednesday, April 08, 2009
Buffering Requests to On-Premise Systems via Windows Azure Worker Roles
So at almost all the Windows Azure events I’ve run around the world recently we’ve always gotten into a discussion about hooking Windows Azure applications up to on-premise systems. Indeed in a recent demo I wrote for a CRM + Windows Azure session I showed how to wire up Windows Azure applications to your on-premise CRM server. Often you’ll be using the cloud for what I call forward processing. You should use caution here. Your Windows Azure application has the ability to scale almost infinitely. Your on-premise application does not. If you wire your Windows Azure web role directly to your on-premise system, say by making a direct Web Service call, and then your site gets slash dotted you’ve basically built your self a massive cloud hosted Distributed Denial of Service engine! What you need to ensure that you do is buffer all of your requests from the cloud to your on-premise system via a queue of some sort. You may choose to use a Windows Azure Storage Queue for this or you may choose to use the new Queue and Router capabilities in the .NET Service bus. This means that if your Azure Web Role suddenly gets a huge amount of traffic the requests to your back end system will be queued and processed only as fast as the on premise application is able to handle them- the last thing you want is for a simple client self service application in the cloud to bring down a core business application on premise. Obviously doing this is going to require that the call to the backend system is capable of being made asynchronously. If it’s a one way operation then it’s easy, if it’s a two way operation then getting data back to your user is generally going to be a case of having your worker role right back to to an Azure Table or indeed having a notification queue for each user that your worker role can enqueue the result onto. In summary: If you wire your Windows Azure application directly to your on-premise application you are dicing with danger.
Windows Azure|Wednesday, April 08, 2009 12:02:09 AM UTC||
|
 Thursday, April 02, 2009
80 Year Old Ninja
So it’s election time in India and just check out the BJP election add that popped up when I browsed Kiwiblog today He’s like some 80 year old decisive determined Ninja! Hope this place isn’t like Thailand.
Human Aggregation|Thursday, April 02, 2009 12:08:17 AM UTC||
|
 Wednesday, April 01, 2009
@Twitchhiker is a total tool!
So it appears that Paul Smith, the TwitchHiker has decided that: “wherever you go in New Zealand, residents will complain how utterly frustrating the technology is, one born of a telecommunications monopoly and the country's remote placing on the planet” http://www.stuff.co.nz/technology/2307100/Twitchhike-stumbles-at-last-hurdle/ Is our telecommunications infrastructure really that obviously ‘one born out of a telecommunications monopoly’? I’ve travelled the globe, hell, I’ve travelled the globe in just the past 3 months and our infrastructure in new Zealand is as accessible, as fast and as useful as any other country I’ve visited recently. If Paul Smith wants to fly over here on the generosity of New Zealanders (@flyairnz and others) and then spout his mouth off about out internet infrastructure then he can $%&^$^ off back to Newcastle as far as I’m concerned. Clueless tool! [Update] In the comments someone asked me to back my statements up saying that Mr Smith backed his statements up. Well. Mr Smith just regurgitated the same old ‘Telecom is a monopolistic provider’ crap that seems to do the rounds. And I struggle to see how he could really lay claim to his experience unless he spent his entire time in a hermetically sealed Maui campervan. So some facts to back it up then. I travel the country and indeed the world. (9 Countries, 23 cities/airports, 130,000km and 59 days on the road just this year). My iPhone 3G and Tablet PC (with UMTS inbuilt) travel with me everywhere. In NZ this year I’ve been to TUO, HLZ, ROT, DUD, CHC, ZQN, AKL, MRO, NPE, NSN and a bunch of places in between when it’s been via vehicular rather than winged transport. From memory the only place I’ve been without Broadband when I’ve wanted it was at the Outdoor Pursuits Center in the middle of bloody nowhereville near National Park. Anywhere else I’ve had at a bare minimum sufficient GPRS signal to check my mail(I had GPRS at SEHOPC but I wanted broadband) , tweet my tweets and, should I have wanted to, cry poverty and try and sponge some more free travel. While not as ubiquitous as in the USA or Canada, the availability of good quality WiFi (back hauled no doubt by monopoly provided ADSL) is just fine here in NZ and as good as Australia or any other country that I’ve been to recently in South East Asia bar maybe Singapore.
Rants|Wednesday, April 01, 2009 12:11:41 PM UTC||
|
Gyming it at Infosys in Bangalore- Recumbent Bike Power Sprinting
So I’m staying on the Infosys Campus in Bangalore this week and hitting up their gym each morning. The campus is a fantastic facility and the gym is top notch. Did a cardio work this morning including a sprint on the Recumbent bike…. never thought I could peak my heart rate like i did on the recumbent! Always thought they were for grandmas! Definitely more of this for me going forward. Check out the chart Tracking my workout using both my Polar S625x (as above) and my Suunto T3c at the moment. Set out to achieve a 4.0 Training Effect on the Suunto which I nailed right at the peak of the recumbent interval- I think I was on level 18 (Constant wattage mode) doing about 100 RPM for that interval.
Gettin Fit|Wednesday, April 01, 2009 2:25:00 AM UTC||
|
|
|