Calculating Request per Second (RPS) in Azure

These days I’m on a mission to balance our server sizes in Azure with the actual usage. As part of that it’s very important to know our real RPS (Requests per Second).

When you plug your app to Azure AppInsight many valuable data will be captured and recorded. Azure itself, provides some basic queries for showing some useful charts about your usage. For example, response duration, dependency duration etc. however, there will be a time where you need to run your own specific query in order to make business related decisions. At that stage Azure AppInsight Analytics comes to play with an online query builder/editor to help you run custom queries, draw charts and extract meaningful information.

At this time, I wanted to see our RPS over a particular period. Although if you enable AppInsight live streaming , you will see your live RPS but in my case I needed to draw that chart for the duration of a day in order to find the peeks.

Here is the code for calculating RPS for the past hour:

| where timestamp > ago(1h)
| summarize r = count(appId) by bin(timestamp, 1s)
| render timechart

With some adjustment here is the code and a chart for requests per minute for the past day:

| where timestamp > ago(1d)
| summarize r = count(appId) by bin(timestamp, 1m)
| render timechart

Azure Analytics RPS


4 thoughts on “Calculating Request per Second (RPS) in Azure”

  1. good article !
    I just wonder what is the different between RPS and IOPS,
    which one is more accurate to calculate the VB disk performance.

    1. Thanks. IOPS will be more accurate for disk performance. RPS includes a lot of overheads for handling the requests before it hits the disk.

  2. Hi, due to sampling in Azure, you have to sum the itemcount field to get the correct values. (Changed to r/s)
    | where timestamp > todatetime(“2019-02-26T15:30:00”) and timestamp < todatetime("2019-02-26T18:00:00") | summarize r = sum(itemCount) by bin(timestamp, 1s) | render timechart

Leave a Reply

Your email address will not be published. Required fields are marked *