<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gonzalo Brusella on Medium]]></title>
        <description><![CDATA[Stories by Gonzalo Brusella on Medium]]></description>
        <link>https://medium.com/@gbrusella?source=rss-24497a4c38d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jo4Sf4U2M3nsh_Zf.jpg</url>
            <title>Stories by Gonzalo Brusella on Medium</title>
            <link>https://medium.com/@gbrusella?source=rss-24497a4c38d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:05:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gbrusella/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Measuring the right things]]></title>
            <link>https://medium.com/@gbrusella/measuring-the-right-things-af3ee57a1350?source=rss-24497a4c38d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/af3ee57a1350</guid>
            <category><![CDATA[performance-measurement]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data-management]]></category>
            <dc:creator><![CDATA[Gonzalo Brusella]]></dc:creator>
            <pubDate>Fri, 29 Apr 2016 18:58:10 GMT</pubDate>
            <atom:updated>2016-04-29T18:58:10.688Z</atom:updated>
            <content:encoded><![CDATA[<p>When measuring application health and performance becomes a business necessity, you need to have at least a generic pattern on what to measure and not go wild measuring <em>all</em>.</p><h4>The scenario</h4><p>For the sake of the article let’s assume we are managing a cloud hosted candy e-store. The samples here provided are generic, but they can easily be applied to other kinds of applications.</p><p><strong>The business side</strong><br>As part of our business we define business processes that we automate win an app. Those business process, if they are well developed, should allow measuring. Those measurements are allowing us to see how well the business process is performing in a live situation.</p><p>Again, for the sake of the article, let’s assume that we have 4 critical business flows:</p><ul><li>Login / Create a new user</li><li>Present top selling candies first</li><li>Add candies to the shopping cart</li><li>Finish the sale process (checkout and payment process)</li></ul><p><strong>The technical side</strong></p><p>On the technical side you want to give your users the best experience. In order to accomplish that, you establish an SLA such as: at 5000 request/second, we need to serve 99% of those request in a second (more on this later on).</p><p>Another technical aspect, is the process to select the most selling candies. This process should work fast and, but depends on how you compute the historical data (all history average, 1 week, average, 1 day average, etc.).</p><p>Yet another technical aspect is how much time you spent computing the data. This is especially important in a cloud-based environment.</p><h4>The initial measurements</h4><p>From the business perspective it would be extremely useful measure how many users that enters a business process end it successfully. As a byproduct, analysing the causes of failure enables the improvement of your solutions.</p><p>Also, the time spent on a given business process is important, specially on cloud based systems.</p><h4>Sensing the reality</h4><p>This is a good opportunity to talk about sensors. On this context, sensors are software devices that measure up an application. They are embedded on the application (this process is called instrumentation) and they should run where it matters: on the productive environment. Sensors come in different kinds:</p><p><strong>Gauges:</strong> It’s the instantaneous value of something, in a particular point in time. On our sample, it would be the number of candies sold of a particular flavor.</p><p><strong>Counters:</strong> An incrementing (and decrementing) value. On our sample, it’s the amount of users currently in a given business process (ie: the check-out process).</p><p><strong>Meters:</strong> The average rate of events over a given period of time. A good sample if this is the amount of new users per day.</p><p>Here you should apply some criteria since the mean rate, is not always useful. We face the problem of data recency, and there are other kinds of rate, such as the exponentially weighted moving average (<a href="https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average">EWMA</a>).</p><p><strong>Histograms:</strong> The statistical distribution of values in a stream of data. Again, let’s take a look to our algorithm to select the top selling items. If our algorithm return most of the time just one or two items, then is probably too strict. On the contrary, if we get 100 items, then is too soft. In order to assess this, we need an histogram.</p><p>Let me be a little technical here: we have the minimum, the maximum, the arithmetic mean, and a standard deviation. This is an excellent start point, but those are good for normally distributed data sets. For non gaussian data sets, we use another set of math tools: we use Quantiles (75th, 95th, 98th and 99th percentile are excellent choices).</p><p>The problem with this approach is that you need to store the whole history of the dataset (and process it) in order to get an accurate measurement. The amount of data stored could be enormous, so we need yet more tools</p><ul><li>A <a href="https://www.researchgate.net/profile/Jeffrey_Vitter/publication/234739284_Random_Sampling_with_a_Reservoir/links/0deec51ac0ca20f508000000.pdf">reservoir algorithm</a>. Vitter’s R algorithm is a good starting point but more <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4274967&amp;newsearch=true&amp;queryText=Adaptive-Size%20Reservoir%20Sampling%20over%20Data%20Streams">advanced techniques</a> exists.</li><li>A way to make the uniform data coming from our reservoir algorithm <em>fresh</em>: <a href="http://dimacs.rutgers.edu/~graham/pubs/papers/fwddecay.pdf">Forward-in-time-decaying priority sampling</a><em>,</em> which simply assigns more statistical weight to the more recent data.</li></ul><p><strong>Timers:</strong> A histogram of duration and a meter of calls. Now let’s look to our SLA: with a meter we can have the number of requests per second, right? Well… that’s only the half of our SLA, that will measure how many incoming connections we are handling, not how much it take to resolve each call. Timers measure that second half of the SLA.</p><p>This is a way to measure the throughput of our app, and measure the natural process degradation at different rates (this is very useful under high load scenarios, where you can estimate how much load the current deployment is able to handle).</p><p>For the sake of the article let’s assume we are managing a cloud hosted candy e-store. The samples here provided are generic, but they can easily be applied to other kinds of applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af3ee57a1350" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>