<?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>RonInTheCloud</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/roninthecloud/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/roninthecloud/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:50:22 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Using Azure Service Bus to Build Pub/Sub Application (Part-2)</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/using-azure-service-bus-to-build-pubsub-application-part-2</link>
      <pubDate>Mon, 28 Apr 2014 15:19:36 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/04/28/using-azure-service-bus-to-build-pubsub-application-part-2/</guid>
      <description><![CDATA[I recently added a handful of custom performance counters to monitor Azure Service Bus quality...]]></description>
      <content:encoded><![CDATA[<p>I recently added a handful of custom performance counters to monitor Azure Service Bus quality behavior in the&nbsp;Pub/Sub system with Service Bus&nbsp;implementation. I like to share&nbsp;some observations from the data captured in visualization form, because this is a preliminary step for large data set study effort. Some findings may be worth considered as one powerful monitoring strategy, i.e. pattern recognition, or image matching.</p>
<p>Let me introduce some of these counters when I explain several &ldquo;visualized stories&rdquo;. My motivation is to share and evangelize the methodology more than the data itself. As Azure invests more in Service Bus technology, some of the exploring work results might become useless, but the thinking and implementation approach will&nbsp;remain invaluable.&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: medium; text-decoration: underline;"><strong>Have all published events been sent to Service Bus successfully?</strong> </span></p>
<p><strong></strong>&nbsp;</p>
<p><strong>&ldquo;\Service Bus Monitor\SendToLocal: # of Passed / sec&rdquo; </strong>tracks number of events per second that have been successfully sent to Service Bus.</p>
<p>If we know all the incoming traffic are routed to local data center Service Bus, we should expect to see the chart of this perf counter (in yellow) completely matches to the chart of &ldquo;\ASP.NET Application(_Total_)Requests/Sec&rdquo; (in black).</p>
<p>The difference between the two charts is from &ldquo;<strong>\Service Bus Monitor\SendToLocal: # of Failed / sec</strong>&rdquo;, roughly speaking.</p>
<p>This is an easy way to check, within a given time frame, if there is any (local) Service Bus failure at its ingress interface, and how much impact it has had.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/7367.image001.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/7367.image001.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/7367.image001.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/7367.image001.png" alt="" width="768" height="513" border="0" /></a></p>
<p>&nbsp;</p>
<p><br />&nbsp;</p>
<p><span style="font-size: medium; text-decoration: underline;"><strong>How to track Service Bus failure?</strong></span></p>
<p><strong></strong>&nbsp;</p>
<p><strong>&ldquo;SendToLocal: # of Failed / sec&rdquo; </strong>logs count of failures and timestamp for local SB instance errors (could be caused by SB internal server busy state). This count should match <strong>&ldquo;SendToRemote: # of Passed / sec&rdquo;,</strong> according to current routing principle. If we see &ldquo;<strong>SendToBoth: # Failed / sec</strong>&rdquo; has more than &ldquo;0&rdquo;, it clearly indicates message(s) failed to send to both local and remote SB instances, which tells us the message(s) were lost in transferring to SB cluster. This will be a critical error.&nbsp;We may quickly check these graphs before we drill into event log for error details.</p>
<p>We are capturing &ldquo;<strong>SendToLocal: # of Consecutive Failures</strong>&rdquo; to see how consistently it behaves when the local SB instance fails to respond properly at its ingress. The monitoring results tell us this symptom repeats several times a day, but the failure went away quickly, like &ldquo;service bus glitch&rdquo;, I am continuing to track this number (max is &lsquo;2&rsquo; by far), and see if it is possible to figure out a reasonable threshold for us to design an algorithm to reroute partial or all traffic under specific condition.</p>
<p>&nbsp;</p>
<p><br /> <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/4034.image003.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/4034.image003.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/4034.image003.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/4034.image003.jpg" alt="" width="749" height="329" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><span style="font-size: medium;"><strong>Latency comparison between local and remote data center</strong></span></span></p>
<p><strong></strong></p>
<p>We need to design a Geo-distributed messaging system for high performance and low chance of failure. We set up two Service Bus instances<br />in two data centers.</p>
<p>Is sending data to the SB instance at local data center always better performed than sending it to the remote SB instance? What is latency trend to local/remote look like over time? At which point, we should consider rerouting traffic in the case of SB instance failure? Etc.</p>
<p>With these questions in mind, I added &ldquo;<strong>SendToLocal: Latency</strong>&rdquo; and &ldquo;<strong>SendToRemote: Latency</strong>&rdquo;. Monitoring threads are instrumented to send test message to the two SB instances frequently and gather their roundtrip time measurement as latency result.</p>
<p>This is one example trending graph. The red line represents Latency (ms) trend to remote SB. The purple line shows Latency (ms) trend to local SB.&nbsp;(The scale is not the same for the two lines from the tool I am using, by the way.)</p>
<p>This is what I have learned so far.</p>
<ul>
<li>Most of the time, latency to local is x% of latency to remote. This is what expected considering the basic network latency by geo location difference.</li>
</ul>
<ul>
<li>Quite often, latency to local spiked and significantly &ldquo;prevailed&rdquo; latency to remote. This is interesting but &ldquo;annoying&rdquo;, as it adds mystery factor to the &ldquo;black box&rdquo; (SB). We know the incoming traffic prefers us to always route it to the local SB. We also know at some point of time it likes us to change the route temporarily due to SB internal state change, i.e. low/normal load to over load or short of broker resource.</li>
</ul>
<ul>
<li>&nbsp;<strong><em>Latency increase may be a leading factor for SB connection failure</em>.</strong> This is a hypothesis. It follows common sense, but I have not got any concrete proof. The more I look at the data and their comparison, the less confidence I have on this statement. We will need to collect more data, or improve the approach we collect data. But I am sure probability and statistics should play a big role in this study. This is similar as how we are trying to measure, monitor, and &ldquo;forecast&rdquo; earthquake today.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2318.image004.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2318.image004.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2318.image004.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2318.image004.png" alt="" width="732" height="514" border="0" /></a></p>
<p>&nbsp;</p>
<p><br /><span style="font-size: medium; text-decoration: underline;"><strong>Relation between latency and failure of SB</strong></span></p>
<p>&nbsp;</p>
<p>This is an example graph of getting latency counters and failure count trends together. The goal is finding a possible pattern that reveals failure(s) versus latency changes specific to SB instance. This is a continuing data study process. No conclusion to share at this moment.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2046.image006.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2046.image006.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2046.image006.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2046.image006.jpg" alt="" width="725" height="392" border="0" /></a>&nbsp;</p>
<p>&nbsp;</p>
<p>(End)&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Using Azure Service Bus to Build Pub/Sub Application (Part-1)</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/using-azure-service-bus-to-build-pubsub-application-part-1</link>
      <pubDate>Mon, 07 Apr 2014 18:25:10 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/04/07/using-azure-service-bus-to-build-pubsub-application-part-1/</guid>
      <description><![CDATA[I have a project that requires building an online system with&nbsp;large data flow to satisfy two...]]></description>
      <content:encoded><![CDATA[<p>I have a project that requires building an online system with&nbsp;large data flow to satisfy two groups of users.&nbsp;One group&nbsp;of users&nbsp;are data publishers, They could be retail customers using web browser to call our online services, or partners who call our services through web Api service, or client application. The other group of&nbsp;users are receiving and consuming the data sent from the first group of users.&nbsp;The system&nbsp;can be&nbsp;designed by using "Publish-Subscribe" software pattern (<a href="https://en.wikipedia.org/wiki/Publish/subscribe">https://en.wikipedia.org/wiki/Publish/subscribe)</a>. In Azure cloud, using Service Bus as messaging framework would be the best fit&nbsp;for the described&nbsp;business scenario.&nbsp; But, we need to address a list of technical questions, in order to come up with a high level design.</p>
<p>1. How do we&nbsp;enable anonymous users to send data to our system?</p>
<p>There are basically two ways to access&nbsp;Azure Service Bus, RESTful API or SBMP (Service Bus Messaging Protocol), both of which require secured connection (by connection string, or certificate to create token). Letting users to access our Service Bus directly doesn't sound a realistic solution.</p>
<p>2. How to distribute&nbsp;data interface to geographical locations to serve users at anywhere in US?</p>
<p>Azure Service Bus are configured by data center location, the same as Azure WebRole instances. It is important to assemble the two components together by location in order&nbsp;to follow principle of the lowest network latency and the highest service resilience.&nbsp;</p>
<p>etc.</p>
<p>Here is a high level architecture design.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/5811.arch.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/5811.arch.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/5811.arch.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/5811.arch.PNG" alt="" border="0" /></a></p>
<p>Since most users are on internet, web interface is designed to accept data published by users. We implement a web Api service that exposes data publishing "endpoint". It is by HTTP connection with SSL cert authentication to&nbsp;guarantee a secure server access to users. However, asking every user to be authorized before he/she could send data is a little bit challenging here.</p>
<p>Considering that users could be from anywhere in US, the web Api service is deployed to two data centers (i.e. US west, US east). To&nbsp;accommodate geo-distributed design requirement, we've prepared for&nbsp;two Service Buses, one in each data center (USW and USE).</p>
<p>All the WebRole instances have connections to the Service Bus instances&nbsp;(SBMP), but their primary data transferring target is the Service Bus instance in local data center. This means data received by webRole instance in US west data center is sent to Service Bus instance in the same US west data center. However, in case the "send" action fails due to local Service Bus unavailability issues, the same data is resent to the service bus in remote data center (US west data center in this example.) This will minimize&nbsp;risk of&nbsp;possible data loss during the transfer process.</p>
<p>All the published data is organized by topic name. We manage a list of TopicClients, each of which "maps" to a specific topic name&nbsp;on a specific Service Bus instance. Therefore, we can use SubscriptionClient to gather&nbsp;all data&nbsp;from the other end of two Service Bus instances, and filter&nbsp;data&nbsp;by topic name.</p>
<p>I will continue to discuss on this topic in the next post. Please stay tuned.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Topic Size and Partitioning on Service Bus</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/topic-size-and-partitioning-on-service-bus</link>
      <pubDate>Fri, 04 Apr 2014 16:42:37 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/04/04/topic-size-and-partitioning-on-service-bus/</guid>
      <description><![CDATA[Azure Service Bus is a&nbsp;fabulous&nbsp;vehicle to transport data from one&nbsp;end to the other....]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: comic sans ms,sans-serif; font-size: small;">Azure Service Bus is a&nbsp;fabulous&nbsp;vehicle to transport data from one&nbsp;end to the other. Since the incoming traffic data&nbsp;cannot be returned to the sender once it is in, one outstanding risk with the transportation channel is, whether or not&nbsp;we have enough room to host&nbsp;a large amount data,&nbsp;before they&nbsp;can be&nbsp;consumed, even temporarily,&nbsp;One easy option is,&nbsp;to minimize the TTL time for every message in Service Bus.&nbsp;But, what if we have a big list of subscribers to the same topic, and some of these subscribers are lazy to consume their copy of data, or they do receive data timely, but they forget to "receive and delete" programmatically? More and more data will be stuck inside Service Bus. The related topic used size will reach the maximum. As a result, Service Bus becomes unavailable. We have actually seen this symptom in the high load / longhaul stress test lab. It will become a nightmare to deal with&nbsp;such situation in the business world. It is unavoidable in an unmanaged Service Bus hosting environment.</span></p>
<p><span style="font-family: comic sans ms,sans-serif; font-size: small;">Recently I shared a story about one day (or night) I was suddenly getting 80 GB topic size. I thought it was an accidental discount by operational glitch, but it happened again last night. I have learned the "root cause" from an expert. Thanks to the recent released partitioning feature for Service Bus Topic, it&nbsp;"boosts up"&nbsp;Topic size dramatically.&nbsp;If it is turned on, when you create a new Topic, you will get 16 times the max size you are requesting. So, if you want to configure 5 GB with partition on (set "true"), you get 80 GB. I tried it with 3 GB plus partition equal true, and I've got 48 GB max size&nbsp;in return, as expected. Very cool!</span></p>
<p><br />&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/8741.TopicMaxSize.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/8741.TopicMaxSize.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/8741.TopicMaxSize.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/8741.TopicMaxSize.png" alt="" border="0" /></a><br />&nbsp;&nbsp;&nbsp;<br />&nbsp;<span style="font-family: comic sans ms,sans-serif; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: comic sans ms,sans-serif; font-size: small;">Here is a code snippet just for reference.</span></p>
<p><span style="font-family: comic sans ms,sans-serif; font-size: small;"></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private static void CreateEventTopic(string connectionString, string topicName, long topicMaxSizeInMB, bool partitionEnabled)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (string.IsNullOrEmpty(topicName))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new Exception("Error: Topic name is needed!");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // this method (TopicExists) is NOT case sensitive for topicName string<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!namespaceManager.TopicExists(topicName))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; namespaceManager.CreateTopic(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new TopicDescription(topicName)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DefaultMessageTimeToLive = TimeSpan.FromMilliseconds(60 * 1000),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EnableBatchedOperations = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DuplicateDetectionHistoryTimeWindow = TimeSpan.FromMilliseconds(60 * 1000),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RequiresDuplicateDetection = true,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MaxSizeInMegabytes = topicMaxSizeInMB,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #00ccff;">EnablePartitioning = partitionEnabled</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p><span style="font-family: comic sans ms,sans-serif; font-size: small; mso-fareast-font-family: SimSun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">With 80 GB (per topic) on hand, I feel much more comfortable to do more things with the toy. </span><span style="font-family: comic sans ms,sans-serif; font-size: small; mso-fareast-font-family: SimSun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;">The partitioning feature looks&nbsp;promising in terms of messaging handling for both send and receive. You may find detailed description from </span><a href="https://msdn.microsoft.com/library/azure/dn520246.aspx">https://msdn.microsoft.com/library/azure/dn520246.aspx</a>.&nbsp; <span style="font-family: comic sans ms,sans-serif; font-size: small;">With excitement and hope, I have enabled&nbsp;this feature&nbsp;for all topics. We will</span> try and see how it is working in practice.</p>]]></content:encoded>
    </item>
    <item>
      <title>Beloved Service Bus</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/beloved-service-bus</link>
      <pubDate>Thu, 20 Mar 2014 11:24:00 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/03/20/beloved-service-bus/</guid>
      <description><![CDATA[The Service Bus concept is so cool and human-friendly. As Azure is investing more in the...]]></description>
      <content:encoded><![CDATA[<p>The Service Bus concept is so cool and human-friendly. As Azure is investing more in the cloud,&nbsp;Azure Service Bus is supposed to be more powerful. When I tried with Service Bus Queue implementation more than a year ago, it was already impressive, except for the size limit hit due to&nbsp;its poor scalability. Nowadays,&nbsp;we see a lot more&nbsp;applications' architectures&nbsp;are equipped with Service Bus component for various uses.&nbsp;Like&nbsp;riding courser,&nbsp;experimenting with&nbsp;Azure Service Bus is an intriguing activity,&nbsp;and&nbsp;it can also be a "daunting" task. I am starting to share some of the things (good or bad)&nbsp;I learned from work at the grass roots.</p>
<p>This link has an intuitive resource for beginners to start with: <a href="https://www.windowsazure.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-topics-subscriptions/">https://www.windowsazure.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-topics-subscriptions/</a>. However, it is very soon that you will find its&nbsp;capacity planning becomes important at the&nbsp;architecture design stage. &nbsp;</p>
<p>There are a lot of numbers mentioned on this page (<a href="https://msdn.microsoft.com/en-us/library/windowsazure/ee732538.aspx">https://msdn.microsoft.com/en-us/library/windowsazure/ee732538.aspx</a>). It took me quite some&nbsp;time to&nbsp;study each quota number. As an example of using Topic/Subscription feature, I'd suggest&nbsp;focusing on the following six numbers&nbsp;as a start:</p>
<p><br />1. Topic size: 1 GB or more</p>
<p>2. Number of topics per service namespace:&nbsp; 10,000</p>
<p>3. Number of subscriptions per topic: 2,000</p>
<p>4. Message size for a topic/subscription entity: max at 256KB</p>
<p>5. Number of concurrent connections on a topic/subscription entity: 100</p>
<p>6. Number of concurrent receive requests on a topic/subscription entity:&nbsp; 5,000</p>
<p>And, regarding 5 and 6, this article has a decent explanation: <a href="https://blogs.msdn.com/b/mvpawardprogram/archive/2013/11/18/windows-azure-service-bus-connection-quotas.aspx">https://blogs.msdn.com/b/mvpawardprogram/archive/2013/11/18/windows-azure-service-bus-connection-quotas.aspx</a></p>
<p>&nbsp;</p>
<p>Service Bus used to be offering 1GB up to 5 GB spaces until just recently (a week ago or so), when the portal UI "suddenly" decided to offer 1 GB size of space to every topic you set up either manually or programmatically. This is what I have experienced lately,&nbsp;but it&nbsp;has not been validated&nbsp;by official feature announcement (is there any, yet?).</p>
<p>I guess it was during the feature change transition period of time in production. One of my topic has got "80 GB" size!</p>
<p>See this picture as a sort of proof or "certificate of achievement" (I have masked some strings related to the project.)</p>
<p>It has made me feel so special. I love it, although I have not verified if it does give me that huge space?</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2313.Case-0311-SBhugeTopic.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2313.Case_2D00_0311_2D00_SBhugeTopic.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2313.Case-0311-SBhugeTopic.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2313.Case_2D00_0311_2D00_SBhugeTopic.PNG" alt="" border="0" /></a>&nbsp;</p>
<p>Even when I was confused about the increasing usage size in "negative" direction (see below screenshot), I&nbsp;was still cool about it.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/8358.Case-0310-SBnegativeSize.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/8358.Case_2D00_0310_2D00_SBnegativeSize.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/8358.Case-0310-SBnegativeSize.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/8358.Case_2D00_0310_2D00_SBnegativeSize.PNG" alt="" border="0" /></a></p>
<p>If you suspect whether this was just a one out of million cases, here is another "proof of UI concept".</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/5086.Case-0310-SBnegativeSize2.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/5086.Case_2D00_0310_2D00_SBnegativeSize2.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/5086.Case-0310-SBnegativeSize2.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/5086.Case_2D00_0310_2D00_SBnegativeSize2.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Azure Service Bus is continuing to make improvement. When we look back at these pictures after a year or two, I am sure we will be really thrilled about the progress.</p>
<p>Let's enjoy every moment (good or not good) now, when we explore its adventurous features.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Weird Error When Building Cloud Package</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/weird-error-when-building-cloud-package</link>
      <pubDate>Sun, 09 Mar 2014 12:51:00 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/03/09/weird-error-when-building-cloud-package/</guid>
      <description><![CDATA[It was frustrating to be stuck with one error for a while.&nbsp;It is exciting to finally&nbsp;get...]]></description>
      <content:encoded><![CDATA[<p>It was frustrating to be stuck with one error for a while.&nbsp;It is exciting to finally&nbsp;get over, and to be able to&nbsp;share the story.</p>
<p>I have a simple WebRole cloud project. It had been building fine, until&nbsp;when I merged it to a different branch. The same package build process produced this error message box.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/3124.Case-0308-PackagingError.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/3124.Case_2D00_0308_2D00_PackagingError.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/3124.Case-0308-PackagingError.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/3124.Case_2D00_0308_2D00_PackagingError.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And, in the output window, it only has one line of error: "...&gt;<span style="background-color: #ff0000;">Error: Object reference not set to an instance of an object</span>." The error message&nbsp;was really terse, I had no idea what was actually going on.</p>
<p>I changed the output option to "Diagnostics" or "Detailed", but it still only gave the same one line error message.</p>
<p>&nbsp;</p>
<p>Having searched online resources without a luck to find any meaningful clue, I tried removing the web project reference from the cloud project. It didn't even allow me to do so. Here is the pop-up message box.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2577.Case-0308-TrytoRemoveRoleProjectError.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2577.Case_2D00_0308_2D00_TrytoRemoveRoleProjectError.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/2577.Case-0308-TrytoRemoveRoleProjectError.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/2577.Case_2D00_0308_2D00_TrytoRemoveRoleProjectError.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>I know there is no single&nbsp;issue with the .csdef or .cscfg files, according to what the message indicated.&nbsp;I had to remove it manually from the project file. The "brutal" way got accepted.</p>
<p>During&nbsp;the&nbsp;process of experimentation, quite a lot of "annoying" things happened. The diagnostics.wadcfg file was gone, the important settings data inside .cscfg files were mysteriously lost, and etc.</p>
<p>&nbsp;</p>
<p>When I added the same web project back to the cloud project, it popped up another "Windows Azure&nbsp;Tools for Microsoft Visual Studio" related&nbsp;message.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/4544.Case-0308-ReAddingRoleProjectError.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/4544.Case_2D00_0308_2D00_ReAddingRoleProjectError.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/73/4544.Case-0308-ReAddingRoleProjectError.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-73/4544.Case_2D00_0308_2D00_ReAddingRoleProjectError.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>This time the message&nbsp;is very&nbsp;helpful. At least I got hint of the direction. Now I realized that I used to have two versions of "System.Spatial" (5.2 and 5.6) in the dependency package.</p>
<p>I thought ver. 5.2 was old, so I removed it from the package and kept the latest version (5.6) for "System.Spatial". The "WindowsAzure.Storage" ver. 2.1 is actually referencing "System.Spatial" ver. 5.2.</p>
<p>After I recovered the "System.Spatial" ver. 5.2 back in the package, the problem was solved!</p>
<p>&nbsp;</p>
<p>The unexpected blocking issue was resolved. I am&nbsp;wishing&nbsp;any useful error information (like something above in the last dialogue box)&nbsp;would be included in the output window during the build process. This will save us tremendous time and effort.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting runtime issue with WaIISHost.exe</title>
      <link>https://docs.microsoft.com/archive/blogs/roninthecloud/troubleshooting-runtime-issue-with-waiishost-exe</link>
      <pubDate>Thu, 20 Feb 2014 10:52:40 GMT</pubDate>
      <dc:creator><![CDATA[ronosh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/roninthecloud/2014/02/20/troubleshooting-runtime-issue-with-waiishost-exe/</guid>
      <description><![CDATA[Developing Azure application and seeing through it successfully launched in the cloud has much fun,...]]></description>
      <content:encoded><![CDATA[<p>Developing Azure application and seeing through it successfully launched in the cloud has much fun, although the life with cloud is not always easy. In the last two days, I have a terrible experience with an application error, which occurred right after the deployment. The &ldquo;.Net Runtime&rdquo; application error event is illustrated as below:</p>
<p>&nbsp;</p>
<p>Application: WaIISHost.exe<br /> Framework Version: v4.0.30319<br /> Description: The process was terminated due to an unhandled exception.<br /> <span style="color: #ff0000;">Exception Info: System.TypeInitializationException</span><br /><span style="color: #ff0000;"> Stack:&nbsp;</span><span style="color: #ff0000;"> at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__0()</span><br /> at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)<br /> at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)<br /> at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)<br /> at System.Threading.ThreadHelper.ThreadStart()</p>
<p>&nbsp;</p>
<p>It seemed&nbsp;clear the WindowsAzure.ServiceRuntime ran into critical error when it tried to bring up the application service it hosted. But, the error message is not intuitive enough to find the root cause. Another weird behavior is, the cloud package built from the same project on the other enlistment machine was just doing fine. There must have some significant difference between the two packages (.cspkg files) built from two enlistments. I had no luck in finding any tool online to help compare the two package files. Looking through the build logs and all the files inside the package didn&rsquo;t surface any clue.</p>
<p>After having spent some decent time investigating inside the VM, I finally found a log file named &ldquo;<strong>WaIISHost.log</strong>&rdquo; Under this folder: &ldquo;<strong>C:\Resources\Directory\625f7be7a6b241dfaa6924e3e6b8841e.xxxxxxxx.Service.DiagnosticStore</strong>&rdquo;. A &ldquo;surprising&rdquo; detail of the exception error is clearly written in this file. It is something like this (Concerning the project confidentiality, I am using &ldquo;xxx&hellip;&rdquo; here to represent the dll names.)</p>
<p>WaIISHost Information: 0 : [00003952:00000001, 2014/02/14 18:05:29.433, INFO ] DebuggerAttachComplete START<br /> WaIISHost Information: 0 : [00003952:00000007, 2014/02/14 18:05:30.676, ERROR] Unhandled exception: IsTerminating &lsquo;True&rsquo;, Message</p>
<p><span style="color: #ff0000;">&lsquo;System.TypeInitializationException: The type initializer for &lsquo;xxxxxxxx&rsquo; threw an exception. &mdash;&gt; System.IO.FileNotFoundException: Could not load file or assembly &lsquo;Microsoft.WindowsAzure.ServiceRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&prime; or one of its dependencies. </span><span style="color: #ff0000;">The system cannot find the file specified.</span><br /><span style="color: #ff0000;"> at xxxxxxxx..cctor()</span><br />&mdash; End of inner exception stack trace &mdash;<br />............</p>
<p>&nbsp;</p>
<p>The log information is very&nbsp;helpful. The stack trace&nbsp;has enabled&nbsp;me&nbsp;to identify the root cause immediately. It turns out that a dependency dll was still referencing an older version of Azure SDK (ver. 2.0). The root of the root cause was actually from an unexpected time delay of a &ldquo;Gated Check-in&rdquo; feature implemented in VSTS recently. This is why the issue was seen from one enlistment, but not from the other(s). And, this issue may not be easily reproduced at local dev box, if multiple versions of azure runtime assemblies are installed on the dev box.&nbsp;&nbsp;</p>
<p>If I started to search for &ldquo;WaIISHost Log&rdquo;, I would have quickly found this early post (<a href="https://blogs.msdn.com/b/kwill/archive/2011/05/05/windows-azure-role-architecture.aspx" rel="nofollow">https://blogs.msdn.com/b/kwill/archive/2011/05/05/windows-azure-role-architecture.aspx</a>). My &ldquo;painful&rdquo; experience has motivated me to share the tip of using &ldquo;WaIISHost.log&rdquo; with you&nbsp;for effectively troubleshooting cloud service errors during its start up.</p>
<p>&nbsp;</p>
<p>(This article was originally written on Feb. 15, 2014)</p>]]></content:encoded>
    </item>
  </channel>
</rss>