<?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: Gaurav Gaur</title>
    <description>The latest articles on DEV Community by Gaurav Gaur (@gauravgaur).</description>
    <link>https://dev.to/gauravgaur</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%2F1035420%2F3d152791-dc79-44da-85d1-9ac6aa9f692a.jpeg</url>
      <title>DEV Community: Gaurav Gaur</title>
      <link>https://dev.to/gauravgaur</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gauravgaur"/>
    <language>en</language>
    <item>
      <title>The 4 Signals That Actually Predict Production Failures - Part 1</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Tue, 24 Mar 2026 13:52:23 +0000</pubDate>
      <link>https://dev.to/gauravgaur/monitoring-essential-metrics-for-cloud-native-systems-part-1-2dd0</link>
      <guid>https://dev.to/gauravgaur/monitoring-essential-metrics-for-cloud-native-systems-part-1-2dd0</guid>
      <description>&lt;h2&gt;
  
  
  Monitoring is not a dashboard only problem
&lt;/h2&gt;

&lt;p&gt;In the last couple of years, I have moved across a few product teams. Every time I walk into an engineering team and ask how monitoring works. I get a standard response.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is a dashboard&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Usually, Grafana. Sometimes Kibana or Splunk. Team members have passed me links buried in wiki pages and nobody updates them anymore.&lt;/p&gt;

&lt;p&gt;But dashboards don't make a system observable. I have worked on large scale cloud projects. All of them have dashboards but still struggle to answer basic questions during an incident. &lt;/p&gt;

&lt;h2&gt;
  
  
  What can fail?
&lt;/h2&gt;

&lt;p&gt;The answer to this question can change how you think about monitoring. To me, monitoring is a system thinking problem. Any cloud solution that I work on is not a single application anymore.  With cloud solutions, I am talking about API Gateways, event streams, microservices, containers, managed cloud services, and external integrations. &lt;/p&gt;

&lt;p&gt;Something is always lagging somewhere, and all users are going to tell you is &lt;em&gt;"The system is slow"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;It might mean that either an API timing out or queue is backing up, or a container restarting or network path degraded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fcloudnative%2F2026-03-10-monitoring-cloud-native-services-part1%2FSystemThinkingApproach.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fcloudnative%2F2026-03-10-monitoring-cloud-native-services-part1%2FSystemThinkingApproach.png" alt="A system thinking approach to monitoring" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After years of working on enterprise solutions, I can tell you that bugs do not cause major production incidents. They are often caused by lack of visibility, meaning missing the right metrics.&lt;/p&gt;

&lt;p&gt;In this article, I try to put down some of the monitoring metrics that I find useful. These can help you diagnose incidents and keep the system reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring vs Observability – Why it matters?
&lt;/h2&gt;

&lt;p&gt;I can say that monitoring used to mean one thing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is the server alive?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If CPU was below 80% and memory was below 70%, everything looked fine. &lt;/p&gt;

&lt;p&gt;Modern systems are not the same. You can have a healthy-looking infrastructure, a normal CPU utilisation, a healthy memory graph and can still have a production outage. I have seen services returning &lt;em&gt;timeouts&lt;/em&gt; for hours while dashboards showed everything green. That can happen as traditional monitoring focuses on resources while failures can occur during interactions between services.&lt;/p&gt;

&lt;p&gt;This is where observability comes in. Monitoring answers: &lt;em&gt;"Is something wrong?"&lt;/em&gt; and observability answers: &lt;em&gt;"Why is it wrong?"&lt;/em&gt; You need both.&lt;/p&gt;

&lt;h3&gt;
  
  
  What all you need?
&lt;/h3&gt;

&lt;p&gt;In practice, you need three things. &lt;strong&gt;Metrics&lt;/strong&gt; are used to &lt;em&gt;detect problem&lt;/em&gt;, &lt;strong&gt;logs&lt;/strong&gt; to &lt;em&gt;explain errors&lt;/em&gt; and &lt;strong&gt;traces&lt;/strong&gt; to &lt;em&gt;discover latency&lt;/em&gt;. If your metrics are wrong, you would never know something is failing. And if you don't know something is failing, you never check logs and traces. Which is why metrics are the entry point of any investigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5542ptf7xwuiytpq3s59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5542ptf7xwuiytpq3s59.png" alt="Observability triad" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Typical monitoring challenges
&lt;/h2&gt;

&lt;p&gt;Most of the time, teams don't have strategies for monitoring. It is the last backlog item to be picked up before the final production release. One service team adds a dashboard, another adds alerts and a third team introduces a different naming convention.&lt;/p&gt;

&lt;p&gt;Six months down the line, you get duplicate metrics and inconsistent naming. There are no standard dashboards and alerts that nobody trusts. Eventually, teams ignore alerts, stop relying on monitoring and fall back to guesswork. That is a dangerous place to be.&lt;/p&gt;

&lt;p&gt;One pattern I have seen repeatedly is &lt;strong&gt;metric explosion without clarity&lt;/strong&gt;. A service exposes 400 metrics, and nobody knows which one matters.&lt;/p&gt;

&lt;p&gt;Good monitoring is not about collecting more metrics. It is about collecting the &lt;strong&gt;right metrics&lt;/strong&gt;. A production-ready service rarely needs more than 10–20 core metrics and a small number of critical alerts. Everything else is investigation detail. Not operational signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four signals that every service needs
&lt;/h2&gt;

&lt;p&gt;I recommend every service must expose below four signals. I sometimes refer to them as minimum survival metrics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latency&lt;/li&gt;
&lt;li&gt;Traffic&lt;/li&gt;
&lt;li&gt;Errors&lt;/li&gt;
&lt;li&gt;Saturation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They can help you diagnose most production incidents. Let us discuss them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency – Earliest signal
&lt;/h2&gt;

&lt;p&gt;Latency is usually the earliest signal that something is going wrong. Long before error rates increase… Long before services fail… Latency begins to drift upward.&lt;/p&gt;

&lt;p&gt;Slow systems become broken systems eventually. If you only monitor errors, you will detect problems late. If you monitor latency, you can catch problems early.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why averages are false indicators?
&lt;/h3&gt;

&lt;p&gt;Average latency is one of the most misleading metrics in production systems, however, many teams are still monitoring it. Consider a scenario where 990 requests complete in 40ms and 10 requests take 4 seconds. It means an average latency of about 80 ms. But a user experiencing the slow requests would strongly disagree.&lt;/p&gt;

&lt;p&gt;Observing percentiles can solve this problem. You should track all below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;p50 for a typical user experience&lt;/li&gt;
&lt;li&gt;p95 for degraded experience, and&lt;/li&gt;
&lt;li&gt;p99 for worst-case experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If p99 starts moving, it is the first clue during the incidents. Even if averages look perfect. Below is a code snippet to produce percentile metrics.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="nc"&gt;Timer&lt;/span&gt; &lt;span class="n"&gt;orderTimer&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;OrderController&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MeterRegistry&lt;/span&gt; &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;orderTimer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
            &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;timer&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"order.api.latency"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/orders/{id}"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="nf"&gt;getOrder&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@PathVariable&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;orderTimer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;record&lt;/span&gt;&lt;span class="o"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;orderService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getOrder&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;});&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What good latency dashboards look like?
&lt;/h3&gt;

&lt;p&gt;A good latency dashboard should answer one question instantly&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Are users experiencing slow responses?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That means, you are looking for percentiles and not averages with clear trends. If you need five minutes to interpret a graph, the dashboard is not working.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqxup2wgimkgjmh057d4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxqxup2wgimkgjmh057d4.png" alt="Percentiles over percentage on latency dashboard" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Traffic — System load
&lt;/h2&gt;

&lt;p&gt;Traffic on your services tells you what the system is dealing with. Without traffic metrics, you cannot interpret latency or errors correctly. An error spike during a traffic spike means something very different from an error spike during normal load.&lt;/p&gt;

&lt;p&gt;Traffic metrics include requests per second or events per second or messages per second or also batch rates. Most incidents begin with a traffic change. Sometimes expected and sometimes not.&lt;/p&gt;

&lt;p&gt;A common pattern that I have always observed – Traffic increases and that increases latency. Integrations slow down and errors appear. Without traffic metrics, the root cause looks mysterious. With traffic metrics, it becomes obvious.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prometheus query example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Requests per second:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rate(http_server_requests_seconds_count[1m])&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This metric alone explains a surprising number of incidents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production incident
&lt;/h2&gt;

&lt;p&gt;I once observed a latency spike that looked like a system failure. When I checked, CPU and memory looked normal, pods were healthy, error rates were low, and everything looked fine except traffic.&lt;/p&gt;

&lt;p&gt;Traffic had doubled within ten minutes because of a partner integration retry loop. Nothing was technically broken, but the system was overloaded. Without traffic metrics, I would have spent hours investigating. That is the difference good monitoring makes.&lt;/p&gt;

&lt;p&gt;I will continue this discussion in my &lt;a href="https://www.gaurgaurav.com/2026/cloud_native/essential-monitoring-metrics-part2/" rel="noopener noreferrer"&gt;next blog post&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>cloudnative</category>
      <category>monitoring</category>
      <category>observability</category>
    </item>
    <item>
      <title>Vibe Coding - Conversational Software Development - Part 3 Prompt Discipline</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Mon, 11 Aug 2025 14:51:54 +0000</pubDate>
      <link>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-3-prompt-discipline-25ob</link>
      <guid>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-3-prompt-discipline-25ob</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;It is speculated that vibe coding could fundamentally change how we build software. Instead of writing lines of code, we will describe our goals in plain English and working software will be generated in response.&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://www.gaurgaurav.com/2025/ai/vibe-coding-conversational-software-development-part2/" rel="noopener noreferrer"&gt;last post&lt;/a&gt;, I experimented with a few Vibe Coding tools and shared my hands-on experience. If you have been following closely, you might have noticed something subtle but important that I am using natural language as an interface. The words I choose shape how AI interprets and builds software. And behind that process lies a critical yet often overlooked layer of the system prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, What Exactly is a Prompt?
&lt;/h2&gt;

&lt;p&gt;Think of Vibe Coding as a &lt;em&gt;chat-driven&lt;/em&gt; engineering environment. Every message you send, or the prompt is not just casual conversation. It is more like writing an operating manual for your AI assistant.&lt;br&gt;
A prompt sets the ground rules. It can define your preferred tech stack, coding style, naming conventions, or whether the AI should ask for clarification before making assumptions. In other words, it’s your interface for aligning the AI with your intent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0udm4113egwxz1eeswhz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0udm4113egwxz1eeswhz.png" alt="System prompt illustration" width="800" height="481"&gt;&lt;/a&gt;&lt;em&gt;System prompt&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Prompts Matter
&lt;/h2&gt;

&lt;p&gt;From my experience, if the prompt is not clear or consistent, things can quickly go off track. Here are just a few issues I ran into when prompts were vague:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI picked the wrong programming language.&lt;/li&gt;
&lt;li&gt;It introduced unfamiliar and sometimes unnecessary libraries.&lt;/li&gt;
&lt;li&gt;It ignored earlier context and gave contradictory results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even with advanced tools like &lt;a href="https://chatgpt.com/" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;, &lt;a href="https://claude.ai/" rel="noopener noreferrer"&gt;Claude&lt;/a&gt;, or &lt;a href="https://cursor.com/en" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;, vagueness in instructions can lead to unpredictable behaviour. It is not about the quality of the model rather it is about the clarity of the direction we give it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configure System Prompts
&lt;/h2&gt;

&lt;p&gt;A benefit of using most of the modern AI platforms is that they allow users to define system level prompts. You can define the prompts either globally (across entire workspace) or local (for every project). This helps maintain consistency and avoid repeating the context over and over.&lt;/p&gt;

&lt;p&gt;I now make it a habit to start every coding session by explicitly setting the system prompt. It is like configuring your dev environment but in a conversational format.&lt;/p&gt;
&lt;h2&gt;
  
  
  Designing an Effective Prompt
&lt;/h2&gt;

&lt;p&gt;I am still learning as I go, but I want to share a sample prompt that has worked well for me. The idea is to set clear constraints right from the start. It gives the AI less room for misinterpretation and reduces friction during the session.&lt;br&gt;
Here is a sample system prompt I often use:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Consider yourself a frontend developer.&lt;br&gt;&lt;br&gt;
All UI components should use React and Tailwind CSS.&lt;br&gt;&lt;br&gt;
Use JavaScript only and avoid any external libraries unless specified.&lt;br&gt;&lt;br&gt;
Ask for clarification if any requirement is unclear.&lt;br&gt;&lt;br&gt;
Focus on clean and modular code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This prompt does a few important things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines the role of the assistant (a frontend developer).&lt;/li&gt;
&lt;li&gt;It sets technology boundaries—no Python, TypeScript, or surprise libraries.&lt;/li&gt;
&lt;li&gt;It encourages the AI to ask questions if something is ambiguous.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can easily extend this prompt to add more context depending on your project needs. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All UI components must be accessible.&lt;/li&gt;
&lt;li&gt;Ensure mobile responsiveness.&lt;/li&gt;
&lt;li&gt;The backend is built on Java-based APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This initial alignment streamlines development by cutting down on time consumption and limiting AI interactions. You can direct AI to focus according to your development approach and technology choices.&lt;/p&gt;

&lt;p&gt;Another observation is that AI assistants demonstrate higher effectiveness when working with commonly used frameworks and tools such as &lt;code&gt;React&lt;/code&gt;, &lt;code&gt;Tailwind&lt;/code&gt;, and &lt;code&gt;Node&lt;/code&gt;. These models have seen far more examples of those technologies, which means you’ll get more reliable and relevant responses.&lt;/p&gt;
&lt;h2&gt;
  
  
  New Developers: Don't Overthink It
&lt;/h2&gt;

&lt;p&gt;If you have been following along, the discussion so far might make it feel like you need to master a dozen concepts before you even begin with Vibe Coding. But that is not true.&lt;br&gt;
If you are just getting started, my advice is to set a few clear boundaries and get going. Let us take an example to create an interactive dashboard. Here is an example of a prompt that works well to start with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I am a new developer. I want to build an interactive data dashboard.&lt;br&gt;
Can you suggest a tech stack that is easy to maintain and well-supported?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most AI assistants like ChatGPT, Claude, and Gemini will then help you through your upcoming steps. The assistants will pose clarifying questions about your requirements which allows them to develop both your tech stack and system prompt.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tools That Help You Craft Better Prompts
&lt;/h2&gt;

&lt;p&gt;As I continue experimenting, I have come to realize how important the right prompt is. And the good news? You don't have to guess. Tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://console.anthropic.com/" rel="noopener noreferrer"&gt;Anthropic Claude Console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gemini.google.com/app" rel="noopener noreferrer"&gt;Google Gemini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chatgpt.com/" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;can help you test, iterate, and refine your prompts in real time. Below is an example of how I refined one of mine using Google Gemini.&lt;/p&gt;
&lt;h2&gt;
  
  
  My Prompt Refinement Process
&lt;/h2&gt;

&lt;p&gt;I started with this base prompt to explore &lt;a href="https://data.london.gov.uk/download/290a22f1-5eef-4801-8286-3f288b49093a/acce7f88-70f0-4fd0-9160-f02a9d96b2c3/air-quality-london.xlsx" rel="noopener noreferrer"&gt;London Air Quality Data&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I want to build an interactive dashboard for exploring data located at London Air Quality Data (Excel).&lt;br&gt;&lt;br&gt;
Please ask me questions to better understand the requirements.&lt;br&gt;&lt;br&gt;
Also then help me write a system prompt that guides you to use React, Tailwind, and D3 for visualization.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If London Air Quality Data is not available at above link, I have &lt;a href="https://raw.githubusercontent.com/Gaur4vGaur/traveller/refs/heads/master/air-quality-london.csv" rel="noopener noreferrer"&gt;committed a copy&lt;/a&gt; of it, as CSV, at the time writing this post.&lt;/p&gt;

&lt;p&gt;Gemini asked a few smart follow-up questions about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what kind of visualizations I had in mind,&lt;/li&gt;
&lt;li&gt;the type of interactivity I expected,&lt;/li&gt;
&lt;li&gt;the layout preferences, and&lt;/li&gt;
&lt;li&gt;how I planned to handle the data source.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To narrow the scope, I directed the focus to only one sheet:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Only evaluate the ‘Monthly Averages’ sheet. Assume everything else&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Based on that, Gemini helped me generate a refined system prompt that I could use to generate my dashboard. Below is the output prompt&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;### System Prompt:&lt;/span&gt;

You are an expert web development assistant tasked with building an interactive data exploration dashboard. 
Your goal is to generate a detailed plan, including component structure and initial code snippets, for a React application that visualizes air quality monthly averages.

&lt;span class="gs"&gt;__Project Objective__&lt;/span&gt;
Create an interactive dashboard to explore monthly average air quality data for London, sourced from a specific Excel file.

&lt;span class="gu"&gt;### Core Technologies:&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Frontend Framework: React
&lt;span class="p"&gt;-&lt;/span&gt; Styling Framework: Tailwind CSS
&lt;span class="p"&gt;-&lt;/span&gt; Visualization Library: D3.js

&lt;span class="gu"&gt;### Data Source:&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; __URL__: https://data.london.gov.uk/download/290a22f1-5eef-4801-8286-3f288b49093a/acce7f88-70f0-4fd0-9160-f02a9d96b2c3/air-quality-london.xlsx
&lt;span class="p"&gt;-&lt;/span&gt; Specific Sheet to Use: "monthly averages"

&lt;span class="gu"&gt;### Data Interpretation &amp;amp; Preparation:&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Download and parse the Excel file from the provided URL.
&lt;span class="p"&gt;2.&lt;/span&gt; Focus exclusively on the data within the "monthly averages" sheet.
&lt;span class="p"&gt;3.&lt;/span&gt; Identify key columns for visualization:
&lt;span class="p"&gt;  -&lt;/span&gt; Date (or equivalent column representing the month/year for aggregation)
&lt;span class="p"&gt;  -&lt;/span&gt; Site Name (or equivalent for location/monitoring station)
&lt;span class="p"&gt;  -&lt;/span&gt; Pollutant (or equivalent for the type of pollutant, e.g., NO2, PM2.5)
&lt;span class="p"&gt;  -&lt;/span&gt; Value (or equivalent for the monthly average concentration)
&lt;span class="p"&gt;4.&lt;/span&gt; Data cleaning and transformation should include:
&lt;span class="p"&gt;  -&lt;/span&gt; Converting date strings/numbers to valid Date objects.
&lt;span class="p"&gt;  -&lt;/span&gt; Handling potential missing or invalid data points gracefully (e.g., excluding them from calculations or using interpolation if appropriate for visualization context, but primarily focusing on showing available data).

&lt;span class="gu"&gt;### Dashboard Functionality &amp;amp; Interactivity:&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Data Loading: Efficiently load and parse the "monthly averages" data from the Excel file upon component mount. Use an appropriate library like xlsx (SheetJS) for Excel parsing.
&lt;span class="p"&gt;2.&lt;/span&gt; Filters/Controls:
&lt;span class="p"&gt;  -&lt;/span&gt; Pollutant Type Filter: Allow users to select one or more pollutant types (e.g., a multi-select dropdown or checkboxes).
&lt;span class="p"&gt;  -&lt;/span&gt; Monitoring Station Filter: Allow users to select one or more specific monitoring stations/sites.
&lt;span class="p"&gt;  -&lt;/span&gt; Year Filter: Provide a way to filter data by year (e.g., a dropdown for available years or a range slider if multiple years are selected).
&lt;span class="p"&gt;3.&lt;/span&gt; Visualizations (D3.js):
&lt;span class="p"&gt;  -&lt;/span&gt; Time Series Line Chart: The primary visualization should be a line chart showing the monthly average trend over time for selected pollutants and stations.
    -Each line should represent a combination of pollutant and station (or allow choosing a single pollutant to compare multiple stations, or vice versa).
&lt;span class="p"&gt;    -&lt;/span&gt; Axes should be clearly labeled (e.g., "Date" on X-axis, "Concentration" on Y-axis).
&lt;span class="p"&gt;  -&lt;/span&gt; Interactive Tooltips: On hover, display detailed information for specific data points (e.g., date, pollutant, station, exact monthly average value).
&lt;span class="p"&gt;4.&lt;/span&gt; User Interface (React &amp;amp; Tailwind CSS):
&lt;span class="p"&gt;  -&lt;/span&gt; Clean, responsive, and intuitive dashboard layout.
&lt;span class="p"&gt;  -&lt;/span&gt; Filter controls should be easily accessible (e.g., in a sidebar or header).
&lt;span class="p"&gt;  -&lt;/span&gt; The main visualization area should be prominent.
&lt;span class="p"&gt;  -&lt;/span&gt; Use Tailwind CSS for all styling, ensuring a modern and clean aesthetic.

&lt;span class="gu"&gt;### Output Requirements:&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; A high-level React component structure (e.g., App.js, Dashboard.js, Chart.js, FilterControls.js).
&lt;span class="p"&gt;2.&lt;/span&gt; Pseudo-code or a conceptual outline for data fetching and initial parsing of the Excel sheet.
&lt;span class="p"&gt;3.&lt;/span&gt; An example of how a D3 line chart component might receive data and render, focusing on the integration with React and general D3 patterns.
&lt;span class="p"&gt;4.&lt;/span&gt; Considerations for managing application state (e.g., selected filters, loaded data).

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;System prompts require continuous refinement as they need to match the evolving needs of your project just like we rewrite code to enhance its clarity and maintainability. Your prompts should evolve to match your project's development to reflect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;new tools or stack changes,&lt;/li&gt;
&lt;li&gt;updated coding patterns or style guides,&lt;/li&gt;
&lt;li&gt;and shifts in architecture or design decisions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good prompt is more than basic instructions to your assistant. You can consider it as a design contract between you and your AI assistant. In &lt;a href="https://www.gaurgaurav.com/2025/ai/vibe-coding-conversational-software-development-part4/" rel="noopener noreferrer"&gt;my next and final post&lt;/a&gt; I will continue to discuss how to further fine tune the prompts.&lt;/p&gt;

&lt;p&gt;My suggestion for now is not to stress too much about getting it perfect the first time. Start simple, iterate, and treat your prompt like part of the engineering process where your intent meets implementation.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>vibecoding</category>
      <category>productivity</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Sun, 20 Jul 2025 09:04:26 +0000</pubDate>
      <link>https://dev.to/gauravgaur/-44eb</link>
      <guid>https://dev.to/gauravgaur/-44eb</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o" class="crayons-story__hidden-navigation-link"&gt;Vibe Coding - Conversational Software Development - Part 2 In Practice&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/gauravgaur" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1035420%2F3d152791-dc79-44da-85d1-9ac6aa9f692a.jpeg" alt="gauravgaur profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/gauravgaur" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Gaurav Gaur
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Gaurav Gaur
                
              
              &lt;div id="story-author-preview-content-2707059" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/gauravgaur" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1035420%2F3d152791-dc79-44da-85d1-9ac6aa9f692a.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Gaurav Gaur&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 19 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o" id="article-link-2707059"&gt;
          Vibe Coding - Conversational Software Development - Part 2 In Practice
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/vibecoding"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;vibecoding&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/productivity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;productivity&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            5 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>programming</category>
      <category>ai</category>
      <category>vibecoding</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Vibe Coding - Conversational Software Development - Part 2 In Practice</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Sat, 19 Jul 2025 22:15:00 +0000</pubDate>
      <link>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o</link>
      <guid>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-2-in-practice-2f9o</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In my &lt;a href="https://www.gaurgaurav.com/2025/ai/vibe-coding-conversational-software-development-part1/" rel="noopener noreferrer"&gt;previous blog post&lt;/a&gt;, I introduced the concept of &lt;strong&gt;Vibe Coding&lt;/strong&gt;. It is one of the new ways that is attracting even non-programmers. Users can describe their thoughts using natural language and AI tools would convert that into a working application. Spotting this opportunity, I thought I should experiment and understand what that actually looks like in action. I took this opportunity to test out a few tools and see how they really impact my workflow. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fai%2F2025-06-21-ai_vibe-coding-conversational-software-development-part2%2Fintroduction_vibe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fai%2F2025-06-21-ai_vibe-coding-conversational-software-development-part2%2Fintroduction_vibe.png" alt="Chat-based AI development illustration" width="704" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is not just about automating tasks; it is about changing our behaviour on how to approach a problem. To me, it feels like a declarative approach, especially when you are navigating a new framework or language for the first time. &lt;/p&gt;

&lt;h2&gt;
  
  
  Smarter Coding in the IDE: GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;I first started with the most common tool that is gaining popularity in the corporate world. It is &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;GitHub Copilot&lt;/a&gt;. I have been using it regularly in VS Code, and while it is not exactly magic, it is undoubtedly helpful. When I am deep into the code and I use it for quick assistance with things like scaffolding code, writing tests, or debugging tricky edge cases. It saves me time context switching to browser. You can interact with Copilot right in your code or you can open a chat window to explain your issue.&lt;/p&gt;

&lt;p&gt;Copilot now has an “&lt;em&gt;agent mode&lt;/em&gt;,” which allows you to give broader instructions that can span across multiple files at feature level. It is not flawless and can sometimes come up with generic solutions. But most of the time it helps to cut down time spent on the boilerplate code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frz1anstu9xp0s4ym2c89.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frz1anstu9xp0s4ym2c89.png" alt="Copilot Agent Mode" width="649" height="744"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The best part of copilot is that it is embedded in the editor, which means it is just a click away whenever I need it. Also, it is context-aware, it often makes suggestions that fits with existing application style and architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqz6u24fh0c70flb3ebx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqz6u24fh0c70flb3ebx.png" alt="Copilot Inline Editing" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminal-First Development: Claude Code
&lt;/h2&gt;

&lt;p&gt;There are developers who love working in the terminal. I would suggest tools like &lt;a href="https://docs.anthropic.com/en/home" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; or &lt;a href="https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started" rel="noopener noreferrer"&gt;OpenCodeX CLI&lt;/a&gt; for them. These are worth checking out. Although it works from the terminal, but it understands your entire codebase and can implement changes based on natural language commands.&lt;/p&gt;

&lt;p&gt;I recently tried out Claude Code for a side project. From the CLI, I was able to set up a basic project, refactor functions, and even tidy up some old scripts. It is not a traditional simple text-based interface, and I recommend it as a must have in your toolkit.&lt;/p&gt;

&lt;p&gt;Anthropic has done a good job with &lt;a href="https://docs.anthropic.com/en/docs/claude-code/quickstart" rel="noopener noreferrer"&gt;Claude Code documentation and working examples&lt;/a&gt;. It is worth checking out if you are curious.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI in the Browser: Replit
&lt;/h2&gt;

&lt;p&gt;The other tool I tried was &lt;a href="https://replit.com/" rel="noopener noreferrer"&gt;Replit&lt;/a&gt;. It has latest AI features in browser and target developers above beginner level. I provided it below prompt to generate me a Trello like dashboard to manage agile teams.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Generate me an app something like Trello where I can track my tasks from to-do, in-progress and done. It should have a board to move tickets and ticket analysis capabilities&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58fc05lsc8v3insyrywr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58fc05lsc8v3insyrywr.png" alt="Replit prompt example" width="800" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What really impressed me was how collaborative the experience is—you provide a prompt, and it guides you through the development process step by step. It feels almost like working alongside a junior developer who has done their homework. You are not just getting code; you are getting a plan, followed by clean, organized output. And if something goes wrong, Replit adapts and tries again. It really helps you navigate the development journey, generating and even debugging as it goes.&lt;/p&gt;

&lt;p&gt;This tool is especially convenient for generating a quick prototype. While it might not be the best fit for highly complex systems, it shines when you need to get something up and running in a browser environment. Below is a sample application that it generated for my above prompt. It has done a decent job and has added features like tags for tickets, included date on every ticket and even presenting in-progress bar per ticket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fze2jv6gwon7lplhckav8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fze2jv6gwon7lplhckav8.png" alt="Replit preview example" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A Growing Ecosystem
&lt;/h2&gt;

&lt;p&gt;These are not the only available options in the market. The app store for AI-driven development is rapidly filling up, and each tool has its own feature set and niche.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://lovable.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;Lovable&lt;/strong&gt;&lt;/a&gt; is a great option for working with UIs and interfaces that you can tweak visually. It is another non-IDE alternative that lets you can interact with simple natural language text prompts. You can describe what you want, and it updates the interface accordingly. It also supports backend connections, integrations, and multi-user collaboration.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://bolt.new/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bolt.new&lt;/strong&gt;&lt;/a&gt; is another available option for full stack apps and frameworks like &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; or &lt;a href="https://svelte.dev/" rel="noopener noreferrer"&gt;Svelte&lt;/a&gt;, and mobile via Expo. I think Bolt is outstanding if you are a beginner. The design outputs are sometimes a bit better than what I was expecting.&lt;/li&gt;
&lt;li&gt;  Another similar tool is &lt;a href="https://v0.dev/" rel="noopener noreferrer"&gt;&lt;strong&gt;V0 by Vercel&lt;/strong&gt;&lt;/a&gt;. It is more developer focussed online tool. It is built by the team behind &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; and it supports modern web technologies out of the box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tool to consider and adopt really depends on your problem statement. &lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I think AI tools are enhancing our programming capabilities. If I have to pick one of those, I will pick that seamlessly blends into the background, providing just the right amount of assistance without being intrusive. Tools are only valuable if they help you build faster and improves overall experience. I will continue the discussion and explore &lt;a href="https://www.gaurgaurav.com/2025/ai/vibe-coding-conversational-software-development-part3/" rel="noopener noreferrer"&gt;System Prompts in part 3&lt;/a&gt; of this series.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>vibecoding</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Vibe Coding - Conversational Software Development - Part 1 Introduction</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Fri, 04 Jul 2025 13:49:24 +0000</pubDate>
      <link>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-1-introduction-2p41</link>
      <guid>https://dev.to/gauravgaur/vibe-coding-conversational-software-development-part-1-introduction-2p41</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Since I started coding, I have seen developer communities strive to make programming more human-readable—almost like writing in English or a preferred language. Many modern languages introduced &lt;a href="https://en.wiktionary.org/wiki/syntactic_sugar" rel="noopener noreferrer"&gt;syntactic sugar&lt;/a&gt; to make code more intuitive and conversational. These efforts have made significant advancements, but now, we are witnessing something far more transformative.&lt;/p&gt;

&lt;p&gt;Natural language can now be translated directly into functional software. The concept is widely referred as &lt;strong&gt;Vibe Coding&lt;/strong&gt;. It is an &lt;em&gt;AI first approach&lt;/em&gt; for rapid software development. Let me try to explain the idea with the help of a step-by-step diagram that I have added below. As the picture shows, you put down your thoughts or overall idea as a prompt. You direct what step you want to achieve or what is your end goal. The chat-based AI works on your prompt and comes up with a generated code. You preview the output of the code and can fine-tune it further. Once you are happy, you put that code into your server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fai%2F2025-05-24-ai_vibe-coding-conversational-software-development-part1%2Fend-to-end-experience-chat-based-builders.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FGaur4vGaur%2Ftraveller%2Frefs%2Fheads%2Fmaster%2Fimages%2Fai%2F2025-05-24-ai_vibe-coding-conversational-software-development-part1%2Fend-to-end-experience-chat-based-builders.png" alt="End-to-end experience with chat-based AI development" width="602" height="202"&gt;&lt;/a&gt;&lt;em&gt;End-to-end experience with chat-based AI development&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The term Vibe Coding was popularized in early 2025 by researcher &lt;a href="https://en.wikipedia.org/wiki/Andrej_Karpathy" rel="noopener noreferrer"&gt;Andrej Karpathy&lt;/a&gt;, known for his work in Open API and Tesla. He defines Vibe Coding as a process of describing goals in natural language, letting advanced models handle implementation, and iterating quickly without worrying too much about the underlying code. In short - you describe, and large language models generate and refine. &lt;sup id="fnref1"&gt;1&lt;/sup&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Exploration of Vibe Coding
&lt;/h2&gt;

&lt;p&gt;I recently started to explore this new notion of coding. While the definition makes it look straightforward, its applications vary depending on what you want to achieve and the tools you use. So far, I have seen it manifesting in several forms based on what you want to get out of it. You can perform things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Prototyping&lt;/strong&gt; – This is my favourite use case. It can be used for a quick UI mock-up or lightweight programs to validate a hypothesis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automating Repetitive Tasks&lt;/strong&gt; – Developers constantly look for ways to reduce &lt;a href="https://sre.google/sre-book/eliminating-toil/" rel="noopener noreferrer"&gt;toil&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experimentation&lt;/strong&gt; – You can ask how a library works, generate example usage, or compare multiple implementations—all in minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Problem Solving and Debugging&lt;/strong&gt; – Something, I use for debugging obscure issues. Although, I am not convinced that it is saving time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Shifting Focus from Syntax to Problem Solving
&lt;/h2&gt;

&lt;p&gt;In my opinion, Vibe Coding shifts your focus from typing every bracket or declaring every variable to problem solving. You concentrate on delivering features instead of obsessing over implementation details.&lt;/p&gt;

&lt;p&gt;You can use AI tools to bounce off ideas, look for alternative implementations, and race through your development. But be cautious, at the end of the day, it is still your code. You are responsible for verifying it and test it and making it production ready. You must critically review the code whether all edge cases are handled and make any tweaks, if needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Driven Tools
&lt;/h2&gt;

&lt;p&gt;As I mentioned earlier that it does not matter whether you are a new developer or a seasoned programmer - you can leverage Vibe coding to your advantage. Just like you would hire the right candidate for a specific role, you need to use the right AI platform for the right use case. &lt;/p&gt;

&lt;p&gt;In this series of blogs, I intend to explore several available options and categorize them based on how and where they can be used effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy Entry: Chat Based Builders
&lt;/h2&gt;

&lt;p&gt;Let us start with the most accessible option that is chat-based builders. If you are new to all this, the easiest way to get started is using conversational AI tools. All you need is a well-structured prompt. &lt;br&gt;
These tools gained traction with popularity of &lt;a href="https://www.anthropic.com/product" rel="noopener noreferrer"&gt;Anthropic’s Claude artefact&lt;/a&gt;. It lets you build live dashboard, tools and interfaces directly in chat window. &lt;/p&gt;

&lt;p&gt;Try prompting:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create a dashboard for analysing social media posts performance using most relevant visualisation from D3.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude will generate a live preview that you can tweak, inspect, and even publish. Below is a screenshot of what it generated for me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93llaya42jx4o2kv4esl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93llaya42jx4o2kv4esl.png" alt="Claude generated social media dashboard" width="602" height="151"&gt;&lt;/a&gt;&lt;em&gt;Claude generated Social Media Analytics dashboard&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Tools like ChatGPT, Google Gemini and Microsoft Copilot offer similar features. You can generate fully functional code with simple natural language prompts. &lt;/p&gt;

&lt;p&gt;Try something fun like &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build a simple recipe idea generator. I want to input a few ingredients I have, and it suggests a random recipe. I should be able to save recipes I like and add my own custom recipes&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You will get a working prototype that you can experiment with or customize further. Here is another screenshot—this one is from ChatGPT.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxy0o5zslklgbpt3d6bc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxy0o5zslklgbpt3d6bc.png" alt="ChatGPT generated Recipe Ideas UI" width="602" height="316"&gt;&lt;/a&gt;&lt;em&gt;ChatGPT generated Recipe Ideas UI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can download this auto generated code and share it wider. You can execute the same prompt on Google Gemini and Microsoft Copilot to compare the results, and may share in the comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Next
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://www.gaurgaurav.com/2025/ai/vibe-coding-conversational-software-development-part2/" rel="noopener noreferrer"&gt;part 2 of the series&lt;/a&gt;, I will continue this discussion and add some of my experiences of working with these tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Vibe_coding" rel="noopener noreferrer"&gt;Wikipedia. "Vibe Coding." Modified May 10, 2025&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>vibecoding</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Scatter Gather Pattern: Designing High-Performing Distributed Systems</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Wed, 22 Mar 2023 13:51:46 +0000</pubDate>
      <link>https://dev.to/gauravgaur/scatter-gather-pattern-designing-high-performing-distributed-systems-1820</link>
      <guid>https://dev.to/gauravgaur/scatter-gather-pattern-designing-high-performing-distributed-systems-1820</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this blog post, I will explore the Scatter-Gather Pattern, a cloud scalability design that can process large amounts of data and perform time-consuming, intricate computations. The pattern works like a guide for creating distributed systems to achieve parallelism. The approach can significantly reduce processing times for an online application to cater to as many users. The idea is to break down an operation into independent tasks to achieve approximately constant response time.     &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Scatter Gather Pattern
&lt;/h2&gt;

&lt;p&gt;Let us take an example to understand the problem where the pattern can be effective. Suppose an application that runs on a single-core processor. It can process an incoming request in 64 seconds to produce a result. If we migrate the same application to a 16-core processor, it can generate the same output in roughly four seconds. The multicore processor will spawn sixteen threads to work in parallel to compute the result, with a few extra microseconds for managing multiple processing threads. A four-second response time is good but still considered slugging for a web application. Upgrading the processor further, verticle scaling, will mitigate the problem, not solve it. &lt;/p&gt;

&lt;p&gt;The Scatter-Gather pattern can solve this problem. The structure of the Scatter-Gather is like a tree, with the application controller acting as the root. When the controller receives an incoming request, it divides it into multiple independent tasks and assigns them to available leaf nodes, the “scatter” phase. Leaf nodes are multiple machines or containers available on a distributed network. Each processor leaf works independently and in parallel on its computation, producing a portion of the response. Once they have completed their task, each leaf sends its partial response back to the root, which collects them all as part of the “gather” phase. The root controller then combines the partial responses and returns the final result to the client. The diagram below pictures the pattern.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkhzajz9qdx52cs5cjtg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkhzajz9qdx52cs5cjtg.png" alt="Scatter-Gather Pattern" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;
Scatter-Gather pattern illustration



&lt;p&gt;The strategy enables us to exploit cloud infrastructure to allocate as many virtual machines as needed and scale horizontally. The application can distribute the load dynamically to achieve the desired response time. If a particular leaf node has a high response time (e.g., due to noisy neighbors), the root controller can also redistribute the load for a quicker response. Let us examine a use case in the passage below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Case
&lt;/h2&gt;

&lt;p&gt;Now that we understand the pattern, let's explore a practical use case where it can demonstrate remarkable effectiveness despite its apparent simplicity. Imagine a website of a rail company that sells tickets to its customers. Suppose a customer plans a weekend trip from London and wants to optimize expenses by identifying how far he can travel with the same budget. He submits a query to the website to list all direct trains departing from London throughout the country.&lt;/p&gt;

&lt;p&gt;One approach to handle this task is to send individual queries to each rail operator in the UK, collect the results, and then present them to the user. However, this will be impractical, as the application issues a query at a time. To improve the efficiency of this solution, we can divide the UK into five regions: Eastern, Northwest and Central, Wales and Western, Scotland, and Southern. When a request arrives, the root controller divides it and assigns it to the five leaf nodes to process in parallel. Each leaf node concentrates on a specific region, which reduces the need to search the entire country. Each leaf node returns a list of all the direct trains from London to that region. Finally, the root controller merges all the results to create a final list to display to the customer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation Details
&lt;/h2&gt;

&lt;p&gt;The previous section has demonstrated a practical use case for improving the scalability of a web application. However, it is essential to consider the following points before adopting this tactic:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Handling non-responsive leaf nodes
&lt;/h3&gt;

&lt;p&gt;Even though the applications are using a cloud environment, there is always a possibility that machines may become unavailable due to network or infrastructure issues. Moreover, the leaf nodes might communicate with external APIs (as we saw in the example use case previously) that may not respond promptly. To mitigate these issues, the root controller must set an upper limit on response time, how long it can wait for a reply. If a leaf node does not respond within that time, the root controller can ignore it and aggregate the results it has already gathered to formulate a response for the user. This approach can minimize the impact on the user by sacrificing a small portion of the result.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Decoupling the root controller from processing leaf nodes
&lt;/h3&gt;

&lt;p&gt;It's crucial to avoid coupling the root controller with the leaf nodes to improve the architecture. A tight coupling between them would mean that the root controller continuously tracks working leaf nodes, leading to unnecessary overhead on the application. Instead, we can use a message broker. A pub-sub communication style can create a loosely coupled root controller and leaf nodes. Whenever there is an incoming request, the root controller broadcasts messages to the potential working leaf nodes. All the working nodes can then subscribe to the incoming message, process it, and publish their results to a separate queue. The root controller can consume the results from that queue, aggregate them, and respond to the user. The figure below illustrates the implementation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r9n1eh4qrsoik58a9tv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r9n1eh4qrsoik58a9tv.png" alt="Scatter-Gather Pattern Implementation" width="800" height="429"&gt;&lt;/a&gt;Scatter-Gather pattern implementation for decoupled root controller&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Asynchronous request processing
&lt;/h3&gt;

&lt;p&gt;The pattern implementation discussed so far works best for immediate responses, ranging from a few milliseconds to a second. However, this implementation would not work for computation-intensive tasks, which can consume minutes to hours. Some examples of these computational tasks include data-intensive applications such as scientific simulations, data analytics, or machine learning. To effectively tackle these scenarios, it is essential to divide the root controller into two distinct components: a dispatcher and a processor. This division would enable us to process requests asynchronously. Below are the steps for such asynchronous communication.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; When a request comes in, the dispatcher accepts the request and generates a unique identifier. The dispatcher replies to the user with an estimated time to finish the task and provides the previously generated unique identifier to track the request.&lt;/li&gt;
&lt;li&gt; The request is then published to the leaf nodes.&lt;/li&gt;
&lt;li&gt; The leaf nodes process the request and send their results to a queue subscribed by the processor.&lt;/li&gt;
&lt;li&gt; The processor service combines the results received from individual processor leaves and persists them into a database.&lt;/li&gt;
&lt;li&gt; Once the estimated time has elapsed, the user can provide the unique identifier to fetch the result. If the result is unavailable within the estimated time, the processor can either request the user to check later or provide a partial result. &lt;/li&gt;
&lt;/ol&gt; 

&lt;p&gt;The figure shows a step-by-step asynchronous implementation. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ucibcgzs5a01z2679cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ucibcgzs5a01z2679cw.png" alt="Scatter-Gather Pattern Asynch Implementation" width="800" height="470"&gt;&lt;/a&gt;Scatter-Gather pattern asynchronous implementation&lt;/p&gt;

&lt;h2&gt;
  
  
  Important Considerations – Number of Leaf Nodes
&lt;/h2&gt;

&lt;p&gt;After seeing the implementation in the previous section, the next crucial step is to choose the optimum number of leaf nodes. The pattern seems to suggest that adding more leaf processors and increasing parallelization can improve efficiency, but it comes at the cost of managing overhead. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When a request comes in, the root controller must divide it, send it to the distribution infrastructure, and so on. While the cost of splitting, reading, and writing from the network is negligible at first compared to the computation logic, this cost grows as we scale leaf nodes. If parallelization continues, the overhead may exceed the computation cost.&lt;/li&gt;
&lt;li&gt;The next consideration is that the root controller waits for the result from all leaf nodes, which means the overall response time depends on the slowest node. It is commonly known as the "straggler" problem, and it can considerably delay the system's completion time due to a single slow node. To mitigate the straggler problem, established techniques such as speculative execution and dynamic partitioning can distribute the load evenly.&lt;/li&gt;
&lt;li&gt;The most favourable number of leaf nodes also depends on the availability and accuracy of service. Suppose a service wants to achieve 97% availability without sacrificing the result, and the cloud vendor environment provides a leaf node at 99% availability. In this case, choosing scatter-gather seems to be the right choice. However, a careful calculation reveals that the service can have at most three processing leaves. Adding a fourth processing leaf might lead to an SLA breach, due to the probability of node failure (&lt;code&gt;0.99 × 0.99 × 0.99 × 0.99 == 0.96&lt;/code&gt;). It gets even worse if we add more leaves.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Therefore, choosing the number of leaf nodes is critical for designing a successful scatter-gather implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The scatter-gather pattern is a distributed computing pattern. The pattern has several advantages such as improved performance, increased fault tolerance, and better scalability. However, the choice of the optimal number of processing leaf nodes is vital to achieving high performance. Overall, the scatter-gather pattern is a powerful tool for developing high-performing distributed applications.&lt;/p&gt;

&lt;p&gt;Originally published on &lt;a href="https://www.gaurgaurav.com/patterns/scatter-gather/" rel="noopener noreferrer"&gt;https://www.gaurgaurav.com/patterns/scatter-gather/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>architecture</category>
      <category>designpatterns</category>
      <category>scalability</category>
    </item>
    <item>
      <title>Can I Code Without My Laptop?</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Wed, 08 Mar 2023 13:32:26 +0000</pubDate>
      <link>https://dev.to/gauravgaur/can-i-code-without-my-laptop-3fia</link>
      <guid>https://dev.to/gauravgaur/can-i-code-without-my-laptop-3fia</guid>
      <description>&lt;h2&gt;
  
  
  Learning Adaptability
&lt;/h2&gt;

&lt;p&gt;A few weeks ago, my laptop crashed during a meeting. It was painful as I was about to start on an exciting new feature that my Product Owner (PO) had just proposed. I immediately rushed to the IT department for assistance, and they informed me that they needed to take a backup and completely rebuild my laptop. They estimated that rebuilding would take slightly over a half day to complete.&lt;/p&gt;

&lt;p&gt;Feeling frustrated, I asked myself: "Can I code without my laptop?". In the past, I would have answered 'NO' without hesitation. But on second thought, I realized that I know my system well and am also familiar with the domain. After more introspection, I recognized that I was already doing it without consciously realizing it. So, I went to my PO and requested him to print the new requirements for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Requirements to Success Criteria
&lt;/h2&gt;

&lt;p&gt;There are numerous factors that a software engineer must consider before writing even a single line of code. First and foremost is understanding the business problem and who the actors are. Once you have a clear understanding of the requirements, it enables you to identify any flaws in the requirements or if it contradicts any existing features. You can then break it down into manageable pieces and think about how to reuse those pieces or determine if something already exists. This process helps you to define the final success criteria.&lt;/p&gt;

&lt;h2&gt;
  
  
  Strategies and Considerations
&lt;/h2&gt;

&lt;p&gt;Once you understand the problem landscape, the next step is to start thinking about solutions and strategies. Consider whether the operation will be compute-intensive or data-intensive. Can you offload any work to the client to reduce the server load? Are there any successful known solutions, patterns, or techniques that can be utilized? Should the results be cached, and if so, where? Additionally, consider breaking down the feature and delegating work to other team members to work in parallel.&lt;/p&gt;

&lt;p&gt;In addition to the technical considerations, it's crucial to consider the nature of the application you're developing. Is it a web application or an API? You must also consider who will consume the service - web clients, iOS, Android, B2B, and B2C clients. Additionally, you need to focus on contracts and communication channels, both of which are crucial components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Development
&lt;/h2&gt;

&lt;p&gt;Have we discussed security yet? Are you planning to place this new feature behind already available authentication flows and firewalls? Have you considered data in transit and data at rest? Are there any alerting mechanisms in place in case anything goes wrong?&lt;/p&gt;

&lt;p&gt;So far, everything looks perfect. You know the problem, the strategy to develop the solution, the consuming client, deployment, and security. Once the feature is ready, it will deploy to production. However, have you considered what happens when it's in production? Do you need any configuration changes? Are there any potential obstacles to scaling the application? How will you address any performance issues that arise in production? Is there a prebuilt dashboard for reporting the critical metrics of the new feature?&lt;/p&gt;

&lt;h2&gt;
  
  
  Producing Robust and Maintainable Code
&lt;/h2&gt;

&lt;p&gt;Ahh, we have listed almost everything, and now it's time to start writing code. But, before you begin, you should consider the testability and maintainability of your code. You first think about your test before the code. Test Driven Development (TDD) should guide your development process to build a robust feature. This technique can help you solve problems more effectively and efficiently.&lt;/p&gt;

&lt;p&gt;Now that you have completed the necessary groundwork, it's time to translate your well-thought-out heuristic into code using your preferred programming language and claim the story points.&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey to Deliver High-Quality
&lt;/h2&gt;

&lt;p&gt;Junior developers may not have developed the ability to think that comprehensively yet, while seasoned software engineers know what it takes to deliver a component. And as you progress to be a tech lead, you will perform similar tasks, but for many components, simultaneously. Although it may seem like a lot of hard work, once you start doing it, it will become more intuitive. The only tedious part of this entire process is actually typing the code and committing it, for which I need my laptop.&lt;/p&gt;

&lt;p&gt;Originally published on &lt;a href="https://www.gaurgaurav.com/2023/random/can-i-code-without-my-laptop/" rel="noopener noreferrer"&gt;https://www.gaurgaurav.com/2023/random/can-i-code-without-my-laptop/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>motivation</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Pipes And Filters Pattern - Streamlining Data Processing in Distributed Systems</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Mon, 06 Mar 2023 14:09:18 +0000</pubDate>
      <link>https://dev.to/gauravgaur/pipes-and-filters-pattern-streamlining-data-processing-in-distributed-systems-3k83</link>
      <guid>https://dev.to/gauravgaur/pipes-and-filters-pattern-streamlining-data-processing-in-distributed-systems-3k83</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Applications today collect an infinite amount of data. Many applications need to transform this data before applying any meaningful business logic. Tackling this complex data or a similar processor intensive task without a thought-through strategy can have a high-performance impact. This article introduces a scalability pattern – pipes and filters – that promotes reusability and is appropriate for such scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem Context
&lt;/h2&gt;

&lt;p&gt;Consider a scenario where incoming data triggers a sequence of processing steps, where each step brings data closer to the desired output state. The origin of data is referred to as a data source. Examples of data sources could be home IoT devices, a video feed from roadside cameras, or continuous inventory updates from warehouses. The processing steps during the transformation usually execute a specific operation and are referred to as filters. These processing steps are independent and do not have a side-effect, i.e., running a step does not depend on any other steps. Each filtering step reads the data, performs a transforming operation based on local data and produces an output. Once the data has gone through the filters, it reaches its final processed stage where it is consumed, referred to as Data Sink.&lt;br&gt;
A straightforward implementation could be a complete service that takes the data input, performs all the steps sequentially and produce an output. The modules within the service perform the required step and pass on the data to the next module. Although the solution initially looks good as it hides all the complexity of data processing, the use of such a monolithic service will have listed problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The solution limits code reuse.&lt;/li&gt;
&lt;li&gt;Any change in a processing filter step will lead to a release of all the filters.&lt;/li&gt;
&lt;li&gt;The slowest processing filter step can become a bottleneck impacting the overall throughput of the service.&lt;/li&gt;
&lt;li&gt;As the solution scales, it will scale all the processing steps. Such scaling will lead to excessive resource utilisation in the cloud when not intended.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thus, the above approach is inflexible, non-scalable and against &lt;a href="https://en.wikipedia.org/wiki/Reusability" rel="noopener noreferrer"&gt;reusability&lt;/a&gt;{:target="_blank"}. A good solution must address all the above concerns. Let us try to find a solution to this in the next section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27xjp6tjoko1pdyf1etr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27xjp6tjoko1pdyf1etr.png" alt="Monolithic Service" width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;We can improve the suboptimal solution from the previous section by splitting the monolithic service into a series of components or functions, each performing a single processing filter step. These functions are combined to form a pipeline where functions receive a standard input and produce an accepted output. Such a decomposition will introduce loose coupling into the solution. It would allow effortless removal, replacement, rearrangement, or plug-in of a new filter step in pipelines. Moreover, it will enable code reuse if we need a similar processing filter in any other pipeline, the existing filters can be shared.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnnwd2gdj18mx1zam98n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnnwd2gdj18mx1zam98n.png" alt="Pipes and Filters Solution" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution also addresses the issue of the slowest processing filter step being a bottleneck, as it provides an opportunity to scale individual functions. The slowest running function can run parallel instances to spread the load and improve throughput. The individual scaling of components will also save us from any extra costs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxr26z21pvpeeov4dbqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxr26z21pvpeeov4dbqr.png" alt="Pipes and Filters Solution" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, the processing filters can take advantage of cloud infrastructure. For instance, we can request a specific virtual machine based on the behavior of a filter - processor-intensive or memory-intensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use this pattern
&lt;/h2&gt;

&lt;p&gt;As we now have a better knowledge of the pattern, this section explores when to think about the pattern.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The pattern is valuable for breaking down complex processing workflows, where each step is independent.&lt;/li&gt;
&lt;li&gt;The processing steps have distinctive hardware needs or scalability requirements, and, in some cases, even preferred programming language requirements.&lt;/li&gt;
&lt;li&gt;The pattern can address flexibility concerns in workflows where requirements and business processes are changing constantly.&lt;/li&gt;
&lt;li&gt;The pattern is efficient in removing bottlenecks in workflows by parallel and distributed processing of individual steps. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Important Considerations
&lt;/h2&gt;

&lt;p&gt;The pattern has many advantages but consider the below points before adopting this pattern.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The increased flexibility and clear separation come at the expense of complexity, especially when individual filter steps are too granular. Moreover, transferring data and communication between filters is an overhead.&lt;/li&gt;
&lt;li&gt;There is always a risk of losing the messages between the filters; thus, a thought-through strategy is needed to mitigate these scenarios.&lt;/li&gt;
&lt;li&gt;Like above, there is also a need for a recovery strategy if a pipeline fails. Can a new message be injected into the pipeline, or is there a provision to save the state of the pipeline?&lt;/li&gt;
&lt;li&gt;Each filter step must be stateless and must have sufficient context. Since these filter steps operate in isolation, each filter must be provided with enough inputs to work.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Implementation Details
&lt;/h2&gt;

&lt;p&gt;Multiple implementations of the pattern are possible based on the nature of the solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dynamic Pipeline Behavior
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data-Driven Strategy&lt;/strong&gt;: &lt;br&gt;
It is also known as a push strategy. The data source writes a message into the pipeline. Filters read the incoming message, process it, and push it further. Finally, the message reaches the data sink, where it is consumed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Demand-Driven Strategy&lt;/strong&gt;: &lt;br&gt;
A data-driven strategy pushes the message through the pipeline, while in a demand-driven strategy, a message is pulled. Whenever the data sink initiates a read, the data source produces a new message. The filters then process the new message, and the final transformed result is sent to the data sink in response to the original call.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fad4p0gabnrdvi7tv9srq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fad4p0gabnrdvi7tv9srq.jpg" alt="Pipes and Filters Dynamic Pipeline Behaviour" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Message Behavior
&lt;/h3&gt;

&lt;p&gt;During the discussions until now, we notice that the message travels through the pipeline, typically via message brokers. However, we can skip sending the entire data through the pipeline. An alternative could be to store the data at a temporary location on a distributed file system or in a preferred database. Each filter step can pass the storage location of the data from where it can be read.&lt;/p&gt;

&lt;p&gt;The implementation reduces the data travelling through the pipe. Moreover, the latest state of the data is always persisted in case the pipeline fails. But the disadvantage of the implementation is that it increases I/O operations, which increases the chances of exceptions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhygwmx5vh046d8vtzwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhygwmx5vh046d8vtzwy.png" alt="Pipes and Filters Dynamic Message Behaviour" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Filter Behavior
&lt;/h3&gt;

&lt;p&gt;The number of filters should be developed carefully in a pipeline. While designing filters, it is wise to break down a large filter into multiple constituent steps to minimize the complexity. On the other hand, filters that are light on processing can be combined into a single step to reduce the overhead. Filter steps introduced in a pipeline should be good enough to maximize concurrency, but small enough to minimize the overhead of transferring data through the pipeline stages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sample Use case
&lt;/h2&gt;

&lt;p&gt;Previous sections have made clear how to use this pattern. This section provides an example to explain pattern usage. Let us say we are collecting a continuous stream of data for a machine learning project. Since the data is collected from multiple sources, the raw data could be in different formats, incomplete, or dirty. Raw data must be cleaned and structured before conducting any analysis on it. Data cleaning is a tedious and time-consuming process but is a necessary step to get a quality result. The data cleaning process consists of six steps, specifically&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Remove duplicates,&lt;/li&gt;
&lt;li&gt;remove irrelevant data,&lt;/li&gt;
&lt;li&gt;fix structural errors,&lt;/li&gt;
&lt;li&gt;filter unwanted outliers,&lt;/li&gt;
&lt;li&gt;handle missing data, and finally&lt;/li&gt;
&lt;li&gt;validate your data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Although we can write a service that hides the complexity of data cleaning behind, it would have the same demerits as were listed earlier. It would be worth creating a pipeline for the data cleaning, as a couple of steps in the above pipeline may need specialized processing and hardware. Furthermore, there are multiple off-the-shelf tools available that can be used in the pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In the end, I would say that pattern helps create scalable applications. The pattern resembles a water supply system, where a stream of water flows through the channel via various filters. The number of filters installed on the supply channel is based on the final usage of water. For example, water supplied to a household will pass through more filters than water supplied for irrigation.&lt;/p&gt;

&lt;p&gt;Originally published on &lt;a href="https://www.gaurgaurav.com/patterns/pipes-and-filters/" rel="noopener noreferrer"&gt;https://www.gaurgaurav.com/patterns/pipes-and-filters/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>architecture</category>
      <category>designpatterns</category>
      <category>scalability</category>
    </item>
    <item>
      <title>Load Balancing Pattern: A Must For Scalability</title>
      <dc:creator>Gaurav Gaur</dc:creator>
      <pubDate>Tue, 28 Feb 2023 10:47:14 +0000</pubDate>
      <link>https://dev.to/gauravgaur/load-balancing-pattern-a-must-for-scalability-479i</link>
      <guid>https://dev.to/gauravgaur/load-balancing-pattern-a-must-for-scalability-479i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Any modern website on the internet today receives thousands of hits, if not millions. Without any scalability strategy, the website is either going to crash or significantly degrade in performance. A situation we want to avoid. As a known fact, adding more powerful hardware or scaling vertically will only delay the problem. However, adding multiple servers or scaling horizontally, without a well-thought-through approach, may not reap the benefits to their full extent.&lt;/p&gt;

&lt;p&gt;The recipe for creating a highly scalable system in any domain is to use proven software architecture patterns. Software architecture patterns enable us to create cost-effective systems that can handle billions of requests and petabytes of data. The article describes the most basic and popular scalability pattern known as Load Balancing. The concept of Load Balancing is essential for any developer building a high-volume traffic site in the cloud. The article first introduces the Load balancer, then discusses the type of Load balancers, next is load balancing in the cloud, followed by Open-source options and finally a few pointers to choose load balancers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Load Balancer?
&lt;/h2&gt;

&lt;p&gt;A load balancer is a traffic manager that distributes incoming client requests across all servers that can process them. The pattern helps us realize the full potential of cloud computing by minimizing the request processing time and maximizing capacity utilization. The traffic manager dispatches the request only to the available servers, and hence, the pattern works well with scalable cloud systems. Whenever a new server is added to the group, the load balancer starts dispatching requests to it and scales up. On the contrary, if a server goes down, the dispatcher redirects requests to other available servers in the group and scales down, which helps us save money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Load Balancers
&lt;/h2&gt;

&lt;p&gt;After getting the basics of Load Balancer, the next is to familiarize with the load balancing algorithms. There are broadly 2 types of load balancing algorithms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Static Load Balancers
&lt;/h3&gt;

&lt;p&gt;Static load balancers distribute the incoming traffic equally as per the algorithms. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Round Robin&lt;/strong&gt; is the most fundamental and default algorithm to perform load balancing. It distributes the traffic sequentially to a list of servers in a group. The algorithm assumes that the application is stateless and each request from the client can be handled in isolation. Whenever a new request comes in it goes to the next available server in the sequence. As the algorithm is basic, it is not suited for most cases.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Weighted Round Robin&lt;/strong&gt; is a variant of round robin where administrators can assign weightage to servers. A server with a higher capacity will receive more traffic than others. The algorithm can address the scenario where a group has servers of varying capacities.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Sticky Session&lt;/strong&gt; also known as the Session Affinity algorithm is best suited when all the requests from a client need to be served by a specific server. The algorithm works by identifying the requests coming in from a particular client. The client can be identified either by using the cookies or by the IP address. The algorithm is more efficient in terms of data, memory and using cache but can degrade heavily if a server start getting stuck with excessively long sessions. Moreover, if a server goes down, the session data will be lost.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;IP Hash&lt;/strong&gt; is another way to route the requests to the same server. The algorithm uses the IP address of the client as a hashing key and dispatches the request based on the key. Another variant of this algorithm uses the request URL to determine the hash key.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dynamic Load Balancers
&lt;/h3&gt;

&lt;p&gt;Dynamic load balancers, as the name suggests, consider the current state of each server and dispatch incoming requests accordingly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Least Connection&lt;/strong&gt; dispatches the traffic to the server with the fewest number of connections. The assumption is that all the servers are equal and the server having a minimum number of connections would have the maximum resources available.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Weighted Least Connection&lt;/strong&gt; is another variant of least connection. It provides an ability for an administrator to assign weightage to servers with higher capacity so that requests can be distributed based on the capacity.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Least Response Time&lt;/strong&gt; considers the response time along with the number of connections. The requests are dispatched to the server with the fewest connections and minimum average response time. The principle is to ensure the best service to the client.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Adaptive or Resource-based&lt;/strong&gt; dispatches the load and makes decisions based on the resources i.e., CPU and memory available on the server. A dedicated program or agent runs on each server that measures the available resources on a server. The load balancer queries the agent to decide and allocate the incoming request.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Load Balancing in Cloud
&lt;/h2&gt;

&lt;p&gt;A successful cloud strategy is to use load balancers with Auto Scaling. Typically, cloud applications are monitored for network traffic, memory consumption and CPU utilization. These metrics and trends can help define the scaling policies to add or remove the application instances dynamically. A load balancer in the cloud considers the dynamic resizing and dispatches the traffic based on available servers. The section below describes a few of the popularly known solutions in the cloud:&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS - Elastic Load Balancing (ELB)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/elasticloadbalancing/" rel="noopener noreferrer"&gt;Amazon ELB&lt;/a&gt; is highly available and scalable load balancing solution. It is ideal for applications running in AWS. Below are 4 different choices of Amazon ELB to pick from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://aws.amazon.com/elasticloadbalancing/application-load-balancer/" rel="noopener noreferrer"&gt;Application Load Balancer&lt;/a&gt; used for load balancing of HTTP and HTTPS traffic.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://aws.amazon.com/elasticloadbalancing/network-load-balancer/" rel="noopener noreferrer"&gt;Network Load Balancer&lt;/a&gt; is used for load balancing both TCP, UDP and TLS traffic. &lt;/li&gt;
&lt;li&gt;  &lt;a href="https://aws.amazon.com/elasticloadbalancing/gateway-load-balancer/" rel="noopener noreferrer"&gt;Gateway Load Balancer&lt;/a&gt; is used to deploy, scale, and manage third-party virtual appliances. &lt;/li&gt;
&lt;li&gt;  &lt;a href="https://aws.amazon.com/elasticloadbalancing/classic-load-balancer/" rel="noopener noreferrer"&gt;Classic Load Balancer&lt;/a&gt; is used for load balancing across multiple EC2 instances. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GCP – Cloud Load Balancing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/load-balancing" rel="noopener noreferrer"&gt;Google Cloud Load Balancing&lt;/a&gt; is a highly performant and scalable offering from Google. It can support up to 1 million+ queries per second. It can be divided into 2 major categories i.e., internal, and external. Each major category is further classified based on the incoming traffic. Below are a few load balancer types.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://cloud.google.com/load-balancing/docs/l7-internal" rel="noopener noreferrer"&gt;Internal HTTP(S) Load Balancing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.google.com/load-balancing/docs/internal" rel="noopener noreferrer"&gt;Internal TCP/UDP Load Balancing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.google.com/load-balancing/docs/https" rel="noopener noreferrer"&gt;External HTTP(S) Load Balancing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.google.com/load-balancing/docs/network" rel="noopener noreferrer"&gt;External TCP/UDP Network Load Balancing&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A complete guide to compare all the available load balancers can be found on the &lt;a href="https://cloud.google.com/load-balancing/docs/choosing-load-balancer" rel="noopener noreferrer"&gt;Google load balancer page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Microsoft Azure Load Balancer
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://azure.microsoft.com/en-us/services/load-balancer/" rel="noopener noreferrer"&gt;Microsoft Azure load balancing&lt;/a&gt; solution provides 3 different types of load balancers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview" rel="noopener noreferrer"&gt;Standard Load Balancer&lt;/a&gt; - Public and internal Layer 4 load balancer&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learn.microsoft.com/en-us/azure/load-balancer/gateway-overview" rel="noopener noreferrer"&gt;Gateway Load Balancer&lt;/a&gt; - High performance and high availability load balancer for third-party Network Virtual Appliances.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learn.microsoft.com/en-us/azure/load-balancer/skus" rel="noopener noreferrer"&gt;Basic Load Balancer&lt;/a&gt; - Ideal for small scale application&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Open-Source Load Balancing Solution
&lt;/h2&gt;

&lt;p&gt;Although a default choice is always to use the vendor specific cloud load balancer, there are a few open-source load balancer options available. Below is a couple of those.&lt;/p&gt;

&lt;h3&gt;
  
  
  NGINX
&lt;/h3&gt;

&lt;p&gt;NGINX provides &lt;a href="https://www.nginx.com/products/nginx/" rel="noopener noreferrer"&gt;NGINX Plus&lt;/a&gt; and &lt;a href="https://nginx.org/en/" rel="noopener noreferrer"&gt;NGINX&lt;/a&gt;, modern load balancing solutions. There are many popular websites including Dropbox, Netflix and Zynga, that are using load balancers from NGINX. The NGINX load balancing solutions are high performance and can help improve the efficiency and reliability of a high traffic website.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloudflare
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.cloudflare.com/load-balancing/" rel="noopener noreferrer"&gt;Cloudflare&lt;/a&gt; is another popular load balancing solution. It offers different tiers of load balancer to meet specific customer needs. Pricing plans are based on the services, health checks and security provided.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Zero Trust platform plans&lt;/li&gt;
&lt;li&gt;  Websites &amp;amp; application services plans&lt;/li&gt;
&lt;li&gt;  Developer platform plans&lt;/li&gt;
&lt;li&gt;  Enterprise plan&lt;/li&gt;
&lt;li&gt;  Network services&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing Load Balancer
&lt;/h2&gt;

&lt;p&gt;It is evident from the sections above that a load balancer can have a big impact on the applications. Thus, picking up the right solution is essential. Below are a few considerations to make the decision.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Identifying the short term and long-term goals of a business can help drive the decision. The business requirements should help identify the expected traffic, growth regions and region of the service. Business considerations should also include the level of availability, the necessity of encryptions or any other security concerns that need to be addressed.&lt;/li&gt;
&lt;li&gt;  There are ample options available in the market. Identifying the necessary features for the application can help pick the right solution. As an example, the load balancer should be able to handle the incoming traffic for the application such as HTTP/HTTPS or SSL or TCP. Another example is a load balancer used for internal traffic has different security concerns than external load balancers.&lt;/li&gt;
&lt;li&gt;  Cloud vendors provide various support tiers and pricing plans. A detailed comparison of the total cost of ownership, features and support tier can help identify the right choice for the project. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most experts agree that it is a best practice to use a load balancer to manage the traffic which is critical to cloud applications. With the use of a load balancer, applications can serve the requests better and also save costs. &lt;/p&gt;

</description>
      <category>cloud</category>
      <category>architecture</category>
      <category>scalability</category>
      <category>designpatterns</category>
    </item>
  </channel>
</rss>
