<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Buck Woody : Azure, Best Practices</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/Best+Practices/default.aspx</link><description>Tags: Azure, Best Practices</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>High Availability for IaaS, PaaS and SaaS in the Cloud</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/11/06/high-availability-for-iaas-paas-and-saas-in-the-cloud.aspx</link><pubDate>Tue, 06 Nov 2012 15:15:28 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45969</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/45969.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=45969</wfw:commentRss><description>&lt;p&gt;Outages, natural disasters and unforeseen events have proved that even in a distributed architecture, you need to plan for High Availability (HA). In this entry I'll explain a few considerations for HA within Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS). In a separate post I'll talk more about Disaster Recovery (DR), since each paradigm has a different way to handle that.&lt;/p&gt;
&lt;h1&gt;Planning for HA in IaaS&lt;/h1&gt;
&lt;p&gt;IaaS involves Virtual Machines - so in effect, an HA strategy here takes on many of the same characteristics as it would on-premises. The primary difference is that the vendor controls the hardware, so you need to verify what they do for things like local redundancy and so on from the hardware perspective.&lt;/p&gt;
&lt;p&gt;As far as what you can control and plan for, the primary factors fall into three areas: multiple instances, geographical dispersion and task-switching.&lt;/p&gt;
&lt;p&gt;In almost every cloud vendor I've studied, to ensure your application will be protected by any level of HA, you need to have at least two of the Instances (VM's) running. This makes sense, but you might assume that the vendor just takes care of that for you - they don't. If a single VM goes down (for whatever reason) then the access to it is lost. Depending on multiple factors, you might be able to recover the data, but you should assume that you can't. You should keep a sync to another location (perhaps the vendor's storage system in another geographic datacenter or to a local location) to ensure you can continue to serve your clients.&lt;/p&gt;
&lt;p&gt;You'll also need to host the same VM's in another geographical location. Everything from a vendor outage to a network path problem could prevent your users from reaching the system, so you need to have multiple locations to handle this.&lt;/p&gt;
&lt;p&gt;This means that you'll have to figure out how to manage state between the geo's. If the system goes down in the middle of a transaction, you need to figure out what part of the process the system was in, and then re-create or transfer that state to the second set of systems. If you didn't write the software yourself, this is non-trivial.&lt;/p&gt;
&lt;p&gt;You'll also need a manual or automatic process to detect the failure and re-route the traffic to your secondary location. You could flip a DNS entry (if your application can tolerate that) or invoke another process to alias the first system to the second, such as load-balancing and so on. There are many options, but all of them involve coding the state into the application layer. If you've simply moved a state-ful application to VM's, you may not be able to easily implement an HA solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6366.HAIaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6366.HAIaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Planning for HA in PaaS&lt;/h1&gt;
&lt;p&gt;Implementing HA in PaaS is a bit simpler, since it's built on the concept of stateless applications deployment. Once again, you need at least two copies of each element in the solution (web roles, worker roles, etc.) to remain available in a single datacenter. Also, you need to deploy the application again in a separate geo, but the advantage here is that you could work out a "shared storage" model such that state is auto-balanced across the world. In fact, you don't have to maintain a "DR" site, the alternate location can be live and serving clients, and only take on extra load if the other site is not available. In Windows Azure, you can use the Traffic Manager service top route the requests as a type of auto balancer.&lt;/p&gt;
&lt;p&gt;Even with these benefits, I recommend a second backup of storage in another geographic location. Storage is inexpensive; and that second copy can be used for not only HA but DR.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/2313.HAPaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/2313.HAPaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Planning for HA in SaaS&lt;/h1&gt;
&lt;p&gt;In Software-as-a-Service (such as Office 365, or Hadoop in Windows Azure) You have far less control over the HA solution, although you still maintain the responsibility to ensure you have it. Since each SaaS is different, check with the vendor on the solution for HA - and make sure you understand what they do and what you are responsible for. They may have no HA for that solution, or pin it to a particular geo, or perhaps they have a massive HA built in with automatic load balancing (which is often the case).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/8345.HASaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/8345.HASaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All of these options (with the exception of SaaS) involve higher costs for the design. Do not sacrifice reliability for cost - that will always cost you more in the end. Build in the redundancy and HA at the very outset of the project - if you try to tack it on later in the process the business will push back and potentially not implement HA.&lt;/p&gt;
&lt;p&gt;References: &lt;a href="http://www.bing.com/search?q=windows+azure+High+Availability"&gt;http://www.bing.com/search?q=windows+azure+High+Availability&lt;/a&gt;&amp;nbsp; (each type of implementation is different, so I'm routing you to a search on the topic - look for the "Patterns and Practices" results for the area in Azure you're interested in)&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=45969" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Computing/default.aspx">Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Monitoring/default.aspx">Monitoring</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category></item><item><title>Windows Azure Database (SQL Azure) Development Tip</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/08/15/windows-azure-database-sql-azure-development-tip.aspx</link><pubDate>Wed, 15 Aug 2012 14:55:44 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44722</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/44722.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=44722</wfw:commentRss><description>&lt;p&gt;When you create something in the cloud, it's real, and you're charged for it. There are free offerings, and you even get free resources with your Microsoft Developer Network (MSDN) subscription, but there are limits within those. Creating a 1 GB database - even with nothing in it - is a 1 GB Database. If you create it, drop it, and create it again 2 minutes later, that's 2 GB of space you've used for the month. Wait - how do I develop in this kind of situation?&lt;/p&gt;
&lt;p&gt;With Windows Azure, you can simply install the free Software Development Kit (SDK) and develop your entire application for free - you need never even log in to Windows Azure to code. Once you're done, you simply deploy the app and you start making money from the application as you're paying for it.&lt;/p&gt;
&lt;p&gt;Windows Azure Databases (The Artist Formerly Known As SQL Azure) is a bit different. It's not emulated in the SDK - because it doesn't have to be. It's just SQL Server, &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ff394115.aspx" target="_blank"&gt;with some differences in feature set&lt;/a&gt;. To develop in this environment, you can use SQL Server, any edition. Be aware of the feature differences, of course, but just develop away - &lt;a href="http://technet.microsoft.com/en-us/library/cc645993(v=sql.110).aspx" target="_blank"&gt;even in the free "Express" or LocalDB flavors&lt;/a&gt; - and then &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee730904.aspx" target="_blank"&gt;right-click in SQL Server Management Studio to script objects. Script the database, but change the "Advanced" selection to the Engine Type of "SQL Azure"&lt;/a&gt;. Bing.&lt;/p&gt;
&lt;p&gt;Although most all T-SQL ports directly, one thing to keep in mind is that you need a Clustered Index on every table. Often the Primary Key (PK) is a good choice for that.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=44722" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category></item><item><title>The Importance of Paranoia for the Technical Professional</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/08/08/the-importance-of-paranoia-for-the-technical-professional.aspx</link><pubDate>Wed, 08 Aug 2012 12:19:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44620</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/44620.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=44620</wfw:commentRss><description>&lt;p&gt;I recently read a blog post from a technical professional who&amp;rsquo;s account had been hacked (&lt;a href="http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all/"&gt;http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all/&lt;/a&gt;)&amp;nbsp;&amp;nbsp;&amp;ndash; not because he used poor passwords or unsafe practices, but because the hackers used some social engineering to get around the safety he had put into place.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While I won&amp;rsquo;t focus on the particulars of his situation, the interesting part of his loss was the fragility of the security of his data. In this case, he lost personal data &amp;ndash; with no way to replace it. Two things stood out for me in his article: the chain of security through his accounts, and the single-source of data he had.&lt;/p&gt;
&lt;p&gt;In this case, someone contacted the vendor and pretended to be this person. Using easily obtained information, they simply gained access to the account, and didn&amp;rsquo;t even have to hack the password. From there, the chain was that using various convenience-features, the hackers could delete the smartphone, and then on to the laptop the person owned. They completely wiped that out, and this is where there is an issue &amp;ndash; he had his data on that laptop, and on the same vendor&amp;rsquo;s cloud backup. Since the hacker *&lt;b&gt;was&lt;/b&gt;* the account owner by that time, they wiped out both. The person&amp;rsquo;s personal pictures, etc were gone forever. From there the hackers impersonated the person on Twitter and made racist and other statements to embarrass the person.&lt;/p&gt;
&lt;p&gt;Although lots of features are available in all vendor products, I&amp;rsquo;ve always been&amp;hellip;.paranoid about using them. I try to follow the &amp;ldquo;moats and bridges&amp;rdquo; approach to security, meaning that one account or feature doesn&amp;rsquo;t lead to another. I don&amp;rsquo;t link things together that can be used to attach to more than one account, even when it's a cool new feature. One public logon from an airport&amp;rsquo;s &amp;ldquo;free&amp;rdquo; wifi (which I never use, by the way) can lead to these attacks &amp;ndash; even if you don&amp;rsquo;t think you&amp;rsquo;re logging on. Ever check your mail from the airport? Do you have more than one mail account in your mail client? You could be hacked. I realize most client software does a good job of trying to prevent this, but I use my own MiFi device which I have set to the highest encryption I can.&lt;/p&gt;
&lt;p&gt;I also keep lots of data in the cloud &amp;ndash; but that&amp;rsquo;s not the only place. Periodically I have my important data backed up to a local drive,which I rotate to another secure location. After all, I&amp;rsquo;ve moved most of my books, pictures, scans, everything to a digital format. There&amp;rsquo;s no way I&amp;rsquo;m keeping that in just one place, or on just one vendor.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are other things you can do to protect yourself &amp;ndash; a great list is here: &lt;a href="http://gizmodo.com/5932663/9-things-you-absolutely-must-do-to-keep-your-online-identity-secure"&gt;http://gizmodo.com/5932663/9-things-you-absolutely-must-do-to-keep-your-online-identity-secure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I help clients design solutions on Windows Azure,&amp;nbsp;I recommend another copy of the storage wherever possible &amp;ndash; even on other vendor's cloud storage or locally on a drive, or both. I&amp;rsquo;m paranoid that way &amp;ndash; I don&amp;rsquo;t want them to lose data. We take extraordinary precautions against losing data. Azure data has three copies on separate fault domains, and then those three are copied again to another physical datacenter automatically, that&amp;rsquo;s just built into the system. Even so, I&amp;nbsp; recommend periodic backups to other&lt;br /&gt;locations of data the client can&amp;rsquo;t easily re-generate.&lt;/p&gt;
&lt;p&gt;While we provide lots of tools, information and guidance about security and protection in Windows Azure, ultimately it's up to you to properly secure your assets and plan for disaster recovery. That's true of any cloud provider - you need to learn the platform well to understand how to protect your data.&lt;/p&gt;
&lt;p&gt;What I architect in Windows Azure I practice at home. Read that blog post, and I think you will agree it&amp;rsquo;s good to be a little paranoid. Sometimes they really are out to get you.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=44620" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category></item><item><title>Book Review (Book 11) - Applied Architecture Patterns on the Microsoft Platform</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/05/15/book-review-book-11-applied-architecture-patterns-on-the-microsoft-platform.aspx</link><pubDate>Tue, 15 May 2012 16:50:34 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:43364</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/43364.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=43364</wfw:commentRss><description>&lt;p&gt;This is a continuation of the books I challenged myself to read to help my career - one a month, for year. &lt;a href="http://sqlblog.com/b/buckwoody/archive/2011/06/28/book-review-programming-windows-azure-by-siriram-krishnan.aspx"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="color:#0066cc;"&gt;You can read my first book review here&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, and &lt;a href="http://sqlblog.com/b/buckwoody/archive/2011/06/07/head-in-the-clouds-eyes-on-the-books.aspx" target="_blank"&gt;the entire list is here&lt;/a&gt;. The book I chose for April 2012 was: &lt;a href="http://www.amazon.com/Applied-Architecture-Patterns-Microsoft-Platform/dp/184968054X" target="_blank"&gt;Applied Architecture Patterns on the Microsoft Platform&lt;/a&gt;. I was traveling at the end of last month so I&amp;rsquo;m a bit late posting this review here.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I chose this book: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I actually know a few of the authors on this book, so when they told me about it I wanted to check it out. The premise of the book is exactly as it states in the title - to learn how to solve a problem using products from Microsoft.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What I learned:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I liked the book - a lot. They've arranged the content in a "Solution Decision Framework", that presents a few elements to help you identify a need and then propose alternate solutions to solve them, and then the rationale for the choice. But the payoff is that the authors then walk through the solution they implement and what they ran into doing it.&lt;/p&gt;
&lt;p&gt;I really liked this approach. It's not a huge book, but one I've referred to again since I've read it. It's fairly comprehensive, and includes server-oriented products, not things like Microsoft Office or other client-side tools. In fact, I would LOVE to have a work like this for Open Source and other vendors as well - would make for a&amp;nbsp;great library for a Systems Architect. This one is unashamedly aimed at the Microsoft products, and even if I didn't work here, I'd be fine with that. As I said, it would be interesting to see some books on other platforms like this, but I haven't run across something that presents other systems in quite this way.&lt;/p&gt;
&lt;p&gt;And that brings up an interesting point - This book is aimed at folks who create solutions within an organization. It's not aimed at Administrators, DBA's, Developers or the like, although I think all of those audiences could benefit from reading it. The solutions are made up, and not to a huge level of depth - nor should they be. It's a great exercise in thinking these kinds of things through in a structured way.&lt;/p&gt;
&lt;p&gt;The information is a bit dated, especially for Windows and SQL Azure. While the general concepts hold, the cloud platform from Microsoft is evolving so quickly that any printed book finds it hard to keep up with the improvements.&lt;/p&gt;
&lt;p&gt;I do have one quibble with the text - the chapters are a bit uneven. This is always a danger with multiple authors, but it shows up in a couple of chapters. I winced at one of the chapters that tried to take a more conversational, humorous style. This kind of academic work doesn't lend itself to that style.&lt;/p&gt;
&lt;p&gt;I recommend you get the book - and use it. I hope they keep it updated - I'll be a frequent customer. :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=43364" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Career/default.aspx">Career</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Book+Review/default.aspx">Book Review</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category></item><item><title>Preparation is key to a successful cloud deployment</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/05/01/preparation-is-key-to-a-successful-cloud-deployment.aspx</link><pubDate>Tue, 01 May 2012 13:09:16 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:43122</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/43122.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=43122</wfw:commentRss><description>&lt;p&gt;If you want to be wise, watch the actions and outcomes of others. Emulate the successful actions, and avoid the actions that cause failure. That’s true in life in general - and in technology projects in specific.&amp;#160; &lt;/p&gt;  &lt;p&gt;I’ve worked with several clients who have created or migrated an application to “the cloud” - meaning using Microsoft Windows Azure or another provider. Although the statement in the title of this post is trite, I cannot over-emphasize how accurate it is. In every case of those who had a great experience with a distributed computing environment (which is thankfully the vast majority of my projects), &lt;/p&gt;  &lt;p&gt;What kind of preparation do you need to do? Here are some tips I’ve learned in the successful (and not-so-successful) deployments I’ve seen: &lt;/p&gt;  &lt;h3&gt;Follow standard recommendations for successful projects in general &lt;/h3&gt;  &lt;p&gt;You and your organization have probably done a few projects before - this one should have the same general attributes: a well-defined goal, a small, motivated team, a realistic timeline, and an adequate budget. I know, I know, you *never* seem to get those things - but if you don’t, you’ll fail. Simple as that. &lt;/p&gt;  &lt;h3&gt;Educate yourself&lt;/h3&gt;  &lt;p&gt;Computing technology started out on a single set of hardware for a single purpose - and realizing the limits of the hardware at hand, systems designers quickly realized that scale-out and virtualization was key. No, that’s not new - mainframes almost always worked on the concept of scale-out and virtual machines. But we switched in the 1980’s to single-user systems again, and we’ve been there ever since. By that I mean you install an OS on the things you work on. Now we move back to distributed system concepts, and there are some real differences. You’ll need to learn how those work, and do things a new way. Hey, we’re IT - we LOVE learning new things, right? &lt;/p&gt;  &lt;h3&gt;Get a partner if needed&lt;/h3&gt;  &lt;p&gt;There are a few of us white-haired Gandalf’s around that remember how to work in a distributed system, but if it’s new to you, that’s completely OK. You can save yourself a world of trouble by working with someone who’s done this before - a partner you hire, someone from Microsoft Consulting, whatever. &lt;/p&gt;  &lt;p&gt;And don’t forget support - who will handle each issue, what is the escalation model, who are your contacts at Microsoft, and what is your “light’s out” strategy?&lt;/p&gt;  &lt;p&gt;“A new broom sweeps clean”, the old adage goes, but the old brooms know where the dirt is. &lt;/p&gt;  &lt;h3&gt;Build a model&lt;/h3&gt;  &lt;p&gt;Take some time to do a Proof of Concept on your local system and using your Azure hours from your MSDN account if you have one. Going through this build - and being willing to throw it away and try it a different way - is invaluable. &lt;/p&gt;  &lt;h3&gt;Test your theories&lt;/h3&gt;  &lt;p&gt;Three statisticians are walking in a field. They see a rabbit - the first guy raises his gun, firing far in front of the rabbit. The second guy simultaneously raises his gun and fires far behind the rabbit. The third guy yells “We got him!”&lt;/p&gt;  &lt;p&gt;Not every theory is correct - not every attempt is the right one. Build in your success tests while you’re building your model. Then check them - don’t leave this step out. &lt;/p&gt;  &lt;h3&gt;Rinse, lather, repeat&lt;/h3&gt;  &lt;p&gt;This is advice from a shampoo bottle - which I’ve never used (I don’t really have that much hair - especially now). But in a “Cloud” project, it’s important. It’s an evolving system, that gains new improvements at an amazing rate. As soon as you deploy and stabilize you need to start the process over again. If you created your system in a Services model, with contracts for the APIs and abstracted code, this is far easier. &lt;/p&gt;  &lt;p&gt;It’s not hard to do a cloud project right. But it’s really simple to do it wrong. Follow these guidelines and you’ll learn from the successes - and mistakes - of others. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=43122" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Process/default.aspx">Process</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Customer+Contact/default.aspx">Customer Contact</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SOA/default.aspx">SOA</category></item><item><title>I was going to call this post “Windows Azure Best Practices” but I’m not allowed to</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/04/18/i-was-going-to-call-this-post-windows-azure-best-practices-but-i-m-not-allowed-to.aspx</link><pubDate>Wed, 18 Apr 2012 13:08:59 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42877</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/42877.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=42877</wfw:commentRss><description>&lt;p&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;font-size:11pt;"&gt;For reasons I don't completely understand, I'm not allowed to call the following advice &amp;quot;Best Practices&amp;quot; - apparently there is some liability or something there. So let's say these are &amp;quot;really good ideas&amp;quot; for developing applications for Windows Azure. (Did you see how I worked it into the title anyway so the search engines find it? Always thinking. :) )&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;font-size:11pt;"&gt;And of course these are by no means comprehensive - just a few notes I've made as I've been involved with projects. So here they are, in no particular order:&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Understand the platform - never stop learning, it changes all the time: SDK and Training Kit are the best resources. &lt;/span&gt;&lt;a href="http://channel9.msdn.com/Blogs/pdc2008/ES03"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://channel9.msdn.com/Blogs/pdc2008/ES03&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;It may sound pedantic, but it's just true. You need to learn how the platform works. The most issues I run into are things that are documented - most of the time very clearly. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Follow standard best practices for your language&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;Windows Azure code does have some differences, but in large part it's just code. If you write Java to run on Azure, write good Java. Learn the best practices for your codeset and apply those - it will not only make your code faster and less error-prone, it will be cheaper to run. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Keep a backup of your deployments&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;Things happen. Make sure you have your latest deployment checked into source code. If someone were to perhaps stop paying the bill and the Role is deleted, Microsoft does not have a secret backup of your application. Do not ask me how I know this. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Batch up calls - fewer calls are usually more efficient (and cheaper) than lots of smaller calls.&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;This is typical for distributed computing environments - include the retry logic tip as well to ensure the call is successful.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Use Cache and max out the instance wherever you can - you're paying for it, use it!&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Use the Windows Azure Diagnostics and monitor those counters accordingly: &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/buckwoody/archive/2011/09/06/plan-for-diagnostics-in-cloud-computing-from-the-git-go.aspx"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://blogs.msdn.com/b/buckwoody/archive/2011/09/06/plan-for-diagnostics-in-cloud-computing-from-the-git-go.aspx&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Implement retry logic: &lt;/span&gt;&lt;a href="http://www.davidaiken.com/tag/best-practices/"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://www.davidaiken.com/tag/best-practices/&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;In a distributed computing environment, you may have a lag in time between operations. Make your code less brittle to failures for a given call, and ensure that you include retry logic.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Use multiple instances: &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/buckwoody/archive/2012/03/20/why-do-i-need-two-roles-in-windows-azure.aspx"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://blogs.msdn.com/b/buckwoody/archive/2012/03/20/why-do-i-need-two-roles-in-windows-azure.aspx&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;This article is a must-read.&lt;/span&gt; &lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Have a backup strategy&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;Microsoft keeps three copies of your data at all times in a datacenter, and backs up those three copies to another for safety. But that's at the latest moment - if you need point-in-time restore, make sure you code that into your architecture.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Use affinity groups: &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/buckwoody/archive/2011/11/28/windows-and-sql-azure-best-practices-affinity-groups.aspx"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://blogs.msdn.com/b/buckwoody/archive/2011/11/28/windows-and-sql-azure-best-practices-affinity-groups.aspx&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;Affinity groups are a way of keeping your data and code together. This is usually a great idea from a performance standpoint, although there are applications that can break this rule for centralization or seldom-accessed data.&lt;/span&gt; &lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Have a lights-out strategy&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&lt;span style="font-style:italic;"&gt;Anything that a human makes can fail. That includes entire datacenters, routers, the Internet. So make sure you know what to do if everything is unavailable. Perhaps that's just a notification system, a full fallback to an on-premises system, something. But plan. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Security best practices are here: &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/usisvde/archive/2012/03/07/windows-azure-security-best-practices-part-1-the-challenge"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://blogs.msdn.com/b/usisvde/archive/2012/03/07/windows-azure-security-best-practices-part-1-the-challenge&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;s-defense-in-depth.aspx and here &lt;/span&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=7253"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=7253&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Denial of Service best practices here: &lt;/span&gt;&lt;a href="http://blog.ehuna.org/2012/04/how_to_stop_a_denial_of_servic.html"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://blog.ehuna.org/2012/04/how_to_stop_a_denial_of_servic.html&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p style="margin:0in 0in 0in 0.375in;font-family:calibri;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;ul style="margin-top:0in;unicode-bidi:embed;direction:ltr;margin-bottom:0in;margin-left:0.375in;"&gt;   &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;Blob Storage Best Practices: &lt;/span&gt;&lt;a href="http://acloudyplace.com/2012/01/8-essential-best-practices-in-windows-azure-blob-storage/"&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://acloudyplace.com/2012/01/8-essential-best-practices-in-windows-azure-blob-storage/&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:calibri;font-size:11pt;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=42877" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>Pay in the future should make you think in the present</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/04/10/pay-in-the-future-should-make-you-think-in-the-present.aspx</link><pubDate>Tue, 10 Apr 2012 13:53:50 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42764</guid><dc:creator>BuckWoody</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/42764.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=42764</wfw:commentRss><description>&lt;p&gt;Distributed Computing - and more importantly “-as-a-Service” models of computing have a different cost model. This is something that sounds obvious on the surface but it’s often forgotten during the design and coding phase of a project. &lt;/p&gt;  &lt;p&gt;In on-premises computing, we’re used to purchasing a server and all of the hardware infrastructure and software licenses needed not only for one project, but several. This is an up-front or “sunk” cost that we consume by running code the organization needs to perform its function. Using a direct connection over wires you’ve already paid for, we don’t often have to think about bandwidth, hits on the data store or the amount of compute we use - we just know more is better. In a pay-as-you-go model, however, each of these architecture decisions has a potential cost impact. The amount of data you store, the number of times you access it, and the amount you send back all come with a charge. The offset is that you don’t buy anything at all up-front, so that sunk cost is freed up. And financial professionals know that money &lt;em&gt;now &lt;/em&gt;is worth more than money &lt;em&gt;later&lt;/em&gt;. Saving that up-front cost allows you to invest it in other things. &lt;/p&gt;  &lt;p&gt;It’s not just that you’re using things that now cost money - it’s that the design itself in distributed computing has a cost impact. That can be a really good thing, such as when you dynamically add capacity for paying customers. If you can tie back the cost of a series of clicks to what a user will pay to do so, you can set a profit margin that is easy to track. &lt;/p&gt;  &lt;p&gt;Here’s a case in point: Assume you are using a large instance in Windows Azure to compute some data that you retrieve from a SQL Azure database. If you don’t monitor the path of the application, you may not know what you are really using. Since you’re paying by the size of the instance, it’s best to maximize it all the time. Recently I evaluated just this situation, and found that downsizing the instance and adding another one where needed, adding a caching function to the application, moving part of the data into Windows Azure tables not only increased the speed of the application, but reduced the cost and more closely tied the cost to the profit. &lt;/p&gt;  &lt;p&gt;The key is this: from the very outset - the design - make sure you include metrics to measure for the cost/performance (sometimes these are the same) for your application. Windows Azure opens up awesome new ways of doing things, so make sure you study distributed systems architecture before you try and force in the application design you have on premises into your new application structure. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=42764" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category></item><item><title>“I could use a little help here” or “I can do it myself, thank you” for Cloud Projects</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/04/03/i-could-use-a-little-help-here-or-i-can-do-it-myself-thank-you-for-cloud-projects.aspx</link><pubDate>Tue, 03 Apr 2012 13:20:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42665</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/42665.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=42665</wfw:commentRss><description>&lt;p&gt;Windows Azure allows you to write code in languages within the .NET stack, you can use Java, C++, PHP, NodeJS and others. Code is code - other than keeping things stateless, using a Web or Worker Role in Azure is not all that different from working with an on-premises system. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;However….&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Working in a scalable, component-based stateless architecture that can use federated security is not all that common for many developers. Some are used to owning the server, scaling up, and state-full paradigms that have a single security domain. Making the transition whilst trying to create a new software application or even port a previous one can be daunting. &lt;a href="http://blogs.msdn.com/b/buckwoody/archive/2010/11/16/windows-azure-learning-plan.aspx" target="_blank"&gt;Sure, we have absolutely tons of free training, kits, videos, online books and more to learn on your own&lt;/a&gt;, but some things like architecture can be pivotal as you move along. &lt;/p&gt;  &lt;p&gt;So the question is, should you just strike out on your own for a Cloud project, or get &lt;a href="http://www.microsoft.com/microsoftservices/en/us/journey_to_the_cloud.aspx" target="_blank"&gt;Microsoft Consulting Services&lt;/a&gt; or another partner to work with you on your first one? I use a few decision points to help guide the projects I assist in.&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Note: I’m a huge fan of having help that ends up giving you training and leaves you in charge. If you do engage with someone to help you, make sure you keep this clear and take more and more ownership yourself as the project progresses.&lt;/font&gt;&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How much time do you have?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Usually the first thing I ask is about the timeline for the project. It doesn’t matter how skilled you are, if you have a short window to get things done it’s better to get help - especially if this is your first cloud project. Having someone that knows the platform well can save you amazing amounts of time. If you have longer, then start with the training in the link above and once you feel confident, jump in. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How complex is the project?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I&lt;/strong&gt;f there are a lot of moving parts, it’s best to engage a partner. The reason is that certain interactions - particularly things like Service Bus or Data Integration&amp;#160; - can be quite different than what you may have encountered before. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How many people do you have?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I have a “pizza rule” about projects I’ve used in my career - if it takes over two pizzas to feed everyone on the project, it’s too big and will fail. &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/8780.wlEmoticon_2D00_smile_5F00_2.png" /&gt; That being said, one developer and a one-week deadline does not a good project make, usually. It’s best to have at least one architect (or someone in that role) guiding the project along, and at least two developers to work on a cloud project. That’s a generalization of course, since I’ve seen great software on Azure with one developer writing code all by herself, but for more complex projects, more (to a point) is better. The nice thing about bringing on a partner is that you don’t have to hire them full time - they help you and then they go away. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How critical is the project?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There’s no shame in using some help. If the platform is new, if the project is large and complex, and if it is critical to the business, you should engage a partner. That’s regardless of Cloud or anything else - get some help. You don’t want to hit your company’s bottom line in a negative way, but you have to innovate and get them a competitive advantage. Do your research, make sure the partner is qualified to help you, and get it done.&lt;/p&gt;  &lt;p&gt;Don’t let these questions scare you off. There are lots of projects you can implement on Windows and SQL Azure with nothing other than the Software Development Kit (SDK) that you get for free with Windows Azure. And assistance comes in many forms - sometimes just phone support, a friend you can ask. Microsoft Consulting Services or any of our great partners. You can get help on just the architecture piece or have them show you how to write the code. They’ll get involved as little or as much as you like. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=42665" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Career/default.aspx">Career</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Help/default.aspx">Help</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category></item><item><title>Cloud Computing Patterns: Using Data Transaction Commitment Models for Design</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/02/14/cloud-computing-patterns-using-data-transaction-commitment-models-for-design.aspx</link><pubDate>Tue, 14 Feb 2012 20:45:47 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41744</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/41744.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=41744</wfw:commentRss><description>&lt;p&gt;There are multiple ways to store data in a cloud provider, specifically around Windows and SQL Azure. As part of a &amp;ldquo;Data First&amp;rdquo; architecture design, one decision vector &amp;ndash; assuming you&amp;rsquo;ve already done a data classification of the elements you want to store &amp;ndash; is to decide the transaction level you need for that datum.&amp;nbsp; Once you&amp;rsquo;ve decided on what level of transactional commitment you need, you can make intelligent decisions about the storage engine, method of access and storage, speed and other requirements.&lt;/p&gt;
&lt;p&gt;Although the list below is neither original nor exhaustive, these are the general considerations I use for a given data set. It&amp;rsquo;s important to note that in many on premises systems the engine choice at hand overrides these concerns. If you have a large Relational Database Management System (RDBMS) for instance, you might simply place all data there without further consideration. In a Platform as a Service (PaaS) like Windows and SQL Azure, however, selection of the proper engine for a particular dataset has implications ranging from cost to performance, and selecting the right engine is critical when you want to leverage the data across &amp;ldquo;Bid Data&amp;rdquo; analysis like Hadoop or other constructs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monolithic Consistent Transactional&lt;/strong&gt;&lt;br /&gt;The first selection is analogous to a local RDBMS system. The dataset is retrieved in a functionally single, monolithic transaction, i.e. kept together with ACID properties in mind. This is the most reliable type of data design for datasets that require a high degree of safety in the read/write pattern. As an example, a bank ATM transaction should be modeled in a monolithic way. If I make a transfer of funds from one account to another, I want the money to be subtracted from one account if and only if it is successfully added to the other. The bank, on the other hand, wants the money added to the second account if and only if it is subtracted from the first. This is a prime example of a monolithic (single atomic transaction), Consistent (if and only if) and Transactional (as a unit, with provision for roll-back and reporting if unsuccessful) data requirement.&lt;/p&gt;
&lt;p&gt;The primary engine used for this type of data is often SQL Azure &amp;ndash; an RDMBS in the same datacenters as Windows Azure. Placing both the calling application, whether that is a Data Access Layer-based code widget or a direct call from a Web or Worker Role, means that data is retrieved quickly and in a monolithic way. The costs for this method is based on overall database size.&amp;nbsp; A consideration is how much data you can store this way. Database sizes have limits, although there are ways of overcoming size issues using technologies such as Sharding or SQL Azure Federations. There is also the consideration of performance. In an RDBMs that conforms to ACID properties, locking and other overhead for safety is at conflict with the highest possible read performance.&amp;nbsp; But in some cases the ACID properties are worth the cost, as in the banking example.&lt;/p&gt;
&lt;p&gt;You are not limited to SQL Azure in this model. Windows Azure Table storage, while similar to NoSQL offerings is different in that it is immediately consistent across all three replicated copies of data, offering a higher degree of safety. And while Table storage does not offer built-in support for transactions, there are ways to achieve certain transaction levels.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monolithic Realtime&lt;/strong&gt;&lt;br /&gt;If consistency can be relaxed &amp;ndash; meaning that a guaranteed read/write patter is not essential &amp;ndash; then more options arise in Windows and SQL Azure. You can still use SQL Azure for this type of storage, with either automatic or programmatic hints allowing for &amp;ldquo;dirty reads&amp;rdquo;. Windows Azure Table storage is still consistent, but the selection of the method for querying the data such as separate copies of read and write data can be employed. Because of the relaxed transaction nature, higher speeds are possible by querying cached or separate datasets.&lt;/p&gt;
&lt;p&gt;An example here is that same transaction from the bank, but a statement inquiry. Just after the money is deposited, the user wishes to query the current balance. The current balance &amp;ndash; minus the transaction that just occurred &amp;ndash; is retrieved and shown to the user, perhaps even combining the amount with the latest transaction, perhaps saved as a local cached object, with a caveat to the user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Distributed Realtime&lt;/strong&gt;&lt;br /&gt;At some point, the data becomes too large to fit inside a single processing session, and parallelism is used. In this case, either separate databases in SQL Azure or Windows Azure Tables, local data storage on the Web or Worker Role, or a combination of all with Caches is the right approach for the data design.&lt;/p&gt;
&lt;p&gt;The biggest implication in this type of system is speed &amp;ndash; a higher degree of data separation is essential, and so the dataset selection must fit the pattern. It is unacceptable to force an ACID-properties type workload into this environment. Typical examples here are the actual data asset payload for streaming video or music, read-only documents and so on. This pattern is often separated from the meta-data, which is kept in more of a transactional model.&lt;/p&gt;
&lt;p&gt;As an example, assume you log on to a website to watch a movie or listen to music. The provider needs to verify your identity and account balance, which are transactional data loads. After that process is complete, the workload shifts to a copy &amp;ndash; perhaps one of several &amp;ndash; of the asset to stream to your location.&lt;/p&gt;
&lt;p&gt;In this case, Windows Azure Blob storage, along with the Content Delivery Network (CDN &amp;ndash; a series of servers closer to the user) is employed along with the transactional realtime requirements for the metadata.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Distributed Eventual&lt;/strong&gt;&lt;br /&gt;At the furthest end of the data scale are large datasets that need deeper analysis, but not necessarily in realtime. Examples here are terrabytes of data requiring a Business Intelligence view, but with a tolerance of a few seconds to minutes or hours. In this case, Storage, Processing and Query methods, such as the Hadoop offering in Windows Azure, or perhaps the High Performance Computing (HPC) Windows Server in Windows Azure fit well.&amp;nbsp; Here, the design of the data is often dictated by the source, and more emphasis is placed on the algorithms around processing and re-assembling the data.&lt;/p&gt;
&lt;p&gt;There are, of course, other patterns. In many cases a single dataset may have needs in one or more of these categories &amp;ndash; in fact, sitting at 30,000 feet typing this entry, I&amp;rsquo;m having that very design discussion with a gentleman sitting next to me. The key is to design data-first, and fit the technology to the requirement for each datum. Allow each function and engine to handle the data in the most efficient, effective way for cost, performance and utility.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41744" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Data/default.aspx">Data</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category></item><item><title>Application Lifecycle Management Overview for Windows Azure</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/02/07/application-lifecycle-management-overview-for-windows-azure.aspx</link><pubDate>Tue, 07 Feb 2012 14:58:39 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41593</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/41593.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=41593</wfw:commentRss><description>&lt;p&gt;Developing in Windows Azure is at once not that much different from what you’re familiar with in on-premises systems, and different in significant ways. Because of these differences, developers often ask about the specific process to develop and deploy a Windows Azure application - more formally called an Application Lifecycle Management, or ALM. &lt;/p&gt;  &lt;p&gt;There are specific resources you can use to learn more about various parts of ALM - I’ve referenced those at the end of this post. But ALM has multiple definitions, from the governance of code injection, domain upgrade, testing, process flow and more. Many developers are interested in the finer-grained information, like how do I develop and deploy an application? What tools do I need, and how do I get the code running somewhere that I can test? &lt;/p&gt;  &lt;p&gt;I’ll cover the very high-level process here, and refer you to specifics at the end of each section, so that you can take it all in at one viewing, and then bookmark for more detail when you need more information. I won’t be covering processes like Continuous Integration or Agile and other methodologies in this post - I’ll blog those later. &lt;/p&gt;  &lt;h2&gt;Initial Development&lt;/h2&gt;  &lt;p&gt;You start with writing code. You have three ways to do this. You can use Visual Studio (even the Express Edition Works), Eclipse, or by &lt;a href="https://www.ibm.com/developerworks/webservices/library/ws-restful/" target="_blank"&gt;leveraging the REST API format&lt;/a&gt;. You can do this in a standalone (non-connected) environment like your laptop. &lt;/p&gt;  &lt;p align="left"&gt;Using Visual Studio is one of the simplest methods to create an Azure application, allowing you to combine the Azure components you want to leverage (Storage, Compute, SQL Azure, the Service Bus, etc.) along with the on-premises code you have now or are creating. Once you’ve installed and patched Visual Studio, just download and install the Windows Azure Software Development Kit (SDK) and you’ll have not only all the API’s you need to talk to Azure, but a fully functioning local environment to run and test your code before you deploy it. You’ll also get a robust set of samples. You can download what you need for all of that (free) here: &lt;a href="http://www.windowsazure.com/en-us/develop/downloads/"&gt;http://www.windowsazure.com/en-us/develop/downloads/&lt;/a&gt; . There’s a step-by-step process here: &lt;a href="http://msdn.microsoft.com/en-us/magazine/ee336122.aspx"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://msdn.microsoft.com/en-us/magazine/ee336122.aspx&lt;/font&gt;&lt;/u&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also use Eclipse to develop for Windows Azure. You won’t get the full runtime environment in just that kit alone, but you can use this successfully on a Linux system. I have several folks using this method. The downloads and documentation for that is here: &lt;a href="http://www.windowsazure4e.org/"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://www.windowsazure4e.org/&lt;/font&gt;&lt;/u&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can use REST API’s to hit Azure Assets and control them. Not my preferred method, but possible. There are REST API’s for various sections of Azure. You can find the main reference for that here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ff800682.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ff800682.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#9bbb59"&gt;&lt;font color="#c0504d"&gt;&lt;strong&gt;&lt;em&gt;Note: &lt;/em&gt;&lt;/strong&gt;We recently demonstrated using a Cloud-based Integrated Development Environment (IDE) for Node.js deployment to Windows Azure. More on that here:&lt;/font&gt; &lt;/font&gt;&lt;a href="http://www.readwriteweb.com/cloud/2012/01/cloud9-ide-to-enable-nodejs-ap.php"&gt;&lt;u&gt;&lt;font color="#0066cc"&gt;http://www.readwriteweb.com/cloud/2012/01/cloud9-ide-to-enable-nodejs-ap.php&lt;/font&gt;&lt;/u&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Deploying to a Test Instance&lt;/h2&gt;  &lt;p&gt;After you write the code, you’ll need to test it somewhere. The Azure Emulator on your development laptop is for a single user on that laptop, and it also has some subtle differences from the production fabric as you might imagine. Normally you’ll set up a small subscription to run and test the application, just like you would have a set of test servers. Each subscription has its own management keys and certificates, so this assists in keeping the testing environment separate for billing and control. &lt;/p&gt;  &lt;p&gt;More on that general information here: &lt;a href="http://msdn.microsoft.com/en-us/library/ff803362.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff803362.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Deploying to Production&lt;/h2&gt;  &lt;p&gt;Once you have developed the code and tested it, you need to move it to a location where users can access it. In reality, there is no physical difference in the type of machines, fabric or any other component in “Production” Windows Azure accounts and the “Test” accounts, but you’ll most often pick smaller systems to deploy on in testing, and you’ll probably keep the URL in the plain format.&lt;/p&gt;  &lt;p&gt;In the Production Windows Azure account, the team normally limits the access to the account for deployment to a separate set of developers. This ensures code flow and control. A DNS name is normally mapped to the longer, Microsoft-generated URL so that your users access the application or data the way you want them to. &lt;/p&gt;  &lt;p&gt;More on setting up an account here: &lt;a href="http://techinch.com/2010/06/14/setup-your-windows-azure-account/"&gt;http://techinch.com/2010/06/14/setup-your-windows-azure-account/&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Managing Code Change&lt;/h2&gt;  &lt;p&gt;With the application deployed, there are two broad tasks you need to consider. One is managing changes through the application, and the other involves management, monitoring and performance tuning for an application.&lt;/p&gt;  &lt;p&gt;To make a code change, the standard ALM process is followed, just as above. You can use command-line tools to automate the process as you would with an on-premises system. A vide on that shows you how: &lt;a href="http://www.microsoftpdc.com/2009/SVC25"&gt;http://www.microsoftpdc.com/2009/SVC25&lt;/a&gt;. Normally this is used with an “In-Place” upgrade into Production Account, since your testing is completed in a separate account. More on that process here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee517255.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ee517255.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One difference is the “VIP Swap” process you can use for the final push to Production. In essence, this allows you to have two copies of the application running on the Production account, with a quick way to cut over and back when you’re ready. The process for that is detailed here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee517253.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ee517253.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For monitoring, you have several options. You should enable the Windows Azure Diagnostics in your code - more on that here: &lt;a href="http://archive.msdn.microsoft.com/WADiagnostics"&gt;http://archive.msdn.microsoft.com/WADiagnostics&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;You can observe uptime and other information on the Windows Azure Service Dashboard, where you can also consume the uptime as an RSS feed: &lt;a href="http://www.windowsazure.com/en-us/support/service-dashboard/"&gt;http://www.windowsazure.com/en-us/support/service-dashboard/&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;From there, you can also use System Center to monitor not only Windows Azure deployments but internal applications as well. The Management Pack and documentation for that is here: &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11324"&gt;http://www.microsoft.com/download/en/details.aspx?id=11324&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;There are also 3rd-party tools to manage Windows Azure. More on that here: &lt;a href="http://www.bing.com/search?q=monitor+Windows+Azure&amp;amp;form=OSDSRC"&gt;http://www.bing.com/search?q=monitor+Windows+Azure&amp;amp;form=OSDSRC&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Other References: &lt;/h3&gt;  &lt;p&gt;There is a lot more detail in this official reference: &lt;a href="https://www.windowsazure.com/en-us/develop/net/fundamentals/deploying-applications/"&gt;https://www.windowsazure.com/en-us/develop/net/fundamentals/deploying-applications/&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Bryan Group explains the ramifications of the Secure Development Lifecycle (SDL) with lots of collateral you can review: &lt;a href="http://blogs.msdn.com/b/bryang/archive/2011/04/26/applying-the-sdl-to-windows-azure.aspx"&gt;http://blogs.msdn.com/b/bryang/archive/2011/04/26/applying-the-sdl-to-windows-azure.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41593" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Process/default.aspx">Process</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Links/default.aspx">Links</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/System+Center+Operations+Manager/default.aspx">System Center Operations Manager</category></item><item><title>Bug-Out Bags and Cloud Architecture Considerations</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/01/20/bug-out-bags-and-cloud-architecture-considerations.aspx</link><pubDate>Fri, 20 Jan 2012 17:00:58 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41196</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/41196.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=41196</wfw:commentRss><description>&lt;p&gt;I served in the U.S. Military for a while, and as part of my training we had to maintain a “Bug-Out Bag”, which was a large duffle-bag full of certain items that we could live on/fight with in an emergency. I’ve carried the spirit of that idea forward with me into civilian life, in Florida and especially here in the Pacific Northwest.&lt;/p&gt;  &lt;p&gt;In Florida we dealt with the threat of hurricanes - I went through four of those in one year that hit my area. You’re without power, it floods quickly, and it gets wicked hot. You roof might be gone, whatever. Here in the Pacific Northwest, I live near one of the largest volcano's in the world, we have flooding, and recently we were hit with an ice-storm. Now I’ve lived all over the world, from Alaska to North Dakota and &lt;a href="http://en.wikipedia.org/wiki/Shemya" target="_blank"&gt;even near the Kamchatka Peninsula in Russia&lt;/a&gt;, and I can handle the snow. But ice - that’s a toughie no matter where you live. We had so much that it split my little pine tree in front of the house in half. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/8168.P1030729.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="P1030729" border="0" alt="P1030729" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/6180.P1030729_5F00_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/5428.P1030728.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="P1030728" border="0" alt="P1030728" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/7178.P1030728_5F00_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We lost power - although I think the folks at Puget Sound Energy did an amazing job at getting us back up in less than 24 hours, but we weren’t worried anyway. That bug-out bag mentality carried forward to a “second pantry” we keep in the garage. &lt;/p&gt;  &lt;p&gt;We have a large plastic box (that will fit in the back of the Subaru) with dried goods like pasta, and canned goods and even a little cook stove. We have 25 gallons of clean water in Jerry-Cans. We have batteries, candles and matches. And we have flashlights around every door. We use supplies from the “pantry” to fill our house pantry, and then refill the emergency one from the grocery store. That way everything is fresh, rotated, and we can “bug-out” here at home or on the road. &lt;/p&gt;  &lt;p&gt;So what does this have to do with Distributed Computing Architectures?&lt;/p&gt;  &lt;p&gt;&lt;em&gt;It’s the thought process&lt;/em&gt;. In both the military and civilian life, I’ve done a few things:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Sat down and thought carefully about exactly what I need. Did I include a can-opener? A small shovel to dig out of whatever I got stuck in? Then I weed out what I *really* don’t need.&lt;/li&gt;    &lt;li&gt;Put those things into a small, manageable container. &lt;/li&gt;    &lt;li&gt;Tried them - even when (especially when) I didn’t have an emergency&lt;/li&gt;    &lt;li&gt;Tweaked the process to see what I could do better.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Have you done this when you moved an app to the “cloud”? Each of these has a computing parallel - do you know what you would do if you couldn’t access the Distributed Computing Environment?&lt;/p&gt;  &lt;p&gt;I’ve found these thoughts are actually a great place to start - keeps the process simplified from the start, and gives you a sense of assurance when you’re asked if you can recover from an emergency. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41196" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category></item><item><title>Windows Azure Best Practices: Affinity Groups</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/11/28/windows-and-sql-azure-best-practices-affinity-groups.aspx</link><pubDate>Tue, 29 Nov 2011 04:43:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40041</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/40041.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=40041</wfw:commentRss><description>&lt;p&gt;When you create a Windows Azure application, you&amp;rsquo;ll pick a subscription to put it under. This is a billing container - underneath that, you&amp;rsquo;ll deploy a Hosted Service. That holds the Web and Worker Roles that you&amp;rsquo;ll deploy for your applications. Along side that, you use the Storage Account to create storage for the application. (In some cases, you might choose to use only storage or Roles - the info here applies anyway)&lt;/p&gt;
&lt;p&gt;As you are setting up your environment, you&amp;rsquo;re asked to pick a &amp;ldquo;region&amp;rdquo; where your application will run.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/1258.Affinity_5F00_2.png"&gt;&lt;img style="background-image:none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border-width:0px;" title="Affinity" border="0" alt="Affinity" src="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/0763.Affinity_5F00_thumb.png" width="244" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you choose a Region, you&amp;rsquo;ll be asked where to put the Roles. You&amp;rsquo;re given choices like Asia, North America and so on. This is where the hardware that physically runs your code lives. We have lots of fault domains, power considerations and so on to keep that set of datacenters running, but keep in mind that this is where the application lives.&lt;/p&gt;
&lt;p&gt;You also get this selection for Storage Accounts. When you make new storage, it&amp;rsquo;s a best practice to put it where your computing is. This makes the shortest path from the code to the data, and then back out to the user.&lt;/p&gt;
&lt;p&gt;One of the selections for the location is &amp;ldquo;Anywhere U.S.&amp;rdquo;. This selection might be interpreted to mean that we will bias towards keeping the data and the code together, but that may not be the case. There is a specific abstraction we created for just that purpose: Affinity Groups.&lt;/p&gt;
&lt;p&gt;An Affinity Group is simply a name you can use to tie together resources. You can do this in two places - when you&amp;rsquo;re creating the Hosted Service (shown above) and on it&amp;rsquo;s own tree item on the left, called &amp;ldquo;Affinity Groups&amp;rdquo;. When you select either of those actions, You&amp;rsquo;re presented with a dialog box that allows you to specify a name, and then the Region that&amp;nbsp; names ties the resources to. Choose a specific region - not one of the "Anywhere" choices.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/8512.Affinity2_5F00_2.png"&gt;&lt;img style="background-image:none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;border-width:0px;" title="Affinity2" border="0" alt="Affinity2" src="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/3324.Affinity2_5F00_thumb.png" width="244" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now you can select that Affinity Group just as if it were a Region, and your code and data will stay together. That helps with keeping the performance high.&lt;/p&gt;
&lt;p&gt;Official Documentation: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh531560.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/hh531560.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=40041" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>Rip and Replace or Extend and Embrace?</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/09/13/rip-and-replace-or-extend-and-embrace.aspx</link><pubDate>Tue, 13 Sep 2011 11:20:05 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38437</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/38437.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=38437</wfw:commentRss><description>&lt;p&gt;As most of you know, I don&amp;rsquo;t like the term &amp;ldquo;cloud&amp;rdquo; very&lt;br /&gt;much. It isn&amp;rsquo;t defined, which means it can be anything. I prefer &amp;ldquo;distributed&lt;br /&gt;computing&amp;rdquo;, which is more technically accurate and describes what you&amp;rsquo;re doing&lt;br /&gt;in more concrete terms.&lt;/p&gt;
&lt;p&gt;So when you think about Windows and SQL Azure, you don&amp;rsquo;t&lt;br /&gt;have to think about an entire product &amp;ndash; you can use parts of the system&lt;br /&gt;together or independently to accomplish what you need to do. You can use the&lt;br /&gt;computing functions, storage, and more and more I see folks leverage the&lt;br /&gt;Service Bus to enable current applications to expose things to the web.&lt;/p&gt;
&lt;p&gt;And that brings up the point of this post. Once you decide&lt;br /&gt;that a distributed architecture works to solve a problem, you&amp;rsquo;re faced with a&lt;br /&gt;decision: should you completely re-write your architecture to take advantage of&lt;br /&gt;the current systems or should you just fold in new code that makes the data or&lt;br /&gt;function available to the web?&lt;/p&gt;
&lt;p&gt;Of course, the answer is always &amp;ldquo;it depends&amp;rdquo; on the situation&lt;br /&gt;&amp;ndash; and it does. But unless you&amp;rsquo;re fixing a problem with current code, I usually&lt;br /&gt;advocate a migration approach. That means at the very least retaining the&lt;br /&gt;business logic (again, unless it&amp;rsquo;s not currently working) and as much of the&lt;br /&gt;code as you can. In fact, if you follow this paradigm, you&amp;rsquo;re on your way to&lt;br /&gt;making a Service Bus out of the functions you currently have. You can expose&lt;br /&gt;the results of a system rather than opening the system up. Let&amp;rsquo;s take an&lt;br /&gt;example.&lt;/p&gt;
&lt;p&gt;Assume for a moment that you have an order-taking system&lt;br /&gt;on-premise. That system performs many functions, one of which might creating a&lt;br /&gt;Purchase Order. Your system might be enclosed, meaning that it has an&lt;br /&gt;application that talks to a middle-tier, and then from there to a database&lt;br /&gt;system. A query is generated from a screen, and passed along to eventually&lt;br /&gt;compute, store and return a Purchase Order Number, along with other&lt;br /&gt;information. Imagine now that you wire up the code not only to return the PO&lt;br /&gt;number to the client, but to make that number available on an endpoint &amp;ndash;&lt;br /&gt;actually really not that hard to do.&lt;/p&gt;
&lt;p&gt;Now you can make that PO number available to the web using&lt;br /&gt;Azure. You could restrict who can make that call to the system, or open it up&lt;br /&gt;to a broader audience. Or instead of the PO Number, you could make a product&lt;br /&gt;list available. And you can go further than that &amp;ndash; EBay, for instance, uses the&lt;br /&gt;OData protocol (which is very cool in and of itself) which you can query from&lt;br /&gt;the web. You could compare your company&amp;rsquo;s product catalog to what is on EBay,&lt;br /&gt;and list the items you have there if there are no competitors in that space.&lt;br /&gt;And on and on it goes.&lt;/p&gt;
&lt;p&gt;So the point is this &amp;ndash; where you can, retain what works.&lt;br /&gt;Fold in systems like Azure where they make sense. Extend and Embrace.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=38437" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Computing/default.aspx">Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Data/default.aspx">Data</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Architecture/default.aspx">Application Architecture</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Application+Fabric/default.aspx">Application Fabric</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure+Use+Cases/default.aspx">Azure Use Cases</category></item><item><title>Plan for Diagnostics in Cloud Computing From the Git-Go</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/09/06/plan-for-diagnostics-in-cloud-computing-from-the-git-go.aspx</link><pubDate>Tue, 06 Sep 2011 13:11:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38295</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/38295.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=38295</wfw:commentRss><description>&lt;p&gt;“Git-Go” is something we say in the South that means “right at the start”. I’ve seen several applications for on-premise systems that don’t have much in the way of diagnostics - the developers rely on a debugger, the event logs on the server and client workstation, and most of all, the ability to watch the system from end-to-end. &lt;/p&gt;  &lt;p&gt;This approach is a mistake for an on-premise system, and it’s definitely a problem for a distributed architecture. You simply do not own all of the components from end to end in a cloud environment, nor are you always able to attach a debugger or other remote monitoring tools to the various areas within the code path. So you need to make sure that from the very outset of your design that you build in diagnostics. My personal preference is to build a system such that a control file turns on deeper information gathering from the system, up to a minimal level.&lt;/p&gt;  &lt;p&gt;When I do that, I set a high level of logging, a medium level, and a moderate level. I normally use the deepest level of information during the testing and acceptance phase of the deployment, then switch to moderate and then the least level of information gathering. Also in my design I often set an error condition to begin gathering the deeper information along with the exception, where possible.&lt;/p&gt;  &lt;p&gt;There are decisions you need to make as to where to store the diagnostics (many operations in the cloud cost money), how often you collect them, and so on. You can get a quick overview on using the diagnostics that come with Windows Azure here: &lt;a href="http://www.azuresupport.com/2010/03/getting-started-with-windows-azure-diagnostics-and-monitoring/"&gt;http://www.azuresupport.com/2010/03/getting-started-with-windows-azure-diagnostics-and-monitoring/&lt;/a&gt; This is where you should start first. More detail on that: &lt;a href="http://msdn.microsoft.com/en-us/library/gg433048.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg433048.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;My friend Dave Pallman has a great tool he’s released for free: &lt;a href="http://davidpallmann.blogspot.com/2009/03/azure-application-monitor-now-on.html"&gt;http://davidpallmann.blogspot.com/2009/03/azure-application-monitor-now-on.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the issue is in storage apps: &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83"&gt;http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you have System Center, this is the quickest and easiest way to implement the monitoring – really handy: &lt;a href="http://pinpoint.microsoft.com/en-us/applications/windows-azure-application-monitoring-management-pack-release-candidate-12884907699"&gt;http://pinpoint.microsoft.com/en-us/applications/windows-azure-application-monitoring-management-pack-release-candidate-12884907699&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=38295" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Error+Codes/default.aspx">Error Codes</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Link+Lists/default.aspx">Link Lists</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Monitoring/default.aspx">Monitoring</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category></item><item><title>Should All Data Be Encrypted By Default?</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/08/09/should-all-data-be-encrypted-by-default.aspx</link><pubDate>Tue, 09 Aug 2011 13:45:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37638</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/37638.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=37638</wfw:commentRss><description>&lt;p&gt;Recently several IT industry information outlets have reported that there has been a 10-year concentrated, organized effort on breaking through computer security at some of the largest companies in the world. Government sites have also been attacked in multiple countries. Add to this the regular loss of data by banking and other industries, and the fear of “the cloud” as a storage location, and it seems to beg the question asked in the title in this post: “should all data, everywhere, be encrypted by default?” &lt;/p&gt;  &lt;p&gt;If you’re new to encryption, there’s an excellent video and overview here: &lt;a href="http://blogs.msdn.com/b/plankytronixx/archive/2010/10/23/crypto-primer-understanding-encryption-public-private-key-signatures-and-certificates.aspx"&gt;http://blogs.msdn.com/b/plankytronixx/archive/2010/10/23/crypto-primer-understanding-encryption-public-private-key-signatures-and-certificates.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If all data were encrypted, the break-in to websites would still continue, but the value would be lessened for some types of “orthogonal” attacks that only seek the pure stream of data. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Data States&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Computing has two major components - static program elements and data. The program doesn’t change (until it is updated, of course) over the course of a transaction between a user and the ultimate data store. Data is classified as anything that is manipulated by the program. That implies three states of the data interchange: Creation, Transmission, and Storage. In on-premise systems, many times none of these states are encrypted. The entire system from user to data store is viewed as “secure”, which of course evidence has proved it is not. In some cases, even laptops are viewed as part of an on-premise system, and so is left unprotected. If all data were treated as “publicly viewable”, that mindset would lead to encrypting the data at all states, even for on-premise systems.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Creation&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In this phase, a user, device or other input program creates data to send to the program. This can be entries on a web form, input from a weather sensor, or one service (program) sending information to another service. There are multiple ways to encrypt data at this state, most notably using client-side libraries such as the Windows Crypto API, hardware encryption and others. The reference for the Crypto API is here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms867086.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms867086.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Transmission&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;After the data is created, it needs to be transmitted to the processing and storage system. the references above explain how to secure the communications channel between the client systems and the various components used within the system. In the case of Windows Azure, the session can be protected with a secure session, and all communications within the Azure datacenters are encrypted. The key is that the transmission of data, regardless of method, should be considered to be “in the clear”, and treated as such. Without the decryption algorithm, it’s much harder to get to the ultimate goal. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Storage (data at rest) &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;It follows that f the data is encrypted at the source, and the decryption method is retained only with the code that processes the data, then the data “at rest” if obtained is less accessible. If the data is not encrypted at the source, then this step should be put into place at a minimum. In many cloud systems, including Windows and SQL Azure, the data is not encrypted at rest. There are various reasons for this, including performance, physical and logical security already in place, and the fact that the encryption process would expose customer data to the provider while it is being encrypted. In this case, the key is to encrypt the data before it is transmitted and stored, so that it is encrypted ahead of time. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Considerations&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Encrypting data is a separate process, and must be factored into the original codebase. This means additional effort, and more CPU power for the encryption process (although many systems have security hardware included which help with this) and of course protecting the keys. If the keys are accessed, the data is considered unencrypted from then on, and all previous encryption with that particular key is now vulnerable. Key rotation and protection is essential. Even so, the benefits of treating all data as being at risk outweighs the efforts.&lt;/p&gt;  &lt;p&gt;You can learn more about general encryption here: &lt;a href="http://msdn.microsoft.com/en-us/library/aa380255(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa380255(VS.85).aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37638" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Data/default.aspx">Data</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Encryption/default.aspx">Encryption</category></item></channel></rss>