<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>bartr in the cloud</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/bartr/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/bartr/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 04:46:04 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>I'm back ...</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/im-back</link>
      <pubDate>Sat, 29 Nov 2014 14:16:27 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2014/11/29/im-back/</guid>
      <description><![CDATA[I just celebrated my second week back at Microsoft after having spent the last couple of years in...]]></description>
      <content:encoded><![CDATA[<p>I just celebrated my second week back at Microsoft after having spent the last couple of years in the startup world.&nbsp; My new gig is as a Cloud Solutions Architect on the SaaS 150 team.&nbsp; We are&nbsp;tasked with&nbsp;helping key ISVs in the US transform their business and products to take advantage of Azure services.&nbsp; I am fortunate to have a great team, most of whom I've worked with previously at Microsoft and I can't wait to get deeply engaged with some ISVs.</p>
<p>I realize this post is pretty useless, but it seemed kind of weird to start posting again after 3 years without some sort of segue ...</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Another Availability Story</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/another-availability-story</link>
      <pubDate>Sat, 31 Dec 2011 09:16:01 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/12/31/another-availability-story/</guid>
      <description><![CDATA[In our recently&nbsp;updated case study - https://aka.ms/sxp, we write about our great experiences...]]></description>
      <content:encoded><![CDATA[<p>In our recently&nbsp;updated case study - <a href="https://aka.ms/sxp">https://aka.ms/sxp</a>, we write about our great experiences with Windows Azure deployments and how confident we are in our ability to deploy updates quickly with no impact to our customers.&nbsp; Since our services are powering parts of Microsoft.com and are receiving millions of requests per day, any downtime is highly visible.&nbsp; In our case study, we write:</p>
<p style="margin-bottom: 0pt;" class="iTS-H3"><span style="color: #0000ff;"><strong>Availability</strong></span><o:p></o:p></p>
<p style="margin-bottom: 3pt;" class="iTS-BodyText"><span style="color: #0000ff;">With Windows Azure, SXP service releases are literally push-button activities with zero planned downtime. The SXP team uses the Virtual IP (VIP) Swap feature on the Windows Azure Platform Management Portal to promote its staging environment to a production environment. Service releases have occurred approximately every six weeks since SXP launched in April 2010. The process on Windows Azure is so refined and so simple that the team no longer accounts for service releases when anticipating events that may cause downtime ...</span></p>
<p style="margin-bottom: 3pt;" class="iTS-BodyText">We put this theory to the test earlier this week.&nbsp; Most of our engineering and operations team were on vacation for the holidays when the recent ASP.NET security advisory was published - <a href="https://technet.microsoft.com/en-us/security/advisory/2659883">https://technet.microsoft.com/en-us/security/advisory/2659883</a>&nbsp; This seemed like a pretty significant issue but fortunately had a straight forward work-around that we chose to implement.&nbsp; Engineering made the code changes, built the packages, and ran our test suite against the new services.</p>
<p style="margin-bottom: 3pt;" class="iTS-BodyText">Operations was able to patch 3 services in 16 minutes without missing a single request.&nbsp; This is another data point in the ease of running services on Windows Azure and one more reason we prefer to deploy on Windows Azure whenever possible.</p>
<p style="margin-bottom: 3pt;" class="iTS-BodyText">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure Case Study</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/windows-azure-case-study</link>
      <pubDate>Mon, 26 Dec 2011 09:05:08 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/12/26/windows-azure-case-study/</guid>
      <description><![CDATA[We just published an updated case study at:&nbsp; https://aka.ms/sxp
Using Windows Azure to Build...]]></description>
      <content:encoded><![CDATA[<p>We just published an updated case study at:&nbsp; <a href="https://aka.ms/sxp">https://aka.ms/sxp</a></p>
<div class="title"><span style="font-size: large;"><em><strong>Using Windows Azure to Build and Expand Microsoft.com Social Media Capabilities</strong></em></span></div>
<div>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">The Social eXperience Platform (SXP), which is powered by Windows Azure&reg; and SQL Azure&reg;, has been providing Microsoft.com with social media features for over eighteen months. The Windows Azure platform has enabled SXP to grow and expand its capabilities on Microsoft.com by delivering performance, scalability, elasticity, and remarkable return on investment (ROI).</span></p>
</div>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Cloud Elasticity - A Real-World Example</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/cloud-elasticity-a-real-world-example</link>
      <pubDate>Tue, 03 May 2011 19:44:00 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/05/03/cloud-elasticity-a-real-world-example/</guid>
      <description><![CDATA[Windows Azure is the cloud-based development platform that lets you build and run applications in...]]></description>
      <content:encoded><![CDATA[<p><a href="https://www.microsoft.com/en-us/cloud/developer/resource.aspx?resourceId=what-is-windows-azure">Windows Azure</a> is the cloud-based development platform that lets you build and run applications in the cloud, launch them in minutes instead of months and code in multiple languages or technologies including .NET, PHP, and Java.&nbsp; </p>
<p>One of the promises of Windows Azure and cloud computing in general is elasticity.&nbsp; The ability to quickly and easily expand and contract computing resources based on demand.&nbsp; A common example is that of retailers during the holiday season.&nbsp; There is a huge spike of activity beginning on &ldquo;Black Friday&rdquo; and, traditionally, a lot of money is spent preparing for the peak load.</p>
<p>Social eXperience Platform (<a href="https://technet.microsoft.com/en-us/edge/microsoft-it-developing-applications-with-microsoft-azure.aspx">SXP</a>) is a multi-tenant web service that powers community and conversations for many sites on <a href="https://www.microsoft.com/">microsoft.com</a>.&nbsp; A great example of one of our tenants is the <a href="https://www.microsoft.com/en-us/cloud/cloudconversations.aspx">Cloud Power</a> web site.&nbsp; SXP is responsible for providing the conversation content on the site while the remainder of the site is served from the standard microsoft.com infrastructure.&nbsp; When the Cloud Power&nbsp;site sees an increase in traffic, SXP also sees an increase in traffic, which is exactly what happened in April.</p>
<p>In this case, the web traffic spikes were due to ads, which typically ran for a day or two.&nbsp; Compared to March&rsquo;s average daily traffic (represented by the 100% bar), SXP&rsquo;s traffic spiked to over 700%.&nbsp; Here&rsquo;s a graph that shows 72 hours of traffic while an ad campaign was active.&nbsp; The blue area is normal traffic and the red area is the additional traffic generated by the ads.&nbsp; Since the ad was targeted to the US, there is a heavy US business hour bias to the traffic on both the soft launch as well as the full run.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/57/21/2287.sxpElasticityGraph.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-57-21/2287.sxpElasticityGraph.jpg"><img height="217" width="483" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/57/21/2287.sxpElasticityGraph.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-57-21/2287.sxpElasticityGraph.jpg" border="0" /></a></p>
<p>There are lots of examples of traffic spikes like this taking web sites down or causing such slow response that they appear to be down.&nbsp; Traditionally, the only way to handle such&nbsp;spikes was to over-purchase capacity.&nbsp; The majority of the time, the capacity isn't needed, so it sits mostly idle, consuming electricity and generating cooling costs.&nbsp; Windows Azure has a&nbsp;better approach.</p>
<p>The engineering team had a discussion with our business partners and learned that due to a couple of ad buys, SXP would see increased traffic on several days in April.&nbsp; In advance of the ads running, we worked with&nbsp;the Microsoft.com operations team and decided to double our Windows Azure compute capacity to ensure that we could handle the load.</p>
<p>This is where Windows Azure really made things easy.&nbsp; We went from&nbsp;3 servers to 6 servers&nbsp;on our web tier within an hour of making the decision.&nbsp; The total human time to accomplish this was a couple of minutes.&nbsp; Our Ops lead changed one value in an XML file and Windows Azure took care of the rest.&nbsp; Within half an hour, we validated via the logs that we had doubled our capacity and all web servers were taking traffic.</p>
<p>We didn&rsquo;t have to allocate servers or VMs.&nbsp; We didn&rsquo;t have to install and patch an OS.&nbsp; We didn&rsquo;t have to install our application.&nbsp; We didn&rsquo;t have to run penetration tests.&nbsp; We didn&rsquo;t have to reconfigure the firewall or the load balancer.&nbsp; All we did is modify a value in an XML file.&nbsp; Since Windows Azure provides a REST API as well as Power Shell scripts, automating this process is straight forward.&nbsp;</p>
<p>We monitored SXP closely during our first spike and determined that we didn&rsquo;t need the additional capacity, so we turned the additional instances off.&nbsp; Again, this took a couple of minutes to modify the XML file and about a half hour to take effect.</p>
<p>Our total, full-retail cost for the burst capacity was $70 plus about 5 minutes of operations time.&nbsp; </p>
<p>Compared to the traditional models, Windows Azure made the process very fast and very simple.&nbsp; Windows Azure compute has a minimum time commitment of one hour, so complex systems can burst their capacity multiple times per day if needed.&nbsp; This is a very different model than traditional charge-back models for servers or VMs where you often get billed for a month or longer even though you don&rsquo;t need the capacity.&nbsp; </p>
<p>If you have the need for elasticity, Windows Azure offers a compelling solution at a very reasonable price point.</p>
<p><a href="https://www.microsoft.com/windowsazure/"><img src="https://www.microsoft.com/global/windowsazure/PublishingImages/powered-by-windows-azure.png" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>One Million Requests Today!</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/one-million-requests-today</link>
      <pubDate>Mon, 11 Apr 2011 21:57:39 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/04/11/one-million-requests-today/</guid>
      <description><![CDATA[Today,&nbsp;April 11, SXP&nbsp;delivered 1,004,367 requests in a 24 hour period.&nbsp; Our first...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small;"><span style="font-family: Calibri;">Today,&nbsp;April 11, SXP&nbsp;delivered <span style="color: black;">1,004,367 requests in a 24 hour period.&nbsp; Our first Million Request Day!!!</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: black;">When we launched SXP just under a year ago, we had just under 25K requests per day.&nbsp; Less than a year later, our peak load has grown by 40X.&nbsp; Measured on an hourly basis, our peak load has grown 67X.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><span style="font-size: small;"><span style="font-family: Calibri;">SXP&nbsp;broke 500K transactions in a day for the first time on March 21, so we have doubled our peak load over the last 20 days while being 100% available for 19 consecutive days.&nbsp; <o:p></o:p></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><span style="font-size: small;"><span style="font-family: Calibri;">All performance numbers look good -&nbsp;our processor peaked at 20%, nothing queued, nothing hung&nbsp;-&nbsp;so we still have plenty of capacity for growth.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="color: black;"><span style="font-size: small;"><span style="font-family: Calibri;">The Windows Azure Platform continues to deliver great performance, availability, and value.</span></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SXP - One year later</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/sxp-one-year-later</link>
      <pubDate>Tue, 05 Apr 2011 13:47:00 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/04/05/sxp-one-year-later/</guid>
      <description><![CDATA[One year ago this month we launched our first Windows Azure platform-based web service, the Social...]]></description>
      <content:encoded><![CDATA[<p><img src="https://www.microsoft.com/global/windowsazure/PublishingImages/powered-by-windows-azure.png" id="pbwaLogo" /></p>
<p>One year ago this month we launched our first Windows Azure platform-based web service, the Social eXperience Platform (SXP). The Windows Azure Platform had just launched, so we were entering uncharted territory. Looking back over the last 12 months, it has been a great experience and the Windows Azure platform has allowed us to realize many of the promises of cloud computing.</p>
<p><strong>Scale<br /></strong>When we launched, we were serving about 10K requests per day. We are now averaging over 450K requests per day with a peak of 687K requests in a single day. More importantly, we have the capability to deliver at least 2M requests per day without having to increase the number of instances.</p>
<p><strong>Agility (part 1)<br /></strong>Windows Azure has made it easy to add functionality to SXP as the business has needed it. SXP has about 4X the lines of code today compared to version 1 which shipped just under a year ago. We have deployed 10 separate times in a year and haven&rsquo;t incurred any downtime (measured at the transaction level) during any of our upgrades. With the exception of some learning curve issues, all of our deployments have gone very smoothly, even smoother than most of our on-premise deployments. This has given us the confidence necessary to deliver quick updates for the business.</p>
<p><strong>Agility (part 2)<br /></strong>When we designed SXP, we designed it as a multi-tenant, cloud-based service. Our goal (hope!) was that other properties across Microsoft would adopt SXP. We like to talk about moving &ldquo;capabilities&rdquo; to the cloud in addition to moving applications to the cloud. SXP is an example of enabling capabilities via the cloud which enables other teams to build composite applications that leverage our service. We have grown from one tenant when we launched to over 35 tenants with over a dozen in the pipeline. Some of our tenants are using SXP in ways that we never dreamed about. The Windows Azure Platform has been a big enabler of this agility.</p>
<p><strong>Elasticity<br /></strong>As we&rsquo;ve on-boarded new partners, we&rsquo;ve had 3 separate instances where traffic &ldquo;doubled overnight&rdquo;. The Windows Azure Platform allowed us to scale up in anticipation of the increased traffic and to scale back days or even hours later. So far, we&rsquo;ve had the headroom to handle the increased load, but it&rsquo;s nice to know that we can very easily add and remove capacity as load increases. <br />With Windows Azure compute, we were able to double our web service tier capacity in a matter of minutes. Once we were confident we could handle the increased load with fewer web instances, we scaled back to the correct level. It only took minutes to scale back down and the full retail price of the additional capacity was under $100. Compare this to having to order servers or even provision VMs and the increased agility and decreased cost for the elasticity is dramatic.</p>
<p><strong>Performance<br /></strong>SXP&rsquo;s performance continues to be excellent, with average server response times below 100 ms. We have a separate service that monitors SXP from within the same data center. The service sends a synthetic transaction to SXP every 5 seconds and records the availability and performance of the service. Since we are within the same data center, there are no networking issues involved. Our average ping response for the year is just above 10 ms. <br />SXP is a global service, but there is some US business hour bias to our load. We notice a slight increase in ping response times during prime US business hours, but the average is still around 12 ms. While this is 20% longer, it is only a 2ms delta, which seems reasonable given the increased load.</p>
<p><strong>Availability<br /></strong>This has been one of the best surprises from our move to Azure. We measure availability at the transaction level and since going live, we have delivered over 4 9s of availability at 99.9957%. To put things in perspective, we&rsquo;ve had 2,543 errors out of 59M requests. Of those errors, 1,030 occurred during a 1 hour window and over half occurred during a 2 hour window. Neither of those two hours of major downtime were Azure-specific issues.<br />The Azure team really deserves a lot of kudos for this as Azure is a v1 product that only shipped a few weeks before we went live. They are solving some pretty tough problems, so I was willing to cut them some slack early on. Fortunately, they over-delivered. Now we&rsquo;re pushing them to help us deliver 5 and 6 9s availability.</p>
<p><strong>Cost<br /></strong>This has been another pleasant surprise. We have been able to significantly reduce our monthly hosting costs by moving to the Windows Azure platform. To be fair, it&rsquo;s not an exact apples-to-apples comparison, but, on the other hand, SXP delivers far more than our previous solution, so here are the details:<br />Previously, we used a 3rd party solution to provide comments and ratings for our Showcase site (<a href="https://www.microsoft.com/showcase">www.microsoft.com/showcase</a>). Since the solution had been customized for Showcase, our monthly hosting costs were $15K. Because of the customizations, we weren&rsquo;t able to [easily] leverage the solution across the other microsoft.com sites and also weren&rsquo;t able to upgrade to the latest version of the software, which drove our support costs up. Basically, we had an expensive application and we wanted a scalable platform. <br />SXP, our Windows Azure based solution provides increased functionality and we now have 35 sites (tenants) live. Because we were building a service for use across microsoft.com, we built a multi-tenant service from the ground up. This gave us a distinct operational advantage over the 3rd party solution as we are able to on-board new tenants in minutes rather than weeks. This also gives us a huge cost advantage as we&rsquo;re able to spread the operations costs across multiple tenants.<br />Our monthly cost for the entire SXP production system using full retail pricing is $1,473, which is a 90% savings over our on-premise solution. Using standard commitment based pricing, that cost drops to $924.19 per month. January through March, Showcase generated 32% of the SXP traffic. Allocating 32% of the costs to Showcase is $296, which is a 98% savings over our old solution. If we divide the cost by 35, each tenant&rsquo;s cost is $26.41 per month. We&rsquo;re confident we can drive the monthly per tenant operations cost below $20 and perhaps below $10 or even $5.<br />At the same time, we increased our availability and greatly increased our agility in responding to business needs. Here is our before and after picture:</p>
<p>&nbsp;</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/57/21/8875.SXP-Before-After.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-57-21/8875.SXP_2D00_Before_2D00_After.gif" border="0" /></p>
<p>While everything hasn&rsquo;t been perfect over our first year of operations, we are very pleased with our Windows Azure platform experience as evidenced by the fact that we are aggressively moving additional workloads to the platform.</p>]]></content:encoded>
    </item>
    <item>
      <title>SXP Video</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/sxp-video</link>
      <pubDate>Thu, 20 Jan 2011 18:26:51 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2011/01/20/sxp-video/</guid>
      <description><![CDATA[Abe Ray and I filmed a video late last year and it released recently as part of the Cloud series on...]]></description>
      <content:encoded><![CDATA[<p>Abe Ray and I filmed a video late last year and it released recently as part of the Cloud series on Microsoft IT Showcase - <a href="https://technet.microsoft.com/en-us/library/gg521165.aspx">https://technet.microsoft.com/en-us/library/gg521165.aspx</a>&nbsp; </p>
<p>Our video is here: <a href="https://technet.microsoft.com/en-us/library/gg575755.aspx">https://technet.microsoft.com/en-us/library/gg575755.aspx</a></p>
<p>We talk about the real-world lessons learned from running a high-volume web service on Windows Azure as part of Microsoft.com.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Q1 SXP Availability</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/q1-sxp-availability</link>
      <pubDate>Tue, 05 Oct 2010 11:25:00 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2010/10/05/q1-sxp-availability/</guid>
      <description><![CDATA[We implemented the Social eXperience Platform on Windows Azure and SQL Azure in April.&nbsp; We just...]]></description>
      <content:encoded><![CDATA[<p>We implemented the <a href="https://technet.microsoft.com/en-us/library/ff973966.aspx" title="Social eXperience Platform">Social eXperience Platform</a> on Windows Azure and SQL Azure in April.&nbsp; We just published our Q1 (fiscal year begins July 1)&nbsp;availability numbers and I think they show how amazing the Azure platform is.</p>
<p>Our application is a stateless, RESTful&nbsp;web service&nbsp;that is used by several Microsoft.com web properties.&nbsp; In designing the service, we chose not to cache any data so each request is a round trip to one or more SQL Azure databases.&nbsp; We measure uptime at the transaction level, so if the web server or SQL Azure database is unavailable, we report that as an error.</p>
<p>In Q1, we served 7.76M requests with an&nbsp;availability of 99.995%.&nbsp; Our September availability was 5 9s.</p>
<p>Again, we chose not to write any special code to improve uptime.&nbsp; This is generic IIS / ADO.NET code (with the SQL Retry logic from <a href="https://blogs.msdn.com/b/bartr/archive/2010/06/20/sql-azure-retry-code-update.aspx" title="here">here</a>).</p>
<p>I find it amazing that a general purpose platform can deliver these kinds of results at commodity pricing levels.&nbsp; To achieve over 3 9s availability is generally very expensive and often requires some coding changes to achieve.&nbsp; Windows Azure and SQL Azure make it easy.</p>
<p>We are releasing a new version of SXP in the next couple of weeks with some cool new features and are already planning version 3 which moves even more capabilities to Azure.&nbsp;&nbsp;SXP is&nbsp;in.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Case Study</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/azure-case-study</link>
      <pubDate>Sun, 03 Oct 2010 15:14:12 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2010/10/03/azure-case-study/</guid>
      <description><![CDATA[We recently published a Windows Azure / SQL Azure case study on Microsoft IT Showcase.&nbsp; This is...]]></description>
      <content:encoded><![CDATA[<p>We recently published a Windows Azure / SQL Azure case study on Microsoft IT Showcase.&nbsp; This is based on the work we have done on the Social eXperience Platform.</p>
<p>Case study is here: <a href="https://technet.microsoft.com/en-us/library/ff973966.aspx">https://technet.microsoft.com/en-us/library/ff973966.aspx</a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Azure Connection Retry Update</title>
      <link>https://docs.microsoft.com/archive/blogs/bartr/sql-azure-connection-retry-update</link>
      <pubDate>Sun, 20 Jun 2010 12:24:00 GMT</pubDate>
      <dc:creator><![CDATA[bartr]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bartr/2010/06/20/sql-azure-connection-retry-update/</guid>
      <description><![CDATA[Based on several e-mail conversations, I've updated the retry code slightly and made a couple of...]]></description>
      <content:encoded><![CDATA[<p>Based on several e-mail conversations, I've updated the retry code slightly and made a couple of improvements.&nbsp; The code in the original <a href="https://blogs.msdn.com/b/bartr/archive/2010/06/18/sql-azure-connection-retry.aspx">post</a> is updated and it's also included in this post for RSS purposes.&nbsp; We haven't deployed this version to production yet, so I don't have any real-world results to report.</p>
<p><span style="font-size: small;"><strong><span style="color: #808080;">Changes</span></strong><br /></span>The first change I made was to do my math correctly in the sleep computation ...</p>
<p>The&nbsp;second change I made was to add a <span style="color: #008080;">SqlConnection</span>.ClearPool(conn); call to the retry exception handler.&nbsp; This should ensure that the other connections in the pool don't have to retry.&nbsp; We tend to see our retries in "batches", so hopefully this is the line of code to fix that.&nbsp; You could use ClearAllPools() instead, but since we have a database per tenant, clearing the specific pool is&nbsp;a better choice for us.</p>
<p>The third change was to move the conn.Close() and <span style="color: #008080;">SqlConnection</span>.ClearPool(conn) outside of the if block so that they get executed every time.</p>
<p>The fourth change was to add one final Sleep(sqlRetrySleep) call in the exception handler.&nbsp; This and the ClearPool call gives us our best chance to succeed when we return.</p>
<p>The last thing I did was to use Actipro <a target="_blank" href="https://www.CodeHighlighter.com/">CodeHighlighter</a> to make the code in the blog post more readable.</p>
<p>Thanks to everyone for the feedback.&nbsp; Here's the latest version of the code:&nbsp;</p>
<pre style="background-color: #F8F8F8; border-style: solid; border-width: 1px; border-color: #C0C0C0; font-family: Courier New, monospace;"><div><!--

code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> GetSqlContextInfo(SqlConnection conn)
{
    </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> sqlContext </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;">.Empty;

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> Omitted the code to read these from configuration</span><span style="color: #008000;">
</span><span style="color: #000000;">    </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> sqlMaxRetries </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">4</span><span style="color: #000000;">;
    </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> sqlRetrySleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">100</span><span style="color: #000000;">;
    </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> sqlMaxSleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">5000</span><span style="color: #000000;">;
    </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> sqlMinSleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">10</span><span style="color: #000000;">;

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> start a timer</span><span style="color: #008000;">
</span><span style="color: #000000;">    TimeSpan ts;
    DateTime dt </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.UtcNow;

    </span><span style="color: #0000FF;">for</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> retryCount </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;">; retryCount </span><span style="color: #000000;">&lt;=</span><span style="color: #000000;"> sqlMaxRetries; retryCount</span><span style="color: #000000;">++</span><span style="color: #000000;">)
    {
        </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
        {
            conn.Open();

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> get the SQL Context and validate the connection is still valid</span><span style="color: #008000;">
</span><span style="color: #000000;">            </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (SqlCommand cmd </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SqlCommand(</span><span style="color: #800000;">"</span><span style="color: #800000;">SELECT CONVERT(NVARCHAR(36), CONTEXT_INFO())</span><span style="color: #800000;">"</span><span style="color: #000000;">, conn))
            {
                sqlContext </span><span style="color: #000000;">=</span><span style="color: #000000;"> cmd.ExecuteScalar().ToString();
            }

            ts </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.UtcNow </span><span style="color: #000000;">-</span><span style="color: #000000;"> dt;

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> log opens that take too long</span><span style="color: #008000;">
</span><span style="color: #000000;">            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (ts.TotalMilliseconds </span><span style="color: #000000;">&gt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">75</span><span style="color: #000000;">)
            {
                SxpLog.WriteKnownEvent(</span><span style="color: #800080;">8001</span><span style="color: #000000;">, ts.TotalMilliseconds, </span><span style="color: #800000;">"</span><span style="color: #800000;">Connect</span><span style="color: #800000;">"</span><span style="color: #000000;">, conn.DataSource, conn.Database, conn.WorkstationId, sqlContext);
            }

            </span><span style="color: #0000FF;">break</span><span style="color: #000000;">;
        }

        </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (SqlException ex)
        {
            conn.Close();</span></!--

code></div><div><span style="color: #000000;"></span></div><div><span style="color: #000000;">            if (retryCount == 1)</span></div><div><span style="color: #000000;">            {
                SqlConnection.ClearPool(conn);</span></div><div><span style="color: #000000;">            }

            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (retryCount </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> sqlMaxRetries)
            {
                SxpLog.WriteSqlRetry(</span><span style="color: #800080;">5902</span><span style="color: #000000;">, ex, conn.DataSource, conn.Database, conn.WorkstationId, </span><span style="color: #800000;">"</span><span style="color: #800000;">Connect</span><span style="color: #800000;">", <span style="color: #000000;">retryCount</span></span><span style="color: #000000;">);

                </span><span style="color: #008000;">//</span><span style="color: #008000;"> don't sleep on the first retry
                </span><span style="color: #008000;">//</span><span style="color: #008000;"> Most SQL Azure retries work on the first retry with no sleep</span><span style="color: #008000;">
</span><span style="color: #000000;">                </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (retryCount </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> 1</span><span style="color: #000000;">)
                {
                    </span><span style="color: #008000;">//</span><span style="color: #008000;"> wait longer between each retry</span><span style="color: #008000;">
</span><span style="color: #000000;">                    </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> sleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">retryCount</span><span style="color: #000000;"> * retryCount</span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;"> sqlRetrySleep;

                    </span><span style="color: #008000;">//</span><span style="color: #008000;"> limit to the min and max retry values</span><span style="color: #008000;">
</span><span style="color: #000000;">                    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (sleep </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> sqlMaxSleep)
                    {
                        sleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> sqlMaxSleep;
                    }
                    </span><span style="color: #0000FF;">else</span><span style="color: #000000;"> </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (sleep </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> sqlMinSleep)
                    {
                        sleep </span><span style="color: #000000;">=</span><span style="color: #000000;"> sqlMinSleep;
                    }

                    </span><span style="color: #008000;">//</span><span style="color: #008000;"> sleep</span><span style="color: #008000;">
</span><span style="color: #000000;">                    System.Threading.Thread.Sleep(sleep);
                }
            }
            </span><span style="color: #0000FF;">else</span><span style="color: #000000;">
            {
                </span><span style="color: #008000;">//</span><span style="color: #008000;"> Log the exception</span><span style="color: #008000;">
</span><span style="color: #000000;">                SxpLog.WriteSqlException(ex, conn.DataSource, conn.Database, conn.WorkstationId, </span><span style="color: #800000;">"</span><span style="color: #800000;">Connect</span><span style="color: #800000;">", <span style="color: #000000;">retryCount,</span> "Final"</span><span style="color: #000000;">);

                </span><span style="color: #008000;">//</span><span style="color: #008000;"> we thought about rethrowing the exception, but chose not to
                </span><span style="color: #008000;">//</span><span style="color: #008000;"> this will give us one more chance to execute the request - we might get lucky ...<br /></span><span style="color: #008000;">
</span><span style="color: #000000;"></span></div><div><span style="color: #000000;">                <span style="color: #008000;">//</span><span style="color: #008000;"> sleep</span><span style="color: #008000;">
</span><span style="color: #000000;">                System.Threading.Thread.Sleep(sqlRetrySleep);</span></span></div><div><span style="color: #000000;"><span style="color: #000000;"></span></span></div><div><span style="color: #000000;"><span style="color: #000000;">                conn.Open();
</span>            }
        }
    }

    </span><span style="color: #008000;">//</span><span style="color: #008000;"> we log this value and null might cause an issue</span><span style="color: #008000;">
</span><span style="color: #000000;">    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (sqlContext </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
    {
        sqlContext </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;">.Empty;
    }

    </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> sqlContext;
}</span></div></pre>]]></content:encoded>
    </item>
  </channel>
</rss>