<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tavishi Gupta</title>
    <description>The latest articles on DEV Community by Tavishi Gupta (@tavishigupta).</description>
    <link>https://dev.to/tavishigupta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F536579%2F33c01ae2-0fe5-413c-a603-526891e021d2.jpeg</url>
      <title>DEV Community: Tavishi Gupta</title>
      <link>https://dev.to/tavishigupta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tavishigupta"/>
    <language>en</language>
    <item>
      <title>A Concise Startup List for Your Next Project</title>
      <dc:creator>Tavishi Gupta</dc:creator>
      <pubDate>Tue, 07 Dec 2021 10:56:38 +0000</pubDate>
      <link>https://dev.to/tavishigupta/a-concise-startup-list-for-your-next-project-1k45</link>
      <guid>https://dev.to/tavishigupta/a-concise-startup-list-for-your-next-project-1k45</guid>
      <description>&lt;p&gt;After searching for a &lt;strong&gt;concise starter list&lt;/strong&gt; for a new project of mine (below if you’re interested), I decided to put a quick one together for the skimmers like me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--beMJmmLo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ymcg1cc6axa5osqu5boy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--beMJmmLo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ymcg1cc6axa5osqu5boy.png" alt="Image description" width="880" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Context
&lt;/h3&gt;

&lt;p&gt;My &lt;a href="https://travelwithtern.com/?refEmail=dev@travelwithtern.co"&gt;app&lt;/a&gt; is in the travel space and the first few steps for me were to create a logo, brand &amp;amp; a landing page. &lt;em&gt;(I already knew what I wanted to create, so these were the first steps of execution to feel a little established)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Purchase domain (&lt;a href="https://domains.google/"&gt;Google Domains,&lt;/a&gt; &lt;a href="https://www.godaddy.com/"&gt;GoDaddy&lt;/a&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Set up email for the domain (I’m using &lt;a href="https://mail.google.com/"&gt;Gmail&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Set up Google &lt;a href="https://drive.google.com/"&gt;Drive&lt;/a&gt; to store documents&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="https://www.notion.so"&gt;Notion&lt;/a&gt; for note-taking &amp;amp; planning&lt;/li&gt;
&lt;li&gt;Socials (can do more or less):

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.tiktok.com/"&gt;TikTok&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch"&gt;Create an organization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create repos for different purposes (or monolith) in the organization&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Create Cloud Account (I’m using &lt;a href="https://firebase.google.com/"&gt;Firebase&lt;/a&gt; [it’s easy], you can use &lt;a href="https://aws.amazon.com/?aws-products-analytics.sort-by=item.additionalFields.productNameLowercase&amp;amp;aws-products-analytics.sort-order=asc"&gt;AWS&lt;/a&gt;, &lt;a href="https://portal.azure.com/"&gt;Azure&lt;/a&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Set up &lt;a href="https://www.figma.com/files/recent?fuid=1017681420715291893"&gt;Figma&lt;/a&gt; for all the designs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.fullstory.com/"&gt;Fullstory&lt;/a&gt; for screen-capture-esque analytics (I personally really love this so far, way easier than Amplitude, which is what I’ve used in the past)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Logo &amp;amp; Branding
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Logo&lt;/em&gt;: paid a &lt;a href="https://sameerakhurana.webflow.io/"&gt;friend who designs logos&lt;/a&gt; (we did 3 drafts + final deliverables)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Branding colours&lt;/em&gt;: I asked 20-odd friends a simple question related to the brand (i.e. &lt;em&gt;When you think of stress free travel, what 2–3 colours come to mind&lt;/em&gt;?) &amp;amp; picked 2 of the top complementing colors&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Landing Page (Waitlist)
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;I will be posting another article with the scaffolding of my landing page&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Frontend&lt;/em&gt;: &lt;a href="https://v3.vuejs.org/"&gt;Vue3&lt;/a&gt; + &lt;a href="https://tailwindcss.com/"&gt;Tailwind&lt;/a&gt; (Any &lt;a href="https://www.simform.com/blog/best-frontend-frameworks/"&gt;framework&lt;/a&gt; works)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Backend&lt;/em&gt;: &lt;a href="https://firebase.google.com/docs/functions"&gt;Firebase Functions&lt;/a&gt; + &lt;a href="https://mailchimp.com/developer/marketing/api/lists/"&gt;MailchimpAPI&lt;/a&gt; for email campaigns (stick to using this one, none of the other packages have worked for me, so I made a simple call to the Mailchimp endpoints as mentioned in the docs)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Waitlist&lt;/em&gt;: &lt;a href="https://getwaitlist.com/"&gt;WaitlistAPI&lt;/a&gt; / alternative &lt;a href="https://firebase.google.com/products/firestore"&gt;Firestore&lt;/a&gt; methods (I created a Firestore collection &amp;amp; added each user’s information as a document, I use a referral email field to see who to give access to first)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  A little about my app — Tern:
&lt;/h1&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://travelwithtern.com/?refEmail=dev@travelwithtern.com"&gt;&lt;em&gt;travelwithtern.com&lt;/em&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Tern is a modular itinerary builder that I'm building to relieve people of the headache of endlessly researching activities (restaurants, events, places, etc.) when visiting a new place. Of course, it can also be used on a day-to-day basis.&lt;/p&gt;

&lt;h5&gt;
  
  
  PS: If anyone wants to talk about Tern or anything else, please feel free to DM me on &lt;a href="https://www.linkedin.com/in/tavishigupta/"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/itstavishi"&gt;Twitter&lt;/a&gt;, or email me at &lt;a href="mailto:tavishi@travelwithtern.com"&gt;tavishi@travelwithtern.com&lt;/a&gt;
&lt;/h5&gt;

</description>
      <category>startup</category>
      <category>vue</category>
      <category>beginners</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Load Testing with Locust</title>
      <dc:creator>Tavishi Gupta</dc:creator>
      <pubDate>Wed, 09 Dec 2020 18:38:16 +0000</pubDate>
      <link>https://dev.to/tavishigupta/load-testing-with-locust-148l</link>
      <guid>https://dev.to/tavishigupta/load-testing-with-locust-148l</guid>
      <description>&lt;p&gt;In this post, I will walk through how my team mapped performance characteristics for a web app we created for a customer, and how we picked between using just an App Service, a CDN (Content Delivery Network) and Front Door (all Azure Services). I will use a simple &lt;a href="https://github.com/Azure-Samples/azure-voting-app-redis" rel="noopener noreferrer"&gt;voting app&lt;/a&gt; in this blog as an example to compare the results. For our load/performance testing framework we chose to use &lt;a href="https://locust.io/" rel="noopener noreferrer"&gt;Locust&lt;/a&gt;, an open source load testing tool, as it is scriptable and distributed, and very easy to deploy on Azure. Feel free to follow along for testing your own app!&lt;/p&gt;

&lt;h3&gt;
  
  
  Goal
&lt;/h3&gt;

&lt;p&gt;Through load/performance testing, our goal was to determine the number of concurrent users and response times that our customer's application could handle. This would help us understand the bottlenecks and capabilities of the page speed, scalability and stability of the web app. We tested the time-to-first-byte speed for the web app as the key performance metric.&lt;/p&gt;

&lt;h3&gt;
  
  
  Definitions
&lt;/h3&gt;

&lt;p&gt;Before I move into the how and why of our top pick, I'm going to define the 3 solutions so you can better understand what we are comparing here.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://azure.microsoft.com/en-us/services/app-service/" rel="noopener noreferrer"&gt;Azure App Service&lt;/a&gt;: A fully managed platform for building, deploying and scaling your web apps.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/" rel="noopener noreferrer"&gt;Content Delivery Network&lt;/a&gt;: A content delivery network (CDN) refers to a geographically distributed group of servers which work together to provide fast delivery of Internet content. A CDN allows for the quick transfer of assets needed for loading Internet content including HTML pages, JavaScript files, stylesheets, images, and videos.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/frontdoor/front-door-overview" rel="noopener noreferrer"&gt;Azure Front Door&lt;/a&gt;: Front Door is a global, scalable entry-point that uses the Microsoft global edge network to create fast, secure, and widely scalable web applications.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  How to Set up and Use Locust
&lt;/h3&gt;

&lt;p&gt;You can use &lt;a href="https://github.com/tavishigupta/locust-blog/tree/master/deployment" rel="noopener noreferrer"&gt;this&lt;/a&gt; deployment script to deploy the locust structure in Azure. If you already know how set up Locust and what the different metrics mean, feel free to skip this section!&lt;/p&gt;

&lt;h4&gt;
  
  
  Start a Test
&lt;/h4&gt;

&lt;p&gt;Go to the Locust dashboard and follow the instructions. The Locust dashboard can be reached by going to the IP of the master node and port 8089 (Example: &lt;a href="http://7xttd3hv5jaac-master.eastus.azurecontainer.io:8089" rel="noopener noreferrer"&gt;http://7xttd3hv5jaac-master.eastus.azurecontainer.io:8089&lt;/a&gt;).&lt;br&gt;&lt;br&gt;
Enter the desired numbers and start swarming.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcfjcqquvhkim6letjhui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcfjcqquvhkim6letjhui.png" alt="Dashboard"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h5&gt;
  
  
  How to pick values:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Total users to simulate&lt;/em&gt;: It's recommended that you start with a number of simulated users that are greater than &lt;code&gt;number of user classes * number of workers&lt;/code&gt; when running Locust distributed. In our current case, we have 1 user class and 3 worker nodes.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Hatch rate&lt;/em&gt;: If the hatch rate is lower than the number of worker nodes, the hatching would occur in "bursts" where all worker node would hatch a single user and then sleep for multiple seconds, hatch another user, sleep and repeat.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Host&lt;/em&gt;: The host attribute is a URL prefix (e.g., "&lt;a href="http://google.com%22" rel="noopener noreferrer"&gt;http://google.com"&lt;/a&gt;) to the host that is to be loaded.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: If number of workers on the dashboard is more that the worker nodes available, &lt;a href="https://github.com/tavishigupta/locust-blog/tree/master/deployment" rel="noopener noreferrer"&gt;redeploy&lt;/a&gt; the dashboard with the required number of worker nodes/instances.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  View and Analyze Results
&lt;/h4&gt;

&lt;p&gt;After swarming for a while, your dashboard will look something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Funw28myqp76czpse66xe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Funw28myqp76czpse66xe.png" alt="Analysis Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Definitions:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Requests&lt;/em&gt;: Total number of requests made so far&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Fails&lt;/em&gt;: Number of requests that have failed&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Median&lt;/em&gt;: Response speed for 50 percentile in ms&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;90%ile&lt;/em&gt;: Response speed for 90 percentile in ms&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Average&lt;/em&gt;: Average response speed in ms
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Min&lt;/em&gt;: Minimum response speed in ms
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Max&lt;/em&gt;: Maximum response speed in ms
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Average size (bytes)&lt;/em&gt;: Average response size in bytes
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Current RPS&lt;/em&gt;: Current requests per second&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Current Failures/s&lt;/em&gt;: Total number of failures per second
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your graphs will look something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgfd1p1eyi04r20kyqrza.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgfd1p1eyi04r20kyqrza.png" alt="graph1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F68tn4dju6bp2jy4dftr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F68tn4dju6bp2jy4dftr8.png" alt="graph2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These graphs can be downloaded using the download icon next to them.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuhv5wotr3wdkn82gs4k8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuhv5wotr3wdkn82gs4k8.png" alt="downloads button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And/or you can download the data under the download data tab.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuhv5wotr3wdkn82gs4k8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuhv5wotr3wdkn82gs4k8.png" alt="downloads tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can analyze the graphs based on &lt;strong&gt;response&lt;/strong&gt; and &lt;strong&gt;volume&lt;/strong&gt; metrics.&lt;/p&gt;

&lt;h5&gt;
  
  
  Response Metrics
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Average response time&lt;/em&gt; measures the average amount of time that passes between a client's initial request and the last byte of a server's response, including the delivery of HTML, images, CSS, JavaScript, and any other resources. It's the most accurate standard measurement of the actual user experience.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Peak response time&lt;/em&gt; measures the roundtrip of a request/response cycle (RTT) but focuses on the longest cycle rather than taking an average. High peak response times help identify problematic anomalies.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Error rates&lt;/em&gt; measure the percentage of problematic requests compared to total requests. It's not uncommon to have some errors with a high load, but obviously, error rates should be minimized to optimize the user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Volume Metrics
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Concurrent users&lt;/em&gt; measure how many virtual users are active at a given point in time. While similar to requests per second (see below), the difference is that each concurrent user can generate a high number of requests.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Requests per second&lt;/em&gt; measures the raw number of requests that are being sent to the server each second, including requests for HTML pages, CSS stylesheets, XML documents, JavaScript files, images, and other resources.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Throughput&lt;/em&gt; measures the amount of bandwidth, in kilobytes per second, consumed during the test. Low throughput could suggest the need to compress resources.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Deploy the App Service, CDN and Front Door
&lt;/h3&gt;

&lt;p&gt;Next, I deployed my app service in conjunction with front door. I used a &lt;a href="https://github.com/Azure-Samples/frontdoor-appservice-vnet-terraform" rel="noopener noreferrer"&gt;terraform script&lt;/a&gt; written by my colleague to do so. Next, I added a CDN to my app service using &lt;a href="https://docs.microsoft.com/en-us/azure/cdn/cdn-add-to-web-app" rel="noopener noreferrer"&gt;this&lt;/a&gt; tutorial. For the purpose of this test, I removed all access restrictions for the app service, so that I could avoid the forbidden access (403) issues. I did this by navigating to the &lt;strong&gt;networking&lt;/strong&gt; tab in my app service resource, and then removing all the access restrictions. You can follow along though these screenshots:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1x5n8a6vxfpmr2uyazto.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1x5n8a6vxfpmr2uyazto.png" alt="networking"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsfx0dnq52y08hsquhocb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsfx0dnq52y08hsquhocb.png" alt="access restriction"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, you should have &lt;em&gt;3 endpoints&lt;/em&gt;: an App Service endpoint, a CDN endpoint and a Front Door endpoint.&lt;/p&gt;




&lt;h3&gt;
  
  
  Running the Locust Tests
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Assumptions
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The goal of load/performance testing was &lt;strong&gt;not&lt;/strong&gt; to check the correctness of the code or data. Those would require integration or acceptance tests.&lt;/li&gt;
&lt;li&gt;The responsiveness of the different elements of the page were &lt;strong&gt;not&lt;/strong&gt; being tested in the load/performance test.&lt;/li&gt;
&lt;li&gt;The loading time of each components on the map (graphs, content, logos) was &lt;strong&gt;not&lt;/strong&gt; measured since the data points were not being rendered on the initial load.&lt;/li&gt;
&lt;li&gt;The data was embedded as a static geojson in the web app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Constraints
&lt;/h4&gt;

&lt;p&gt;For our customer, we only tested 2 routes (/ and /about) based on how the web app was set up. For our purposes, to keep things simple, I am only testing 1 route (/). If you would like to test more than 1 route, feel free to edit the python script however you'd like by reading the &lt;a href="https://docs.locust.io/en/stable/writing-a-locustfile.html" rel="noopener noreferrer"&gt;locust documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Inputs &amp;amp; Controlled Variables
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Number of concurrent users&lt;/strong&gt;: This value was kept constant at 5000 concurrent users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hatching rate&lt;/strong&gt;: This value was kept constant at 10 users being spawned every second.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time&lt;/strong&gt;: Each test was run for about 20 minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host&lt;/strong&gt;: This variable was specified based on which infrastructure was being tested. So there were 3 hosts that were tested.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Comparing and Analyzing the Results
&lt;/h3&gt;

&lt;p&gt;Some things to note here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Total Requested&lt;/strong&gt; chart, the green line shows the successful requests, and the red line shows the failures.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Response Time&lt;/strong&gt; chart, the green line shows the median response time, and the yellow line shows the 90th percentile.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Case 1: Just the App Service
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F654mklmg64qcshmemdfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F654mklmg64qcshmemdfr.png" alt="case1 dashboard"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxrizb3jhlvk4mj84y5ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxrizb3jhlvk4mj84y5ka.png" alt="case1 charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Case 2: App Service with a CDN
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3uyp0e1x82o8f6o6ulwj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3uyp0e1x82o8f6o6ulwj.png" alt="case2 dashboard"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2zysvm4fbvcs759zm9g1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2zysvm4fbvcs759zm9g1.png" alt="case2 charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Case 3: App Service with Front Door
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feod9ddhsb47cmfwsl27l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feod9ddhsb47cmfwsl27l.png" alt="case3 dashboard"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdpvpflegin2epdo1u6j1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdpvpflegin2epdo1u6j1.png" alt="case3 charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Analysis
&lt;/h4&gt;

&lt;p&gt;If you have been following along with the set up, deployment and running test, the next step is to analyze our data and understand the metrics we use to measure performance. For my particular example, I will be looking at the response time, error rate, requests per second and peak response time. Before we dive into the comparisons, here are some benchmarks and explanations for comparison:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In 2020, &lt;a href="https://backlinko.com/page-speed-stats" rel="noopener noreferrer"&gt;the average Time-To-First-Byte&lt;/a&gt; (TTFB) speed was found to be 1.28 seconds (1280ms) on desktop and 2.59 seconds (1590ms) on mobile. However, Google's best practice is to achieve a time under 200ms.&lt;/li&gt;
&lt;li&gt;On average, larger scale applications can reach ~2000 requests per second. Since the application I am testing is lightweight, these numbers might not be very useful. I will still do an analysis so you can do it for yourself.&lt;/li&gt;
&lt;li&gt;Similar to the average response time, the peak response time (PRT) is the measurement of the longest responses for all requests coming through the server. This is a good indicator of performance pain points in the application.&lt;/li&gt;
&lt;li&gt;According to &lt;a href="https://httparchive.org/" rel="noopener noreferrer"&gt;HTTPArchive&lt;/a&gt; and their &lt;a href="https://httparchive.org/reports/page-weight" rel="noopener noreferrer"&gt;page weight report&lt;/a&gt;, the average size of a website is 1.966 Mb for desktop and 1.778 Mb for mobile at the time of writing. Google's best practice is to be below 0.5 Mb.

&lt;ul&gt;
&lt;li&gt;The web app we are testing is very lightweight, so it's only 949 bytes. However, our customer's app size was about 4.5 Mb, which was larger to load.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fciuu3vsuzikt4yiqm5tk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fciuu3vsuzikt4yiqm5tk.PNG" alt="table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  What do the errors mean?
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;104 Connection Reset by Peer&lt;/em&gt;: Connection Reset error indicates that a TCP RST was received, and the connection is now closed. This occurs when a packet is sent from the user's end of the connection, but the other end does not recognize the connection; it will send back a packet with the RST bit set in order to forcibly close the connection. This usually happens when there is too much load on the server.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;502 Bad-Gateway&lt;/em&gt;: Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;503 Service unavailable&lt;/em&gt;: Service Unavailable server error response code indicates that the server is not ready to handle the request. This can also be a result of an uncaught error in your code.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;504 Gateway-Timeout&lt;/em&gt;: Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Our Final Choice
&lt;/h3&gt;

&lt;p&gt;As we can see in the analysis section, the app service performs quite poorly by itself with poor average TTFB, many failures, high peak response time and (for a lightweight application) low requests per seconds. On the other hand, the CDN and Front Door solutions perform pretty much on par given most of the metrics. For our purposes, we picked Front Door because we needed a WAF (Web Application Firewall), which is still in preview for CDN.&lt;/p&gt;




&lt;p&gt;I hope reading about how we went about performance/load testing is helpful in setting up your own testing practices! Please feel free to comment or DM me on Twitter (&lt;a href="https://twitter.com/itstavishi" rel="noopener noreferrer"&gt;@itstavishi&lt;/a&gt;) with any questions, updates or comments you would like me to address!&lt;/p&gt;

</description>
      <category>testing</category>
      <category>loadtesting</category>
      <category>azure</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
