<?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>Forem: Akshat Jain</title>
    <description>The latest articles on Forem by Akshat Jain (@akshatjme).</description>
    <link>https://forem.com/akshatjme</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%2F3792066%2Fbb56929c-3411-4d44-9737-f4b6d57a235c.png</url>
      <title>Forem: Akshat Jain</title>
      <link>https://forem.com/akshatjme</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/akshatjme"/>
    <language>en</language>
    <item>
      <title>How to Choose the Right Tech Stack for Your Project</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Mon, 25 May 2026 16:37:37 +0000</pubDate>
      <link>https://forem.com/akshatjme/how-to-choose-the-right-tech-stack-for-your-project-4cbj</link>
      <guid>https://forem.com/akshatjme/how-to-choose-the-right-tech-stack-for-your-project-4cbj</guid>
      <description>&lt;p&gt;If you’ve ever tried to start a project, you’ve probably faced this moment.&lt;/p&gt;

&lt;p&gt;You open your laptop, ready to build something.&lt;/p&gt;

&lt;p&gt;Then the questions start.&lt;br&gt;&lt;br&gt;
Should you use React or something simpler?&lt;br&gt;&lt;br&gt;
Is Node.js enough, or should you go with Django?&lt;br&gt;&lt;br&gt;
Do you need MongoDB, or is PostgreSQL a better choice?&lt;br&gt;&lt;br&gt;
And then there’s Svelte, Next.js, Flask, Ruby on Rails… the list just keeps growing.&lt;/p&gt;

&lt;p&gt;Suddenly, instead of building, you’re stuck comparing tools.&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%2Fk5m11ya9adjtmm0kevu8.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%2Fk5m11ya9adjtmm0kevu8.png" alt="How to Choose the Right Tech Stack for Your Project" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where most beginners get trapped. Not because they lack skills, but because the ecosystem is overwhelming. Every framework claims to be faster. Every database promises better performance. Every developer online has a different opinion.&lt;/p&gt;

&lt;p&gt;And the worst part is, it feels like choosing the wrong tech stack could ruin your entire project.&lt;/p&gt;

&lt;p&gt;But here’s the reality.&lt;/p&gt;

&lt;p&gt;There is no perfect tech stack.&lt;/p&gt;

&lt;p&gt;There is no universal combination of frontend, backend, and database that works for every project. What works for a startup building fast might completely fail in an enterprise system. What works for a real-time app might be overkill for a simple blog.&lt;/p&gt;

&lt;p&gt;The goal is not to find the best stack.&lt;/p&gt;

&lt;p&gt;In this guide, we’re going to break things down from first principles. You’ll learn how frontend, backend, and databases actually differ, how popular technologies compare in real-world scenarios, and most importantly, how to make decisions without getting stuck.&lt;/p&gt;

&lt;p&gt;By the end, you won’t just know options.&lt;/p&gt;

&lt;p&gt;You’ll know how to think.&lt;/p&gt;

&lt;h3&gt;
  
  
  Breaking Down a Tech Stack (Conceptual Understanding)
&lt;/h3&gt;

&lt;p&gt;Before comparing frameworks or databases, you need a clear mental model.&lt;/p&gt;

&lt;p&gt;A tech stack is not just a list of tools. It’s a system made of three core layers working together.&lt;/p&gt;

&lt;p&gt;Think of it like this.&lt;/p&gt;

&lt;p&gt;Every application, whether it’s a simple blog or a complex SaaS product, follows the same flow. A user interacts with something on the screen. That action sends a request somewhere. That request gets processed. Data is stored or retrieved. And then a response is sent back.&lt;/p&gt;

&lt;p&gt;That entire cycle is your tech stack in action.&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;

&lt;p&gt;At the top, you have the &lt;strong&gt;frontend&lt;/strong&gt;. This is everything the user sees and interacts with. Buttons, forms, dashboards, animations. Technologies like React, Vue, or even simple HTML and CSS live here. Its job is not to make decisions, but to present information and capture user input.&lt;/p&gt;

&lt;p&gt;Behind that sits the &lt;strong&gt;backend&lt;/strong&gt;. This is where decisions happen. When a user logs in, submits a form, or requests data, the backend processes that request. It applies business logic, handles authentication, and communicates with the database. Frameworks like Node.js with Express, Django, Flask, Spring Boot, or Ruby on Rails operate in this layer.&lt;/p&gt;

&lt;p&gt;Finally, there’s the &lt;strong&gt;database&lt;/strong&gt;. This is the memory of your application. It stores users, transactions, content, and everything your system needs to remember. Whether it’s structured systems like PostgreSQL or flexible ones like MongoDB, this layer is responsible for persistence.&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%2F6f3nundn5cu3386hjo2e.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%2F6f3nundn5cu3386hjo2e.png" width="770" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s important is not just knowing these layers exist, but understanding how they interact.&lt;/p&gt;

&lt;p&gt;The frontend never talks directly to the database. The backend acts as a bridge. It receives requests from the frontend, fetches or updates data in the database, and sends back a response.&lt;/p&gt;

&lt;p&gt;Once you understand this flow, choosing technologies becomes much simpler.&lt;/p&gt;

&lt;p&gt;You’re no longer picking random tools.&lt;/p&gt;

&lt;p&gt;You’re designing a system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend Technologies (How to Think About Them)
&lt;/h3&gt;

&lt;p&gt;When people start learning frontend, they usually jump straight into comparing frameworks.&lt;/p&gt;

&lt;p&gt;React vs Vue. Angular vs Svelte. Next.js vs everything else.&lt;/p&gt;

&lt;p&gt;But that’s the wrong starting point.&lt;/p&gt;

&lt;p&gt;Before choosing a framework, you need to understand the &lt;strong&gt;type of frontend you actually need&lt;/strong&gt;. Because in many cases, you might not need a heavy framework at all.&lt;/p&gt;

&lt;p&gt;Let’s start from the simplest level.&lt;/p&gt;

&lt;p&gt;At one end, you have &lt;strong&gt;static pages&lt;/strong&gt;. These are built using plain HTML, CSS, and a little JavaScript. There’s no complex state, no heavy interactivity. Think blogs, landing pages, portfolios. They load fast, are easy to deploy, and require minimal maintenance. For many projects, this is more than enough.&lt;/p&gt;

&lt;p&gt;As your application becomes more interactive, you move toward &lt;strong&gt;Single Page Applications (SPAs)&lt;/strong&gt;. This is where frameworks like React, Vue, and Angular come in. Instead of reloading the entire page, the UI updates dynamically. This is ideal for dashboards, admin panels, or apps where users interact frequently.&lt;/p&gt;

&lt;p&gt;Then comes a more advanced approach: &lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt; and &lt;strong&gt;Static Site Generation (SSG)&lt;/strong&gt;. Tools like Next.js combine frontend and backend thinking. Pages can be rendered on the server for better performance and SEO, or pre-generated for speed. This is why modern applications often prefer these hybrid approaches.&lt;/p&gt;

&lt;p&gt;Now let’s talk about frameworks, not as tools, but as philosophies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt; is flexible. It gives you control, but also responsibility. You decide how things are structured. This is why it dominates startups and large-scale apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vue&lt;/strong&gt; sits in the middle. It’s easier to learn, more guided than React, but still flexible enough for most use cases. A great choice if you want simplicity without losing power.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Angular&lt;/strong&gt; is different. It’s opinionated and structured. Everything has a defined way. That makes it harder to learn, but extremely powerful for large teams building enterprise systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Svelte&lt;/strong&gt; takes a completely different approach. It compiles your code at build time, which means less runtime overhead and better performance. It’s simple, fast, and increasingly popular for lightweight applications.&lt;/p&gt;

&lt;p&gt;And then there’s &lt;strong&gt;Next.js&lt;/strong&gt;, which is not just a frontend tool anymore. It brings routing, backend capabilities, and rendering strategies together, making it a strong default choice for modern full stack applications.&lt;/p&gt;

&lt;p&gt;The key idea is this.&lt;/p&gt;

&lt;p&gt;You don’t choose a frontend framework because it’s popular.&lt;/p&gt;

&lt;p&gt;You choose it based on how much complexity your interface actually needs.&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%2Fqwicjiskvn037tlsin6l.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%2Fqwicjiskvn037tlsin6l.png" width="799" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Backend Technologies (System Design Perspective)
&lt;/h3&gt;

&lt;p&gt;If the frontend is what users see, the backend is what actually makes your application work.&lt;/p&gt;

&lt;p&gt;This is where most of the real decision-making happens.&lt;/p&gt;

&lt;p&gt;Every time a user logs in, uploads something, or requests data, the backend is responsible for handling it. It validates input, applies business rules, talks to the database, and sends a response back. In simple terms, it is the brain of your system.&lt;/p&gt;

&lt;p&gt;But unlike frontend, backend choices are less about visuals and more about &lt;strong&gt;tradeoffs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Different backend technologies are built with different philosophies.&lt;/p&gt;

&lt;p&gt;Start with &lt;strong&gt;JavaScript-based backends.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node.js&lt;/strong&gt; with frameworks like &lt;strong&gt;Express&lt;/strong&gt; or &lt;strong&gt;NestJS&lt;/strong&gt; is extremely popular, especially for startups. The biggest advantage is using the same language across frontend and backend. It’s lightweight, fast to build with, and works particularly well for real-time applications like chats or live dashboards because of its non-blocking nature.&lt;/p&gt;

&lt;p&gt;Then you have &lt;strong&gt;Python-based frameworks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django&lt;/strong&gt; is structured and comes with a lot of built-in features. Authentication, admin panels, database handling, everything is already there. This makes it great for building products quickly without worrying about too many low-level decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flask&lt;/strong&gt;, on the other hand, is minimal. It gives you freedom, but also requires you to make more choices. This makes it flexible, but slightly harder for beginners who don’t yet know what to pick.&lt;/p&gt;

&lt;p&gt;Now move to more enterprise-focused ecosystems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring Boot&lt;/strong&gt;, built on Java, is designed for large, scalable systems. It’s powerful, reliable, and widely used in enterprise environments. But it comes with complexity. It takes longer to learn and build with, but scales extremely well.&lt;/p&gt;

&lt;p&gt;Similarly, the &lt;strong&gt;.NET&lt;/strong&gt; ecosystem with &lt;strong&gt;C#&lt;/strong&gt; is strong in enterprise applications, especially in organizations that rely on Microsoft technologies. It offers performance, stability, and solid tooling.&lt;/p&gt;

&lt;p&gt;Then there’s Ruby on Rails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rails&lt;/strong&gt; follows a philosophy called “convention over configuration.” Instead of giving you endless choices, it gives you a predefined way of doing things. This makes it incredibly fast for building MVPs and shipping products quickly. Many successful startups started this way.&lt;/p&gt;

&lt;p&gt;So how do you think about all of this?&lt;/p&gt;

&lt;p&gt;It comes down to a few key tradeoffs.&lt;/p&gt;

&lt;p&gt;Some frameworks optimize for &lt;strong&gt;speed of development&lt;/strong&gt;, like Django or Rails.&lt;br&gt;&lt;br&gt;
Some optimize for &lt;strong&gt;flexibility and control&lt;/strong&gt;, like Node.js or Flask.&lt;br&gt;&lt;br&gt;
Others optimize for &lt;strong&gt;scalability and structure&lt;/strong&gt;, like Spring Boot or .NET.&lt;/p&gt;

&lt;p&gt;There is no universally better backend.&lt;/p&gt;

&lt;p&gt;There is only a backend that aligns with your project’s needs, your team’s experience, and how fast you want to move.&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%2F0s624nymrp3geldoc13a.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%2F0s624nymrp3geldoc13a.png" width="798" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Databases (The Most Misunderstood Layer)
&lt;/h3&gt;

&lt;p&gt;If the backend is the brain of your system, the database is its memory.&lt;/p&gt;

&lt;p&gt;And yet, this is the layer most beginners misunderstand.&lt;/p&gt;

&lt;p&gt;People often ask, “Should I use MongoDB or PostgreSQL?” as if one is universally better. But just like frontend and backend, the right choice depends entirely on how your data behaves.&lt;/p&gt;

&lt;p&gt;Let’s start from first principles.&lt;/p&gt;

&lt;p&gt;There are two broad ways to think about databases.&lt;/p&gt;

&lt;p&gt;The first is &lt;strong&gt;relational databases&lt;/strong&gt;, often called SQL databases. Examples include PostgreSQL and MySQL. These systems store data in structured tables with predefined schemas. Every row follows a fixed format, and relationships between data are clearly defined.&lt;/p&gt;

&lt;p&gt;This structure is their biggest strength.&lt;/p&gt;

&lt;p&gt;If you’re building something like a banking system, an e-commerce platform, or anything where data consistency matters, relational databases are extremely reliable. They enforce rules, support complex queries, and ensure transactions are handled safely.&lt;/p&gt;

&lt;p&gt;But that structure also makes them less flexible.&lt;/p&gt;

&lt;p&gt;If your data changes frequently or doesn’t fit neatly into tables, you’ll start feeling constrained.&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;NoSQL databases&lt;/strong&gt; come in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Databases&lt;/strong&gt; like &lt;strong&gt;MongoDB&lt;/strong&gt; or &lt;strong&gt;Firebase&lt;/strong&gt; allow you to store data in flexible formats, often as JSON-like documents. You don’t need to define a strict schema upfront. This makes development faster, especially in early stages when your data model is still evolving.&lt;/p&gt;

&lt;p&gt;It’s a big reason why many startups prefer NoSQL when building MVPs.&lt;/p&gt;

&lt;p&gt;But flexibility comes with tradeoffs.&lt;/p&gt;

&lt;p&gt;You often lose strong guarantees around consistency, and complex queries can become harder to manage as your application grows.&lt;/p&gt;

&lt;p&gt;Then there are specialized systems like &lt;strong&gt;Redis&lt;/strong&gt;, which operate in memory. These are not typically used as primary databases, but as performance layers. They are incredibly fast and are commonly used for caching, session storage, or real-time features.&lt;/p&gt;

&lt;p&gt;So how should you think about choosing a database?&lt;/p&gt;

&lt;p&gt;If your system depends on &lt;strong&gt;structured data and strong consistency&lt;/strong&gt;, SQL databases like PostgreSQL are usually the right choice.&lt;/p&gt;

&lt;p&gt;If your priority is &lt;strong&gt;speed of development and flexibility&lt;/strong&gt;, NoSQL options like MongoDB make more sense.&lt;/p&gt;

&lt;p&gt;And if performance becomes critical, you don’t replace your database.&lt;/p&gt;

&lt;p&gt;You add layers like Redis on top of it.&lt;/p&gt;

&lt;p&gt;The key idea is simple.&lt;/p&gt;

&lt;p&gt;Your database choice is not about trends.&lt;/p&gt;

&lt;p&gt;It’s about how your data behaves over time.&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%2F54s1zx1k3s6nd0p4iocl.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%2F54s1zx1k3s6nd0p4iocl.png" width="769" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Full Stack Combinations (How Things Come Together)
&lt;/h3&gt;

&lt;p&gt;Up to this point, we’ve looked at frontend, backend, and databases as separate pieces.&lt;/p&gt;

&lt;p&gt;But in real-world applications, you never use them in isolation.&lt;/p&gt;

&lt;p&gt;You combine them into a &lt;strong&gt;stack&lt;/strong&gt;, and that combination shapes how your entire system behaves.&lt;/p&gt;

&lt;p&gt;This is where many beginners get confused again. They try to find the “perfect stack” like MERN, MEAN, or something trending online.&lt;/p&gt;

&lt;p&gt;But stacks are not magic formulas.&lt;/p&gt;

&lt;p&gt;They are just &lt;strong&gt;commonly used combinations that work well together&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s understand them from a thinking perspective.&lt;/p&gt;

&lt;p&gt;Take the &lt;strong&gt;MERN stack&lt;/strong&gt;. It combines MongoDB, Express, React, and Node.js. The biggest advantage here is consistency. You’re using JavaScript everywhere. That makes development faster, especially for small teams or solo developers. It’s one of the reasons startups love it.&lt;/p&gt;

&lt;p&gt;Then there’s a combination like &lt;strong&gt;Django with React and PostgreSQL&lt;/strong&gt;. This is more balanced. Django handles the backend with strong structure and built-in features, React manages the frontend, and PostgreSQL ensures reliable data storage. This kind of stack is often used when you need both speed and long-term stability.&lt;/p&gt;

&lt;p&gt;Another interesting approach is &lt;strong&gt;Ruby on Rails with PostgreSQL&lt;/strong&gt;. Rails allows you to move extremely fast in the early stages. You can build and launch products quickly without making too many architectural decisions. It’s a classic choice for MVPs.&lt;/p&gt;

&lt;p&gt;Now look at a different direction.&lt;/p&gt;

&lt;p&gt;Instead of heavy frameworks everywhere, many modern applications use &lt;strong&gt;static frontend + APIs&lt;/strong&gt;. For example, a statically generated frontend using tools like Next.js, connected to backend APIs and cloud services. This approach improves performance and simplifies deployment.&lt;/p&gt;

&lt;p&gt;What’s important is not memorizing stacks, but understanding &lt;strong&gt;why they exist&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some stacks prioritize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Speed of development&lt;/li&gt;
&lt;li&gt;  Simplicity&lt;/li&gt;
&lt;li&gt;  Performance&lt;/li&gt;
&lt;li&gt;  Scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And different combinations optimize for different goals.&lt;/p&gt;

&lt;p&gt;As your application grows, your stack can also evolve. Many large systems don’t stick to a single stack forever. They adapt over time.&lt;/p&gt;

&lt;p&gt;So instead of asking “Which stack is best?”, ask a better question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Which combination helps me solve my problem efficiently right now?”&lt;/strong&gt;&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%2Fz5dk821t9pmtnuk6sqn7.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%2Fz5dk821t9pmtnuk6sqn7.png" width="501" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Security (Often Ignored, Always Critical)
&lt;/h3&gt;

&lt;p&gt;When people think about a tech stack, they usually focus on frontend, backend, and databases.&lt;/p&gt;

&lt;p&gt;Security is treated like an afterthought.&lt;/p&gt;

&lt;p&gt;That’s a mistake.&lt;/p&gt;

&lt;p&gt;Because no matter how well your system is built, a single security flaw can break everything.&lt;/p&gt;

&lt;p&gt;At a basic level, security is about protecting three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  User data&lt;/li&gt;
&lt;li&gt;  System access&lt;/li&gt;
&lt;li&gt;  Communication between components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s break it down practically.&lt;/p&gt;

&lt;p&gt;Most applications need &lt;strong&gt;authentication and authorization&lt;/strong&gt;. This is how you verify who a user is and what they’re allowed to do. Frameworks like Django and Spring Boot often provide built-in support for this, while in Node.js you usually implement it using libraries and tokens like JWT.&lt;/p&gt;

&lt;p&gt;Then comes &lt;strong&gt;data protection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Sensitive data should never be stored in plain text. Passwords must be hashed. Communication between frontend and backend should always happen over HTTPS. These are not advanced practices, they are the baseline.&lt;/p&gt;

&lt;p&gt;Another important concept is &lt;strong&gt;input validation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Your backend should never trust incoming data. Whether it’s a form submission or an API request, validating and sanitizing input prevents common attacks.&lt;/p&gt;

&lt;p&gt;As your system grows, security becomes layered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  API protection&lt;/li&gt;
&lt;li&gt;  Rate limiting&lt;/li&gt;
&lt;li&gt;  Role-based access&lt;/li&gt;
&lt;li&gt;  Secure deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key idea is simple.&lt;/p&gt;

&lt;p&gt;Security is not a feature you add later.&lt;/p&gt;

&lt;p&gt;It is something that should be considered while choosing your stack and designing your system from day one.&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%2F33la1s3eifrymemq90m4.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%2F33la1s3eifrymemq90m4.png" width="605" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment and Infrastructure (Where Your App Lives)
&lt;/h3&gt;

&lt;p&gt;Writing code is only half the job.&lt;/p&gt;

&lt;p&gt;Your application needs to run somewhere.&lt;/p&gt;

&lt;p&gt;This is where deployment and infrastructure come in, and it’s a part many beginners overlook while choosing a tech stack.&lt;/p&gt;

&lt;p&gt;Different technologies come with different deployment complexities.&lt;/p&gt;

&lt;p&gt;For example, a &lt;strong&gt;static site&lt;/strong&gt; can be deployed in minutes using platforms like hosting CDNs. It’s simple, fast, and requires almost no backend management.&lt;/p&gt;

&lt;p&gt;But as soon as you introduce a backend, things change.&lt;/p&gt;

&lt;p&gt;Now you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Servers (or serverless platforms)&lt;/li&gt;
&lt;li&gt;  Environment configuration&lt;/li&gt;
&lt;li&gt;  Database hosting&lt;/li&gt;
&lt;li&gt;  Scaling strategies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Modern applications often rely on &lt;strong&gt;cloud platforms&lt;/strong&gt; to handle this complexity. Instead of managing physical servers, you deploy your application to cloud environments that handle scaling, uptime, and performance.&lt;/p&gt;

&lt;p&gt;There are generally three approaches:&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;traditional servers&lt;/strong&gt;. You manage everything yourself. This gives control but increases complexity.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;Platform as a Service (PaaS)&lt;/strong&gt;. You deploy your code, and the platform handles most of the infrastructure. This is beginner-friendly and widely used.&lt;/p&gt;

&lt;p&gt;Third, &lt;strong&gt;serverless architecture&lt;/strong&gt;. You don’t manage servers at all. Your backend runs as functions that scale automatically. This is powerful but requires a different way of thinking.&lt;/p&gt;

&lt;p&gt;Deployment also affects your tech stack choices.&lt;/p&gt;

&lt;p&gt;Some frameworks are easier to deploy than others. Some databases integrate better with certain cloud providers. These practical constraints matter more than theoretical comparisons.&lt;/p&gt;

&lt;p&gt;At the end of the day, a good tech stack is not just easy to build.&lt;/p&gt;

&lt;p&gt;It is easy to deploy, run, and scale.&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%2Fquaapvmvqje87j3ho4gx.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%2Fquaapvmvqje87j3ho4gx.png" width="800" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Choose a Tech Stack (The Real Decision Framework)
&lt;/h3&gt;

&lt;p&gt;Now that you understand the pieces, the real question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you actually choose a tech stack without overthinking it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of chasing trends, you need a simple decision framework. Think in terms of constraints, not tools.&lt;/p&gt;

&lt;p&gt;Start with your &lt;strong&gt;project type&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you’re building an &lt;strong&gt;MVP&lt;/strong&gt; or a startup idea, your priority is speed. You want to test an idea quickly, not design a perfect system. In this case, choose technologies that let you move fast. Frameworks like Node.js with Express, Django, or Ruby on Rails are great here. Pair them with something simple on the frontend, and you’re ready to ship.&lt;/p&gt;

&lt;p&gt;If you’re building a &lt;strong&gt;real-time application&lt;/strong&gt; like chat systems or live dashboards, your backend choice matters more. Systems like Node.js work well because they handle concurrent connections efficiently. You might also introduce tools like Redis for fast data access.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;enterprise-level systems&lt;/strong&gt;, the priorities change. Stability, scalability, and maintainability become more important than speed. This is where structured frameworks like Spring Boot or .NET start to make sense. They require more effort upfront but pay off as the system grows.&lt;/p&gt;

&lt;p&gt;Now think about your &lt;strong&gt;team&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you’re a beginner or working solo, avoid complex stacks. A simpler setup like React with Node.js or Django is easier to manage. If your team already knows a specific language, that should heavily influence your choice. Learning a completely new ecosystem while building a product can slow you down significantly.&lt;/p&gt;

&lt;p&gt;Next comes &lt;strong&gt;constraints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Time, budget, and scalability expectations all play a role. If you have limited time, choose tools with strong ecosystems and ready-made solutions. If you expect rapid growth, think about how easily your stack can scale.&lt;/p&gt;

&lt;p&gt;Finally, think about the &lt;strong&gt;future, but don’t over-optimize for it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many developers try to design systems for millions of users before they even have ten. This leads to overengineering. It’s better to start simple and evolve your stack as your needs grow.&lt;/p&gt;

&lt;p&gt;At the end of the day, choosing a tech stack is not about finding the perfect combination.&lt;/p&gt;

&lt;p&gt;It’s about making a &lt;strong&gt;practical decision based on your current situation&lt;/strong&gt;.&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%2F3pllqfbfki0ce7t4hznz.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%2F3pllqfbfki0ce7t4hznz.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Mistakes When Choosing a Tech Stack
&lt;/h3&gt;

&lt;p&gt;Even with all this understanding, developers still make the same mistakes again and again.&lt;/p&gt;

&lt;p&gt;Not because they don’t know the options, but because they approach the decision the wrong way.&lt;/p&gt;

&lt;p&gt;The first mistake is &lt;strong&gt;choosing based on trends&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A new framework becomes popular, everyone starts talking about it, and suddenly it feels like you have to use it. But popularity does not mean suitability. A tool can be great and still be completely wrong for your use case. Many developers end up using complex stacks for simple problems, just because they are trending.&lt;/p&gt;

&lt;p&gt;The second mistake is &lt;strong&gt;overengineering too early&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This usually comes from fear. The fear that your app might scale someday, so you try to prepare for it from day one. You introduce microservices, complex architectures, multiple databases, and unnecessary layers before your product even has users.&lt;/p&gt;

&lt;p&gt;The result is not scalability.&lt;/p&gt;

&lt;p&gt;It’s complexity.&lt;/p&gt;

&lt;p&gt;And complexity slows everything down.&lt;/p&gt;

&lt;p&gt;Another common mistake is &lt;strong&gt;ignoring your team’s skillset&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A tech stack is not just about technology, it’s about the people building it. If your team is comfortable with JavaScript, forcing a shift to Java or Go might reduce productivity. The best stack is often the one your team can use efficiently.&lt;/p&gt;

&lt;p&gt;Then there’s &lt;strong&gt;trying to find a perfect stack&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is the biggest trap.&lt;/p&gt;

&lt;p&gt;Developers spend days or even weeks comparing React vs Vue, Django vs Node.js, SQL vs NoSQL, hoping to make a flawless decision. But no matter what you choose, there will always be tradeoffs.&lt;/p&gt;

&lt;p&gt;Waiting for the perfect choice only delays progress.&lt;/p&gt;

&lt;p&gt;And finally, many people &lt;strong&gt;underestimate simplicity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Simple stacks are easier to build, debug, deploy, and maintain. Complexity should be introduced only when it is actually needed, not assumed.&lt;/p&gt;

&lt;p&gt;If you avoid these mistakes, you’re already ahead of most developers.&lt;/p&gt;

&lt;p&gt;Because choosing a tech stack is not about knowing everything.&lt;/p&gt;

&lt;p&gt;It’s about avoiding the wrong decisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Decision Guide
&lt;/h3&gt;

&lt;p&gt;At this point, you understand the theory.&lt;/p&gt;

&lt;p&gt;Now let’s simplify everything into something you can actually use.&lt;/p&gt;

&lt;p&gt;Because in the real world, you don’t sit and analyze for hours. You make a decision and start building.&lt;/p&gt;

&lt;p&gt;So instead of giving you a rigid formula, here’s a practical way to think.&lt;/p&gt;

&lt;p&gt;If your goal is to &lt;strong&gt;build fast and validate an idea&lt;/strong&gt;, keep your stack simple. A combination like React on the frontend, Node.js on the backend, and a flexible database like MongoDB works well. It reduces friction and lets you focus on the product instead of infrastructure.&lt;/p&gt;

&lt;p&gt;If you’re working on something that requires &lt;strong&gt;structured data and reliability&lt;/strong&gt;, like dashboards, internal tools, or business systems, a more structured approach makes sense. Pair a solid backend like Django or Spring Boot with a relational database like PostgreSQL. This gives you consistency and long-term stability.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;content-driven or SEO-heavy websites&lt;/strong&gt;, you don’t always need a heavy backend. Static site generation or server-side rendering with tools like Next.js can handle most requirements while keeping performance high.&lt;/p&gt;

&lt;p&gt;If your application involves &lt;strong&gt;real-time features&lt;/strong&gt;, such as chat systems or live updates, prioritize technologies that handle concurrency well. Node.js is a common choice here, often combined with in-memory systems like Redis to improve performance.&lt;/p&gt;

&lt;p&gt;And if you’re completely new and just trying to learn or build your first project, don’t overcomplicate it.&lt;/p&gt;

&lt;p&gt;Pick one ecosystem and stick to it.&lt;/p&gt;

&lt;p&gt;A simple full stack JavaScript setup, or a Django-based backend with a basic frontend, is more than enough to get started.&lt;/p&gt;

&lt;p&gt;The key is not to find the smartest stack.&lt;/p&gt;

&lt;p&gt;It’s to choose a &lt;strong&gt;good enough stack that lets you move forward&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because progress teaches you more than planning ever will.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Choosing a tech stack feels like a big decision.&lt;/p&gt;

&lt;p&gt;And in some ways, it is.&lt;/p&gt;

&lt;p&gt;But not in the way most people think.&lt;/p&gt;

&lt;p&gt;The mistake is believing that your entire project depends on picking the perfect combination of frontend, backend, and database from the start. That one wrong choice will somehow break everything.&lt;/p&gt;

&lt;p&gt;That’s not how real systems are built.&lt;/p&gt;

&lt;p&gt;Good products are not the result of perfect stacks.&lt;/p&gt;

&lt;p&gt;They are the result of &lt;strong&gt;good decisions made over time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Almost every successful application you see today has evolved. Technologies were replaced, architectures were redesigned, and systems were rebuilt as requirements changed. What mattered was not the initial stack, but the ability to adapt.&lt;/p&gt;

&lt;p&gt;So instead of asking, “What is the best tech stack?”, ask yourself something more practical.&lt;/p&gt;

&lt;p&gt;What can I build with right now?&lt;/p&gt;

&lt;p&gt;What can I maintain?&lt;/p&gt;

&lt;p&gt;What helps me move forward?&lt;/p&gt;

&lt;p&gt;Because at the end of the day, a tech stack is just a set of tools.&lt;/p&gt;

&lt;p&gt;And tools don’t build products.&lt;/p&gt;

&lt;p&gt;You do.&lt;/p&gt;

</description>
      <category>systemdesigninterview</category>
      <category>webdev</category>
      <category>techstack</category>
      <category>programming</category>
    </item>
    <item>
      <title>Let’s Investigate Social Media Algorithm and how they hook you in</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Thu, 21 May 2026 17:09:39 +0000</pubDate>
      <link>https://forem.com/akshatjme/lets-investigate-social-media-algorithm-and-how-they-hook-you-in-3hk1</link>
      <guid>https://forem.com/akshatjme/lets-investigate-social-media-algorithm-and-how-they-hook-you-in-3hk1</guid>
      <description>&lt;h4&gt;
  
  
  You don’t control your feed.
&lt;/h4&gt;

&lt;p&gt;Your feed controls you.&lt;/p&gt;

&lt;p&gt;So, what exactly are &lt;em&gt;social media algorithms&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;In the simplest terms, a social media algorithm is a system that decides &lt;strong&gt;what content you see and in what order&lt;/strong&gt;. Instead of showing posts chronologically (like the old days), platforms now use algorithms to personalize your feed.&lt;/p&gt;

&lt;p&gt;That means two people can open the same app at the same time and see completely different content.&lt;/p&gt;

&lt;p&gt;Why? Because the algorithm is constantly trying to answer one question:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;“What will keep this person engaged the longest?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every platform — Instagram, TikTok, YouTube, Facebook uses its own version of this system. But the goal is always the same show you content you’re most likely to watch, like, share, or interact with.&lt;/p&gt;

&lt;p&gt;And here’s where it gets interesting.&lt;/p&gt;

&lt;p&gt;These algorithms don’t just look at what you &lt;em&gt;like&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;They look at everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  How long you watch a video&lt;/li&gt;
&lt;li&gt;  Whether you scroll quickly or pause&lt;/li&gt;
&lt;li&gt;  What you comment on&lt;/li&gt;
&lt;li&gt;  Even what you &lt;em&gt;don’t&lt;/em&gt; interact with&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over time, they build a detailed profile of your preferences what you enjoy, what grabs your attention, and what makes you stay.&lt;/p&gt;

&lt;p&gt;Read This for Digital profiling :- &lt;a href="https://akshatjme.medium.com/the-illusion-of-privacy-0b49216748b6" rel="noopener noreferrer"&gt;LINK&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is why your feed starts to feel “perfect.”&lt;br&gt;&lt;br&gt;
Almost like it understands you.&lt;/p&gt;

&lt;p&gt;But remember it’s not magic.&lt;br&gt;&lt;br&gt;
It’s data.&lt;/p&gt;

&lt;p&gt;And once you understand that, you start to see social media very differently.&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%2F7vp3lmwb80qszw15zpsf.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%2F7vp3lmwb80qszw15zpsf.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Goal: Your Attention
&lt;/h3&gt;

&lt;p&gt;At first glance, social media platforms seem like they exist to connect people, share ideas, or entertain us.&lt;/p&gt;

&lt;p&gt;But behind the scenes, their real goal is much simpler &lt;strong&gt;capture and hold your attention for as long as possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why? Because attention is money.&lt;/p&gt;

&lt;p&gt;The longer you stay on a platform, the more ads you see.&lt;br&gt;&lt;br&gt;
The more ads you see, the more revenue the platform generates.&lt;/p&gt;

&lt;p&gt;It’s that straightforward.&lt;/p&gt;

&lt;p&gt;This is why &lt;em&gt;social media algorithms&lt;/em&gt; aren’t designed to show you what’s most important they’re designed to show you what’s most &lt;em&gt;engaging&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And “&lt;strong&gt;engaging&lt;/strong&gt;” doesn’t always mean positive or useful.&lt;/p&gt;

&lt;p&gt;Sometimes it means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Content that makes you emotional&lt;/li&gt;
&lt;li&gt;  Content that surprises you&lt;/li&gt;
&lt;li&gt;  Content that keeps you curious enough to scroll just one more time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think about it have you ever gone down a random rabbit hole of videos you didn’t even plan to watch?&lt;/p&gt;

&lt;p&gt;That’s not random. That’s the algorithm doing its job perfectly.&lt;/p&gt;

&lt;p&gt;It learns what holds your attention and then keeps feeding you more of it. Not necessarily what you &lt;em&gt;need&lt;/em&gt;, but what you &lt;em&gt;won’t resist&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Over time, this creates a loop:&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%2F42zn0y95u75zgrz8lxwg.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%2F42zn0y95u75zgrz8lxwg.png" alt="You watch → the algorithm learns → it shows better content → you watch more." width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the cycle repeats.&lt;/p&gt;

&lt;p&gt;That’s why it often feels hard to stop scrolling.&lt;br&gt;&lt;br&gt;
Because the system isn’t built for you to leave — it’s built for you to stay.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Psychology They Use to Hook You
&lt;/h3&gt;

&lt;p&gt;If social media algorithms are the engine, psychology is the fuel.&lt;/p&gt;

&lt;p&gt;These platforms don’t just rely on data they rely on how your brain naturally works. And once you understand this, the whole system starts to make sense.&lt;/p&gt;

&lt;p&gt;Let’s start with something powerful: &lt;strong&gt;dopamine&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Dopamine is a chemical in your brain linked to pleasure and reward. Every time you see something interesting, funny, or emotionally satisfying, your brain gives you a small dopamine hit.&lt;/p&gt;

&lt;p&gt;Now imagine this happening over and over again as you scroll.&lt;/p&gt;

&lt;p&gt;That’s not a coincidence it’s a loop.&lt;/p&gt;

&lt;p&gt;And here’s the clever part: the rewards are &lt;strong&gt;&lt;em&gt;unpredictable&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Sometimes the next post is amazing. Sometimes it’s boring. But you don’t know which one is coming next. This is called a &lt;strong&gt;variable reward system&lt;/strong&gt; the same principle used in slot machines.&lt;/p&gt;

&lt;p&gt;You keep scrolling because &lt;em&gt;the next post might be the one&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Then there’s &lt;strong&gt;social validation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Likes, comments, shares these aren’t just features. They’re signals. They tell your brain &lt;em&gt;people noticed you&lt;/em&gt;. That feels good. And naturally, you want more of it.&lt;/p&gt;

&lt;p&gt;So you post again. You check again. You stay longer.&lt;/p&gt;

&lt;p&gt;And finally, there’s &lt;strong&gt;FOMO&lt;/strong&gt; — the fear of missing out.&lt;/p&gt;

&lt;p&gt;The feeling that something important, funny, or trending is happening right now… and if you stop scrolling, you’ll miss it.&lt;/p&gt;

&lt;p&gt;All of this combines into a powerful system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You’re rewarded just enough to stay&lt;/li&gt;
&lt;li&gt;  You’re curious enough to continue&lt;/li&gt;
&lt;li&gt;  And you’re emotionally invested enough not to leave&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s why it’s not just about weak willpower.&lt;/p&gt;

&lt;p&gt;It’s design meeting human psychology.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Algorithms Learn You Better Than You Know Yourself
&lt;/h3&gt;

&lt;p&gt;By now, you might be wondering how does the algorithm get &lt;em&gt;so accurate&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;The answer is simple it watches everything you do.&lt;/p&gt;

&lt;p&gt;Not in a creepy, human way but in a data-driven, pattern-recognition way.&lt;/p&gt;

&lt;p&gt;Every small action you take sends a signal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You paused on a video for 3 seconds? That’s interest.&lt;/li&gt;
&lt;li&gt;  You watched till the end? Strong interest.&lt;/li&gt;
&lt;li&gt;  You rewatched it? Even better.&lt;/li&gt;
&lt;li&gt;  You skipped something instantly? Not relevant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over time, these tiny signals add up.&lt;/p&gt;

&lt;p&gt;The algorithm doesn’t need you to tell it what you like it &lt;em&gt;infers&lt;/em&gt; it from your behavior. And it does this at a scale and speed no human ever could.&lt;/p&gt;

&lt;p&gt;This is where &lt;em&gt;social media algorithms&lt;/em&gt; become incredibly powerful.&lt;/p&gt;

&lt;p&gt;They build a detailed profile of you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Your interests&lt;/li&gt;
&lt;li&gt;  Your mood patterns&lt;/li&gt;
&lt;li&gt;  The kind of content you engage with at different times of the day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s why your feed often feels &lt;strong&gt;“too accurate.&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;You might just &lt;em&gt;think&lt;/em&gt; about something and suddenly, related content starts showing up. It feels almost like the app can read your mind.&lt;/p&gt;

&lt;p&gt;But what’s really happening is pattern prediction.&lt;/p&gt;

&lt;p&gt;And there’s a side effect of this: &lt;strong&gt;echo chambers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Read This for Echo chamber :- &lt;a href="https://akshatjme.medium.com/how-social-media-quietly-shapes-elections-and-your-political-views-73123ff67242" rel="noopener noreferrer"&gt;LINK&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the algorithm keeps showing you content similar to what you already engage with, your world becomes narrower. You see more of what you agree with, and less of what challenges you.&lt;/p&gt;

&lt;p&gt;Over time, this can shape your opinions, reinforce beliefs, and even influence how you see reality.&lt;/p&gt;

&lt;p&gt;So it’s not just about entertainment anymore.&lt;/p&gt;

&lt;p&gt;It’s about influence.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Dark Side: When Personalization Becomes Manipulation
&lt;/h3&gt;

&lt;p&gt;Personalization sounds helpful and in many ways, it is.&lt;/p&gt;

&lt;p&gt;You get content you enjoy. You discover new creators. You don’t waste time on things you don’t care about.&lt;/p&gt;

&lt;p&gt;But there’s a point where personalization quietly crosses into something else: &lt;strong&gt;manipulation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because &lt;em&gt;social media algorithms&lt;/em&gt; aren’t just learning from you they’re also shaping you.&lt;/p&gt;

&lt;p&gt;The more you engage with certain types of content, the more you’re shown similar content. Over time, this can create habits that feel hard to break.&lt;/p&gt;

&lt;p&gt;You don’t just &lt;em&gt;use&lt;/em&gt; the platform anymore.&lt;br&gt;&lt;br&gt;
You start to depend on it.&lt;/p&gt;

&lt;p&gt;This is where addictive patterns begin to form.&lt;/p&gt;

&lt;p&gt;Endless scrolling, constant checking, losing track of time these aren’t random behaviors. They’re outcomes of a system designed to keep you engaged at all costs.&lt;/p&gt;

&lt;p&gt;And it doesn’t stop there.&lt;/p&gt;

&lt;p&gt;Because algorithms prioritize engagement, they often push content that is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  More extreme&lt;/li&gt;
&lt;li&gt;  More emotional&lt;/li&gt;
&lt;li&gt;  More attention-grabbing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why? Because that’s what keeps people hooked.&lt;/p&gt;

&lt;p&gt;This can lead to &lt;strong&gt;polarization&lt;/strong&gt;, where people are pushed deeper into one-sided viewpoints. It can also amplify misinformation because controversial or shocking content spreads faster.&lt;/p&gt;

&lt;p&gt;Then there’s the impact on mental health.&lt;/p&gt;

&lt;p&gt;Constant comparison, unrealistic standards, and the pressure of social validation can quietly affect how you feel about yourself. Even if you don’t notice it immediately.&lt;/p&gt;

&lt;p&gt;So while the experience feels personal and tailored…&lt;br&gt;&lt;br&gt;
it’s also carefully engineered.&lt;/p&gt;

&lt;p&gt;And the line between helping you and influencing you is thinner than it seems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can You Beat the Algorithm?
&lt;/h3&gt;

&lt;p&gt;At this point, it might feel like the system is too powerful to escape.&lt;/p&gt;

&lt;p&gt;But here’s the truth you don’t need to “beat” the algorithm.&lt;br&gt;&lt;br&gt;
You just need to &lt;strong&gt;stop playing unconsciously&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because &lt;em&gt;social media algorithms&lt;/em&gt; only work well when you’re passive.&lt;/p&gt;

&lt;p&gt;The moment you become intentional, the dynamic starts to shift.&lt;/p&gt;

&lt;p&gt;Start with something simple: &lt;strong&gt;notice your behavior&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Pay attention to when you open an app.&lt;br&gt;&lt;br&gt;
Is it boredom? Habit? Avoiding something else?&lt;/p&gt;

&lt;p&gt;That awareness alone creates a small gap between impulse and action.&lt;/p&gt;

&lt;p&gt;Next, take control of what you engage with.&lt;/p&gt;

&lt;p&gt;Remember, the algorithm learns from your actions. So if you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Like more meaningful content&lt;/li&gt;
&lt;li&gt;  Follow creators who add value&lt;/li&gt;
&lt;li&gt;  Skip or ignore content you don’t want&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…you’re actively training your feed.&lt;/p&gt;

&lt;p&gt;You’re not just consuming you’re shaping the system.&lt;/p&gt;

&lt;p&gt;Another powerful step is setting boundaries.&lt;/p&gt;

&lt;p&gt;Simple things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Turning off notifications&lt;/li&gt;
&lt;li&gt;  Setting time limits&lt;/li&gt;
&lt;li&gt;  Keeping your phone out of reach during focused work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren’t extreme measures. They’re practical ways to reduce unconscious usage.&lt;/p&gt;

&lt;p&gt;And if your feed feels overwhelming, you can always reset it — by unfollowing accounts, clearing watch history, or even taking a short break.&lt;/p&gt;

&lt;p&gt;The goal isn’t to quit social media completely.&lt;/p&gt;

&lt;p&gt;It’s to use it &lt;strong&gt;on your terms&lt;/strong&gt;, not the algorithm’s.&lt;/p&gt;

&lt;p&gt;Because once you understand how it works, you realize something important:&lt;/p&gt;

&lt;p&gt;You’re not as powerless as it seems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;At the end of the day, social media isn’t evil.&lt;/p&gt;

&lt;p&gt;The technology itself is neutral. It can inform you, entertain you, connect you with people, and even inspire you.&lt;/p&gt;

&lt;p&gt;The real issue is &lt;strong&gt;how it’s designed and how unconsciously we use it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Social media algorithms&lt;/em&gt; are incredibly powerful because they tap into something very human: our attention, our emotions, and our need for connection.&lt;/p&gt;

&lt;p&gt;They don’t force you to stay.&lt;br&gt;&lt;br&gt;
But they make it very easy not to leave.&lt;/p&gt;

&lt;p&gt;And that’s the subtle difference.&lt;/p&gt;

&lt;p&gt;The goal of this article isn’t to make you delete your apps or fear technology. It’s simply to make you more aware.&lt;/p&gt;

&lt;p&gt;Because awareness changes everything.&lt;/p&gt;

&lt;p&gt;Once you see the patterns, you start questioning them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  “Why am I still scrolling?”&lt;/li&gt;
&lt;li&gt;  “Do I actually want to watch this?”&lt;/li&gt;
&lt;li&gt;  “Is this adding value to my time?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These small questions break the automatic loop.&lt;/p&gt;

&lt;p&gt;And when that happens, you move from being &lt;em&gt;controlled&lt;/em&gt; by the algorithm…&lt;br&gt;&lt;br&gt;
to &lt;em&gt;coexisting&lt;/em&gt; with it.&lt;/p&gt;

&lt;p&gt;That’s the real win.&lt;/p&gt;

&lt;p&gt;Not quitting. Not fighting.&lt;br&gt;&lt;br&gt;
Just understanding — and choosing consciously.&lt;/p&gt;

</description>
      <category>digitalwellness</category>
      <category>psychology</category>
      <category>technology</category>
      <category>selfimprovement</category>
    </item>
    <item>
      <title>Building a Subscription Management System That Actually Scales</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Wed, 13 May 2026 16:38:21 +0000</pubDate>
      <link>https://forem.com/akshatjme/building-a-subscription-management-system-that-actually-scales-2opd</link>
      <guid>https://forem.com/akshatjme/building-a-subscription-management-system-that-actually-scales-2opd</guid>
      <description>&lt;h4&gt;
  
  
  Here’s what I learned building a subscription management system from scratch.
&lt;/h4&gt;

&lt;p&gt;If you’ve ever built an app, you’ve probably started the same way I did a frontend, a backend, and a database.&lt;/p&gt;

&lt;p&gt;It works. It feels clean. You ship features quickly.&lt;/p&gt;

&lt;p&gt;But then the app grows.&lt;/p&gt;

&lt;p&gt;You add things like subscription tracking, renewal reminders, analytics, maybe even notifications. Suddenly, what used to feel simple starts getting messy. Logic spreads across different parts of the codebase. Small changes start breaking unrelated features. Debugging takes longer than building.&lt;/p&gt;

&lt;p&gt;This is exactly where most &lt;strong&gt;subscription management systems&lt;/strong&gt; start to struggle.&lt;/p&gt;

&lt;p&gt;The problem isn’t that the system is “wrong.” It’s that it was designed for a smaller version of reality.&lt;/p&gt;

&lt;p&gt;In the beginning, a subscription system looks simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Store subscription details&lt;/li&gt;
&lt;li&gt;  Track billing cycles&lt;/li&gt;
&lt;li&gt;  Send reminders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But in a real-world scenario, things expand quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Users can have multiple subscriptions&lt;/li&gt;
&lt;li&gt;  Each subscription has different billing cycles&lt;/li&gt;
&lt;li&gt;  Notifications need to be timely and reliable&lt;/li&gt;
&lt;li&gt;  Data needs to be consistent across the system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What started as a few database tables becomes a system that needs to handle coordination, timing, and scale.&lt;/p&gt;

&lt;p&gt;And here’s the key insight I learned the hard way:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;A system that works for 10 users is not the same system that works for 10,000 users.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most failures don’t happen because of bad code. They happen because the system wasn’t designed to evolve.&lt;/p&gt;

&lt;p&gt;That’s when I stopped thinking in terms of “features”… and started thinking in terms of &lt;strong&gt;system design&lt;/strong&gt;.&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%2F6f0zjrmy36sppa9p2spp.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%2F6f0zjrmy36sppa9p2spp.png" alt="Building a Subscription Management System That Actually Scales" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Starting with Back-of-the-Envelope System Design
&lt;/h3&gt;

&lt;p&gt;Before writing more code, I stepped back and did something I should’ve done earlier a quick &lt;strong&gt;back-of-the-envelope design&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Nothing fancy. No diagrams. Just rough thinking.&lt;/p&gt;

&lt;p&gt;If this system actually grows, what does it need to handle?&lt;/p&gt;

&lt;p&gt;Let’s say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  10,000 users&lt;/li&gt;
&lt;li&gt;  Each user has ~5 subscriptions&lt;/li&gt;
&lt;li&gt;  That’s 50,000 active subscriptions&lt;/li&gt;
&lt;li&gt;  Each subscription may trigger 1–2 notifications per cycle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you’re looking at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Thousands of reads per day (dashboard, listings)&lt;/li&gt;
&lt;li&gt;  Frequent writes (new subscriptions, updates)&lt;/li&gt;
&lt;li&gt;  Time-based events (renewals, reminders)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suddenly, this is no longer a “simple app.”&lt;/p&gt;

&lt;p&gt;It’s a &lt;strong&gt;system with different types of workloads&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  User authentication&lt;/li&gt;
&lt;li&gt;  Subscription management&lt;/li&gt;
&lt;li&gt;  Scheduled processing (renewals, alerts)&lt;/li&gt;
&lt;li&gt;  Notification delivery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here’s where things get interesting.&lt;/p&gt;

&lt;p&gt;Not all parts of the system behave the same way.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Authentication needs to be fast and secure&lt;/li&gt;
&lt;li&gt;  Subscription data needs consistency&lt;/li&gt;
&lt;li&gt;  Notifications need reliability, not just speed&lt;/li&gt;
&lt;li&gt;  Analytics is read-heavy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Trying to handle all of this in a single backend quickly becomes messy.&lt;/p&gt;

&lt;p&gt;You either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Overload one system with too many responsibilities&lt;/li&gt;
&lt;li&gt;  Or start adding hacks to make things “just work”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither scales well.&lt;/p&gt;

&lt;p&gt;This quick exercise changed how I approached the system.&lt;/p&gt;

&lt;p&gt;Instead of thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“What feature do I build next?”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“What kind of system does this feature belong to?”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That shift is what naturally led me toward a more &lt;strong&gt;scalable architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Breaking the Monolith and moving to a Scalable Architecture
&lt;/h3&gt;

&lt;p&gt;At this point, it became clear that adding more features to a single backend was only going to make things worse.&lt;/p&gt;

&lt;p&gt;Everything was tightly connected.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Authentication logic mixed with business logic&lt;/li&gt;
&lt;li&gt;  Subscription updates triggering notification logic directly&lt;/li&gt;
&lt;li&gt;  Small changes forcing full redeploys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It worked but it didn’t scale.&lt;/p&gt;

&lt;p&gt;So instead of patching the system again, I made a bigger shift:&lt;br&gt;&lt;br&gt;
I started &lt;strong&gt;breaking the system into separate services&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Not because microservices are trendy, but because the system needed &lt;strong&gt;clear boundaries&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I split the application based on responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Authentication became its own service&lt;/li&gt;
&lt;li&gt;  Subscription logic became isolated&lt;/li&gt;
&lt;li&gt;  Notifications were handled independently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This immediately brought clarity.&lt;/p&gt;

&lt;p&gt;Each part of the system now had a &lt;strong&gt;single responsibility&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Changes in one service didn’t risk breaking everything else.&lt;/p&gt;

&lt;p&gt;But let’s be honest this didn’t magically make things easier.&lt;/p&gt;

&lt;p&gt;In fact, it introduced a new set of problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  How do services talk to each other?&lt;/li&gt;
&lt;li&gt;  How do you manage authentication across services?&lt;/li&gt;
&lt;li&gt;  Where does request routing happen?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where the architecture evolved further.&lt;/p&gt;

&lt;p&gt;Instead of clients directly calling multiple services, I introduced an &lt;strong&gt;API Gateway&lt;/strong&gt; as the single entry point. Every request flows through it, and it decides where to route it.&lt;/p&gt;

&lt;p&gt;This solved a lot of chaos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Centralized routing&lt;/li&gt;
&lt;li&gt;  Consistent authentication checks&lt;/li&gt;
&lt;li&gt;  Cleaner client-side logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the system looked less like a single app and more like a &lt;strong&gt;coordinated set of services&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that’s the key difference.&lt;/p&gt;

&lt;p&gt;You’re no longer building “an app.”&lt;br&gt;&lt;br&gt;
You’re building a &lt;strong&gt;system where multiple components work together&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It’s more complex, yes.&lt;/p&gt;

&lt;p&gt;But it’s also the first step toward something that can actually scale.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inside the System: How Each Service Works
&lt;/h3&gt;

&lt;p&gt;Once the system was split into services, the next challenge was making sure each one had a &lt;strong&gt;clear role&lt;/strong&gt;. Without that, you just end up with distributed chaos instead of a clean architecture.&lt;/p&gt;

&lt;p&gt;Here’s how the system is structured today.&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%2F25g4s4dpsdnmzu8pgif2.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%2F25g4s4dpsdnmzu8pgif2.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the front, there’s the mobile application built with React Native. This is what users interact with — adding subscriptions, viewing dashboards, and receiving alerts.&lt;/p&gt;

&lt;p&gt;Every request from the app goes through the &lt;strong&gt;API Gateway&lt;/strong&gt;. Think of it as the system’s front door. It handles routing, basic filtering, and ensures requests reach the correct service without the client needing to know internal details.&lt;/p&gt;

&lt;p&gt;Behind that, the system is divided into focused services.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Auth Service&lt;/strong&gt; is responsible for authentication and security. It handles login, registration, JWT token generation, and role-based access control. This keeps security isolated and consistent across the system.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;User Service&lt;/strong&gt; manages user-related data profiles, preferences, and account settings. It doesn’t deal with subscriptions directly, which keeps responsibilities clean.&lt;/p&gt;

&lt;p&gt;The core of the system is the &lt;strong&gt;Subscription Service&lt;/strong&gt;. This is where all the main business logic lives creating subscriptions, managing billing cycles, calculating renewals, and powering analytics.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://medium.com/@akshatjme/3c73bf2adba0" rel="noopener noreferrer"&gt;&lt;strong&gt;Help/Support Service&lt;/strong&gt;&lt;/a&gt; provides a guided resolution system using a decision-tree approach, helping users troubleshoot common issues step-by-step and reducing the need for manual support intervention.&lt;/p&gt;

&lt;p&gt;Then comes the &lt;strong&gt;Notification Service&lt;/strong&gt;, which handles sending alerts. Whether it’s email, in-app notifications, or push alerts, this service ensures users are notified at the right time without blocking the main application flow.&lt;/p&gt;

&lt;p&gt;And then there’s the most interesting part — the &lt;a href="https://medium.com/@akshatjme/7a30db559bf2" rel="noopener noreferrer"&gt;&lt;strong&gt;LLM Service&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Instead of forcing users to manually fill forms, this service allows them to send a simple message like:&lt;br&gt;&lt;br&gt;
“Netflix ₹499 monthly”&lt;/p&gt;

&lt;p&gt;The service processes that input, extracts structured data, and creates a subscription event automatically in the database. It sits alongside the system, enhancing it without tightly coupling with core logic.&lt;/p&gt;

&lt;p&gt;Each service focuses on one thing.&lt;br&gt;&lt;br&gt;
They communicate through APIs, not shared logic.&lt;/p&gt;

&lt;p&gt;This separation is what makes the system maintainable as it grows.&lt;/p&gt;

&lt;p&gt;Because at scale, clarity matters more than cleverness.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making the System Feel Intelligent (LLM + Automation)
&lt;/h3&gt;

&lt;p&gt;Up to this point, the system was scalable. It was structured. It could handle growth.&lt;/p&gt;

&lt;p&gt;But it still felt… like a system.&lt;/p&gt;

&lt;p&gt;Users had to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Open the app&lt;/li&gt;
&lt;li&gt;  Fill forms&lt;/li&gt;
&lt;li&gt;  Enter subscription details manually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It worked. But it wasn’t great.&lt;/p&gt;

&lt;p&gt;That’s when I started thinking about a different problem:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What if users didn’t have to “use” the system at all?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What if they could just &lt;strong&gt;say what they did&lt;/strong&gt;, and the system handled the rest?&lt;/p&gt;

&lt;p&gt;That idea led to integrating an LLM-based service into the architecture.&lt;/p&gt;

&lt;p&gt;Now instead of filling a form, a user can type something like:&lt;/p&gt;

&lt;p&gt;“Bought Spotify for ₹199 per month”&lt;/p&gt;

&lt;p&gt;That message goes to the &lt;strong&gt;LLM service&lt;/strong&gt;, which processes it and extracts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Subscription name&lt;/li&gt;
&lt;li&gt;  Cost&lt;/li&gt;
&lt;li&gt;  Billing cycle&lt;/li&gt;
&lt;li&gt;  Relevant timing details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once parsed, it creates a structured event and pushes it into the system just like any manually created subscription.&lt;/p&gt;

&lt;p&gt;From the user’s perspective, it feels almost invisible.&lt;/p&gt;

&lt;p&gt;No forms. No friction. Just intent → action.&lt;/p&gt;

&lt;p&gt;And importantly, this didn’t break the architecture.&lt;/p&gt;

&lt;p&gt;The LLM service is &lt;strong&gt;not tightly coupled&lt;/strong&gt; with the core system. It acts as an intelligent layer on top:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  It receives input&lt;/li&gt;
&lt;li&gt;  Transforms it&lt;/li&gt;
&lt;li&gt;  Sends structured data to the Subscription Service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;This design keeps the system clean while still enabling powerful behavior.&lt;/p&gt;

&lt;p&gt;I’ve written in detail about how this LLM pipeline works and how it processes natural language into database-ready events in a separate articles — [&lt;a href="https://medium.com/@akshatjme/7a30db559bf2" rel="noopener noreferrer"&gt;LINK&lt;/a&gt;]. But at a high level, the goal here wasn’t just automation.&lt;/p&gt;

&lt;p&gt;It was about &lt;strong&gt;reducing user effort to near zero&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because scalability isn’t just about handling more users.&lt;/p&gt;

&lt;p&gt;It’s also about making the system easier to use as it grows.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Learned Building for Scale
&lt;/h3&gt;

&lt;p&gt;Looking back, the biggest lesson wasn’t about microservices, APIs, or even system design.&lt;/p&gt;

&lt;p&gt;It was about &lt;strong&gt;how systems evolve&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I didn’t start with a perfect architecture. I started with something simple that worked. And that’s important because trying to over-engineer from day one usually slows you down more than it helps.&lt;/p&gt;

&lt;p&gt;But at some point, the system outgrows its original design.&lt;/p&gt;

&lt;p&gt;That’s where most developers struggle.&lt;/p&gt;

&lt;p&gt;You can either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Keep patching the existing system&lt;/li&gt;
&lt;li&gt;  Or step back and rethink the architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I learned that scalability isn’t about adding more code.&lt;br&gt;&lt;br&gt;
It’s about &lt;strong&gt;creating the right boundaries&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Breaking the system into services wasn’t just about scaling traffic. It was about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Isolating failures&lt;/li&gt;
&lt;li&gt;  Making changes safer&lt;/li&gt;
&lt;li&gt;  Keeping logic understandable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the same time, microservices are not a silver bullet.&lt;/p&gt;

&lt;p&gt;They introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Network complexity&lt;/li&gt;
&lt;li&gt;  Distributed debugging&lt;/li&gt;
&lt;li&gt;  More infrastructure to manage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the goal isn’t “use microservices.” The goal is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Use the right level of complexity for the problem you have.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Another key shift was thinking beyond features.&lt;/p&gt;

&lt;p&gt;Early on, I was focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  “Add subscriptions”&lt;/li&gt;
&lt;li&gt;  “Add notifications”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later, the thinking changed to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  “How do these parts interact?”&lt;/li&gt;
&lt;li&gt;  “What happens when this grows 10x?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And finally, the most interesting realization came from adding the LLM layer.&lt;/p&gt;

&lt;p&gt;A system can be scalable and still feel heavy to use.&lt;/p&gt;

&lt;p&gt;But when you reduce friction when users don’t have to think in terms of forms and fields you unlock a completely different experience.&lt;/p&gt;

&lt;p&gt;That’s when the system stops feeling like software… and starts feeling intuitive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;It’s about &lt;strong&gt;evolving the system as the problem grows&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I began with a simple setup — one backend, one database, straightforward APIs. And for a while, that was enough. But as soon as real-world complexity entered the picture — multiple subscriptions, notifications, automation — the cracks started to show.&lt;/p&gt;

&lt;p&gt;That’s when the shift happened.&lt;/p&gt;

&lt;p&gt;From thinking in terms of features… to thinking in terms of &lt;strong&gt;systems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Breaking the application into services brought structure. Introducing an API Gateway brought control. Separating responsibilities made the system easier to reason about.&lt;/p&gt;

&lt;p&gt;And then, adding an intelligent layer with the LLM service changed how users interact with the system entirely.&lt;/p&gt;

&lt;p&gt;Because in the end, scalability isn’t just about handling more traffic.&lt;/p&gt;

&lt;p&gt;It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  keeping systems maintainable&lt;/li&gt;
&lt;li&gt;  reducing friction for users&lt;/li&gt;
&lt;li&gt;  and designing something that can grow without collapsing under its own complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If there’s one thing I’d take away from this journey, it’s this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Don’t try to build a perfect system from day one.&lt;br&gt;&lt;br&gt;
Build something that works and be ready to redesign it when it stops working.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That’s how real systems are built.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>systemdesignconcepts</category>
      <category>scalability</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Scaling Myths That Mislead Developers</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Sat, 09 May 2026 15:28:37 +0000</pubDate>
      <link>https://forem.com/akshatjme/scaling-myths-that-mislead-developers-371</link>
      <guid>https://forem.com/akshatjme/scaling-myths-that-mislead-developers-371</guid>
      <description>&lt;h4&gt;
  
  
  Why common assumptions about scaling lead to fragile systems
&lt;/h4&gt;

&lt;p&gt;Scaling is often seen as a technical problem.&lt;/p&gt;

&lt;p&gt;More users arrive, and the system needs to handle increased load.&lt;/p&gt;

&lt;p&gt;However, many scaling failures are not caused by lack of resources.&lt;br&gt;&lt;br&gt;
They are caused by incorrect assumptions.&lt;/p&gt;

&lt;p&gt;These assumptions shape how systems are designed.&lt;br&gt;&lt;br&gt;
When they are wrong, scaling becomes difficult, expensive, and unreliable.&lt;/p&gt;

&lt;p&gt;Understanding these myths is important for building systems that perform well under real conditions.&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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2Ajnw0DizqE5iRrAMs3bs3cw.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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2Ajnw0DizqE5iRrAMs3bs3cw.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The “just add more servers” myth
&lt;/h3&gt;

&lt;p&gt;A common belief is that scaling can be solved by adding more machines.&lt;/p&gt;

&lt;p&gt;Horizontal scaling does increase capacity, but it does not fix underlying issues.&lt;/p&gt;

&lt;p&gt;If the system has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  inefficient queries&lt;/li&gt;
&lt;li&gt;  tight coupling&lt;/li&gt;
&lt;li&gt;  shared bottlenecks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adding more servers only distributes the problem.&lt;/p&gt;

&lt;p&gt;In some cases, it can make things worse by increasing coordination overhead and system complexity.&lt;/p&gt;

&lt;p&gt;Scaling works only when the architecture supports it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Premature optimization
&lt;/h3&gt;

&lt;p&gt;Optimization is often applied before understanding real bottlenecks.&lt;/p&gt;

&lt;p&gt;Developers may try to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  reduce latency early&lt;/li&gt;
&lt;li&gt;  optimize code paths unnecessarily&lt;/li&gt;
&lt;li&gt;  introduce complexity without clear need&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This leads to systems that are harder to maintain and reason about.&lt;/p&gt;

&lt;p&gt;Without real usage data, optimization decisions are based on assumptions.&lt;/p&gt;

&lt;p&gt;Effective scaling requires understanding where the system actually struggles, not where it might struggle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech over fundamentals
&lt;/h3&gt;

&lt;p&gt;There is a tendency to rely on tools and technologies as solutions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  new frameworks&lt;/li&gt;
&lt;li&gt;  distributed systems&lt;/li&gt;
&lt;li&gt;  advanced infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While these tools are useful, they do not solve fundamental design problems.&lt;/p&gt;

&lt;p&gt;Poor data modeling, inefficient workflows, and lack of clear boundaries cannot be fixed by adding new technology.&lt;/p&gt;

&lt;p&gt;Scaling is primarily a design problem, not a tooling problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Confusing performance with scalability
&lt;/h3&gt;

&lt;p&gt;Performance and scalability are related but different.&lt;/p&gt;

&lt;p&gt;Performance refers to how fast a system responds under a given load.&lt;/p&gt;

&lt;p&gt;Scalability refers to how well a system maintains performance as load increases.&lt;/p&gt;

&lt;p&gt;A system can be fast at low traffic but fail under higher load.&lt;/p&gt;

&lt;p&gt;Similarly, a scalable system may not be extremely fast, but it maintains stability as usage grows.&lt;/p&gt;

&lt;p&gt;Focusing only on performance can hide scalability issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ignoring system limits
&lt;/h3&gt;

&lt;p&gt;Every system has limits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  database capacity&lt;/li&gt;
&lt;li&gt;  network throughput&lt;/li&gt;
&lt;li&gt;  processing power&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scaling requires understanding these limits and how they are reached.&lt;/p&gt;

&lt;p&gt;Ignoring them leads to unexpected failures when the system is pushed beyond its capacity.&lt;/p&gt;

&lt;p&gt;Design decisions should consider where limits exist and how they can be managed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Assuming linear growth
&lt;/h3&gt;

&lt;p&gt;Another common assumption is that systems scale linearly.&lt;/p&gt;

&lt;p&gt;If a system handles 100 requests per second, it is expected to handle 200 with double the resources.&lt;/p&gt;

&lt;p&gt;In practice, this is rarely true.&lt;/p&gt;

&lt;p&gt;Contention, coordination overhead, and shared dependencies introduce nonlinear behavior.&lt;/p&gt;

&lt;p&gt;Performance often degrades faster than expected as load increases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Scaling is not just about handling more traffic.&lt;/p&gt;

&lt;p&gt;It is about how systems behave as conditions change.&lt;/p&gt;

&lt;p&gt;Misconceptions about scaling lead to incorrect design decisions, which become visible under pressure.&lt;/p&gt;

&lt;p&gt;By focusing on fundamentals, understanding limits, and avoiding common myths, systems can be designed to scale more reliably.&lt;/p&gt;

&lt;p&gt;This concludes the series.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>distributedsystems</category>
      <category>systemdesignconcepts</category>
      <category>softwareengineering</category>
      <category>scalability</category>
    </item>
    <item>
      <title>Why Your APIs Feel Slow (Even When They Aren’t)</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Thu, 07 May 2026 16:21:12 +0000</pubDate>
      <link>https://forem.com/akshatjme/why-your-apis-feel-slow-even-when-they-arent-i8c</link>
      <guid>https://forem.com/akshatjme/why-your-apis-feel-slow-even-when-they-arent-i8c</guid>
      <description>&lt;h4&gt;
  
  
  Understanding the gap between actual performance and perceived latency
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://medium.com/@akshatjme/observability-you-cant-fix-what-you-can-t-see-8b258663e4ee" rel="noopener noreferrer"&gt;In previous parts&lt;/a&gt;, we explored how backend systems behave under load and how design decisions impact performance.&lt;/p&gt;

&lt;p&gt;However, not all performance issues come from slow systems.&lt;/p&gt;

&lt;p&gt;In many cases, the backend is fast, but the API still feels slow.&lt;/p&gt;

&lt;p&gt;This difference comes from how latency is experienced, not just how it is measured.&lt;/p&gt;

&lt;p&gt;API performance is not only about execution time. It is also about network behavior, data transfer, and how requests are structured.&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%2Ftwu8wb772hmregzstp3v.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%2Ftwu8wb772hmregzstp3v.png" alt="Why Your APIs Feel Slow (Even When They Aren’t)" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Network latency matters
&lt;/h3&gt;

&lt;p&gt;Every API call travels over a network.&lt;/p&gt;

&lt;p&gt;Even if the backend processes a request quickly, the total time includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  travel time from client to server&lt;/li&gt;
&lt;li&gt;  routing through multiple network hops&lt;/li&gt;
&lt;li&gt;  return time for the response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This delay exists even when the backend is efficient.&lt;/p&gt;

&lt;p&gt;For users located far from the server, or on unstable networks, this latency becomes noticeable.&lt;/p&gt;

&lt;p&gt;As a result, a fast backend can still feel slow due to network distance and conditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Payload size issues
&lt;/h3&gt;

&lt;p&gt;The size of the response directly affects how long it takes to deliver.&lt;/p&gt;

&lt;p&gt;Larger payloads require more time to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  transfer over the network&lt;/li&gt;
&lt;li&gt;  process on the client side&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even small increases in payload size can add noticeable delay, especially on slower connections.&lt;/p&gt;

&lt;p&gt;Returning more data than necessary increases latency without improving functionality.&lt;/p&gt;

&lt;p&gt;Efficient APIs focus on sending only what is required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Too many API calls
&lt;/h3&gt;

&lt;p&gt;Frontend applications often depend on multiple API calls.&lt;/p&gt;

&lt;p&gt;Instead of one request, the system may perform several smaller requests to gather data.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  one call for user data&lt;/li&gt;
&lt;li&gt;  another for related items&lt;/li&gt;
&lt;li&gt;  another for additional details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if each call is fast, the total time adds up.&lt;/p&gt;

&lt;p&gt;Sequential calls increase delay further, as each request waits for the previous one.&lt;/p&gt;

&lt;p&gt;This creates the perception of a slow system, even when individual endpoints are efficient.&lt;/p&gt;

&lt;h3&gt;
  
  
  Serialization and deserialization cost
&lt;/h3&gt;

&lt;p&gt;Data needs to be converted before it is sent and after it is received.&lt;/p&gt;

&lt;p&gt;On the server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  objects are serialized into formats like JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  responses are parsed back into usable data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This process takes time.&lt;/p&gt;

&lt;p&gt;While the cost is small per request, it becomes noticeable with large payloads or frequent calls.&lt;/p&gt;

&lt;p&gt;It adds hidden overhead that is often ignored during performance evaluation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend rendering delays
&lt;/h3&gt;

&lt;p&gt;API performance is often judged by how quickly users see results.&lt;/p&gt;

&lt;p&gt;Even after the response arrives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  data must be processed&lt;/li&gt;
&lt;li&gt;  UI must be updated&lt;/li&gt;
&lt;li&gt;  components must render&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These steps add delay beyond the API response time.&lt;/p&gt;

&lt;p&gt;From the user’s perspective, the system feels slow, even if the backend responded quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of parallelism in requests
&lt;/h3&gt;

&lt;p&gt;When API calls are made sequentially, total latency increases.&lt;/p&gt;

&lt;p&gt;Each request waits for the previous one to complete.&lt;/p&gt;

&lt;p&gt;If multiple independent requests are needed, this approach wastes time.&lt;/p&gt;

&lt;p&gt;Parallel execution can reduce total wait time, but it is not always implemented.&lt;/p&gt;

&lt;p&gt;This leads to unnecessary delays in response delivery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;API performance is not only about backend speed.&lt;/p&gt;

&lt;p&gt;It is influenced by network latency, payload size, request patterns, and client-side processing.&lt;/p&gt;

&lt;p&gt;A system can be technically fast but still feel slow to users.&lt;/p&gt;

&lt;p&gt;Understanding this difference helps in designing APIs that are efficient not only in execution, but also in experience.&lt;/p&gt;

&lt;p&gt;In the next part, we will explore load testing and why many systems fail to identify performance limits early.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>apidesign</category>
      <category>performance</category>
      <category>systemdesignconcepts</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>How I Built an LLM Service That Converts Natural Language into Database Events</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Tue, 05 May 2026 16:08:45 +0000</pubDate>
      <link>https://forem.com/akshatjme/how-i-built-an-llm-service-that-converts-natural-language-into-database-events-cka</link>
      <guid>https://forem.com/akshatjme/how-i-built-an-llm-service-that-converts-natural-language-into-database-events-cka</guid>
      <description>&lt;p&gt;You open the app, fill fields, select options, and submit.&lt;/p&gt;

&lt;p&gt;It works but it’s friction.&lt;/p&gt;

&lt;p&gt;I wanted something simpler.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What if a user could just say:&lt;br&gt;&lt;br&gt;
_**&lt;/em&gt;“Netflix ₹499 monthly”&lt;em&gt;** &lt;/em&gt;…and the system handles everything?_&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%2Fdsoo9w8nbkpr13hpc2iu.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%2Fdsoo9w8nbkpr13hpc2iu.png" alt="How I Built an LLM Service That Converts Natural Language into Database Events" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Core Idea
&lt;/h3&gt;

&lt;p&gt;Instead of forcing users to adapt to the system…&lt;/p&gt;

&lt;p&gt;Make the system adapt to the user.&lt;/p&gt;

&lt;p&gt;The pipeline looks like this:&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%2Fhfpsmpxayt47jxni8c0e.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%2Fhfpsmpxayt47jxni8c0e.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each step reduces ambiguity and moves toward structured data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 — Handling Voice &amp;amp; Text Input
&lt;/h3&gt;

&lt;p&gt;The system doesn’t just rely on one type of input.&lt;/p&gt;

&lt;p&gt;Users can either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Speak&lt;/strong&gt; (“Netflix ₹499 monthly”)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Type a quick message&lt;/strong&gt; (just like a notification or note)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the first step is to normalize everything into &lt;strong&gt;plain text&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If the input is voice, we convert it using a speech-to-text service.&lt;br&gt;&lt;br&gt;
If it’s already text, we process it directly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The goal is simple: everything becomes text before any processing begins.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Example Input
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;\&lt;span class="c1"&gt;# Case 1: User typed a message (like a quick note)  
&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Netflix 499 monthly&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  

\&lt;span class="c1"&gt;# Case 2: Voice input (after speech-to-text conversion)  
&lt;/span&gt;&lt;span class="n"&gt;voice&lt;/span&gt;\&lt;span class="n"&gt;_transcribed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Spotify 199 per month&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Basic Handling Layer
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;normalize&lt;/span&gt;\&lt;span class="nf"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;\&lt;span class="n"&gt;_data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;\&lt;span class="n"&gt;_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;\&lt;span class="n"&gt;_type&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;voice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
        &lt;span class="c1"&gt;# Simulated speech-to-text (replace with real API)  
&lt;/span&gt;        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;\&lt;span class="n"&gt;_data&lt;/span&gt;  &lt;span class="c1"&gt;# already transcribed  
&lt;/span&gt;    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;\&lt;span class="n"&gt;_data&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  

\&lt;span class="c1"&gt;# Example usage  
&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;normalize&lt;/span&gt;\&lt;span class="nf"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="n"&gt;voice&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;normalize&lt;/span&gt;\&lt;span class="nf"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;voice&lt;/span&gt;\&lt;span class="n"&gt;_transcribed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;voice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;voice&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Why This Step Matters
&lt;/h3&gt;

&lt;p&gt;This step might look simple, but it’s critical.&lt;/p&gt;

&lt;p&gt;Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  It creates a &lt;strong&gt;single entry point&lt;/strong&gt; for all inputs&lt;/li&gt;
&lt;li&gt;  It keeps downstream logic clean&lt;/li&gt;
&lt;li&gt;  It allows you to support multiple input methods easily&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And more importantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;It makes the system feel natural — users can just “say” or “type” what they did.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Step 2 — Lightweight Regex Filtering
&lt;/h3&gt;

&lt;p&gt;Before sending everything to the LLM, I added a simple filter.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because not all inputs are subscription-related.&lt;/p&gt;

&lt;p&gt;This saves cost and improves accuracy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;  

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;is&lt;/span&gt;\&lt;span class="nf"&gt;_subscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  
    &lt;span class="n"&gt;patterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; \&lt;span class="p"&gt;[&lt;/span&gt;  
        &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;\\b(monthly|yearly|weekly)\\b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
        &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;₹\\d+&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
        &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;\\b(netflix|spotify|amazon|prime)\\b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;  
    \&lt;span class="p"&gt;]&lt;/span&gt;  

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;patterns&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
\&lt;span class="c1"&gt;# Example  
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;is&lt;/span&gt;\&lt;span class="nf"&gt;_subscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it’s not a subscription, we can route it elsewhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — LLM Parsing
&lt;/h3&gt;

&lt;p&gt;Now comes the important part — extracting structured data.&lt;/p&gt;

&lt;p&gt;We send the filtered input to an LLM with a strict prompt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;  

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;\&lt;span class="nf"&gt;_subscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;  
    Extract subscription details from the input.  
    Return JSON with fields:  
    name, cost, billing\_cycle  
    Input: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;  
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;  
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;  
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;\&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;\&lt;span class="p"&gt;]&lt;/span&gt;  
    &lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;\&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;\&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;  
\&lt;span class="c1"&gt;# Example  
&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parse&lt;/span&gt;\&lt;span class="nf"&gt;_subscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;\&lt;span class="n"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;  
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Netflix"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  
  &lt;/span&gt;&lt;span class="nl"&gt;"cost"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;499&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  
  &lt;/span&gt;&lt;span class="nl"&gt;"billing\_cycle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"monthly"&lt;/span&gt;&lt;span class="w"&gt;  
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4 — Structuring the Event
&lt;/h3&gt;

&lt;p&gt;Now we convert this into a system event.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;  
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;  

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;\&lt;span class="nf"&gt;_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parsed&lt;/span&gt;\&lt;span class="n"&gt;_json&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parsed&lt;/span&gt;\&lt;span class="n"&gt;_json&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  

    &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SUBSCRIPTION\_CREATED&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timestamp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;utcnow&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;isoformat&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;  
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;payload&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;\&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;\&lt;span class="p"&gt;],&lt;/span&gt;  
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;\&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;\&lt;span class="p"&gt;],&lt;/span&gt;  
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing\_cycle&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;\&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing\_cycle&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;\&lt;span class="p"&gt;]&lt;/span&gt;  
        &lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;  
&lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt;\&lt;span class="nf"&gt;_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5 — Saving to Database
&lt;/h3&gt;

&lt;p&gt;Finally, store it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;save&lt;/span&gt;\&lt;span class="n"&gt;_to&lt;/span&gt;\&lt;span class="nf"&gt;_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  
    &lt;span class="c1"&gt;# Replace with actual DB logic  
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Saving to DB:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  

&lt;span class="n"&gt;save&lt;/span&gt;\&lt;span class="n"&gt;_to&lt;/span&gt;\&lt;span class="nf"&gt;_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why This Works
&lt;/h3&gt;

&lt;p&gt;This system feels simple, but a few design decisions make it powerful:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Regex Before LLM
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Filters irrelevant input&lt;/li&gt;
&lt;li&gt;  Reduces cost&lt;/li&gt;
&lt;li&gt;  Improves signal&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. LLM for Structure, Not Logic
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  LLM extracts meaning&lt;/li&gt;
&lt;li&gt;  System enforces rules&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Event-Based Design
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Everything becomes an event&lt;/li&gt;
&lt;li&gt;  Easy to extend (notifications, analytics, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Where This Gets Interesting
&lt;/h3&gt;

&lt;p&gt;Once this pipeline is in place, you can extend it easily:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Add reminders automatically&lt;/li&gt;
&lt;li&gt;  Trigger notifications&lt;/li&gt;
&lt;li&gt;  Detect duplicates&lt;/li&gt;
&lt;li&gt;  Categorize spending&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And most importantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The user doesn’t feel like they’re using a system.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They just type or speak naturally or we can take permission and extract messages from cell phone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thought
&lt;/h3&gt;

&lt;p&gt;This isn’t about AI.&lt;/p&gt;

&lt;p&gt;It’s about reducing friction.&lt;/p&gt;

&lt;p&gt;Forms make users adapt to systems.&lt;br&gt;&lt;br&gt;
Natural language lets systems adapt to users.&lt;/p&gt;

&lt;p&gt;And that small shift makes everything feel… effortless.&lt;/p&gt;

</description>
      <category>database</category>
      <category>llm</category>
      <category>nlp</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Observability: You Can’t Fix What You Can’t See</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Sun, 03 May 2026 15:09:41 +0000</pubDate>
      <link>https://forem.com/akshatjme/observability-you-cant-fix-what-you-cant-see-5hhf</link>
      <guid>https://forem.com/akshatjme/observability-you-cant-fix-what-you-cant-see-5hhf</guid>
      <description>&lt;h4&gt;
  
  
  Understanding system behavior beyond logs and dashboards
&lt;/h4&gt;

&lt;p&gt;In previous parts, we explored how systems fail under load and how design decisions influence performance.&lt;/p&gt;

&lt;p&gt;But identifying failures is a different challenge.&lt;/p&gt;

&lt;p&gt;A system may be slow, unstable, or partially broken, yet the cause is not always visible.&lt;/p&gt;

&lt;p&gt;This is where observability becomes important.&lt;/p&gt;

&lt;p&gt;Observability is not just about collecting data.&lt;br&gt;&lt;br&gt;
It is about understanding how a system behaves internally by looking at its outputs.&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%2Fjo3l657nx1o2d7yzzgy5.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%2Fjo3l657nx1o2d7yzzgy5.png" alt="Observability: You Can’t Fix What You Can’t See" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Logs, metrics, and traces
&lt;/h3&gt;

&lt;p&gt;Observability is built on three main signals.&lt;/p&gt;

&lt;p&gt;Logs provide discrete records of events.&lt;br&gt;&lt;br&gt;
They show what happened at a specific point in time.&lt;/p&gt;

&lt;p&gt;Metrics provide aggregated numerical data.&lt;br&gt;&lt;br&gt;
They show trends such as latency, error rates, and throughput.&lt;/p&gt;

&lt;p&gt;Traces provide request level visibility.&lt;br&gt;&lt;br&gt;
They show how a single request moves through different components.&lt;/p&gt;

&lt;p&gt;Each of these serves a different purpose.&lt;/p&gt;

&lt;p&gt;Logs help in understanding specific events.&lt;br&gt;&lt;br&gt;
Metrics help in identifying patterns.&lt;br&gt;&lt;br&gt;
Traces help in connecting events across the system.&lt;/p&gt;

&lt;p&gt;None of them is sufficient on its own.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of visibility delays fixes
&lt;/h3&gt;

&lt;p&gt;When systems lack observability, problems remain hidden.&lt;/p&gt;

&lt;p&gt;Failures may exist in small forms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  slight latency increases&lt;/li&gt;
&lt;li&gt;  occasional errors&lt;/li&gt;
&lt;li&gt;  resource usage spikes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These signals are often missed without proper visibility.&lt;/p&gt;

&lt;p&gt;Over time, these small issues grow.&lt;/p&gt;

&lt;p&gt;By the time they become noticeable, the system is already under stress or failing.&lt;/p&gt;

&lt;p&gt;Lack of visibility does not prevent problems.&lt;br&gt;&lt;br&gt;
It delays their discovery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Correlation is key
&lt;/h3&gt;

&lt;p&gt;Modern systems are distributed.&lt;/p&gt;

&lt;p&gt;A single request may pass through multiple services, databases, and external APIs.&lt;/p&gt;

&lt;p&gt;Observing each component separately is not enough.&lt;/p&gt;

&lt;p&gt;The key is to &lt;strong&gt;connect events across components&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Correlation allows understanding of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  how one service affects another&lt;/li&gt;
&lt;li&gt;  where latency is introduced&lt;/li&gt;
&lt;li&gt;  how failures propagate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without correlation, data remains fragmented.&lt;/p&gt;

&lt;p&gt;With correlation, it becomes possible to identify root causes instead of symptoms.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem of too many metrics
&lt;/h3&gt;

&lt;p&gt;Collecting more data does not always improve observability.&lt;/p&gt;

&lt;p&gt;Large systems often generate thousands of metrics.&lt;/p&gt;

&lt;p&gt;This creates noise.&lt;/p&gt;

&lt;p&gt;When everything is measured, it becomes harder to identify what actually matters.&lt;/p&gt;

&lt;p&gt;Important signals get lost among less relevant data.&lt;/p&gt;

&lt;p&gt;Effective observability focuses on meaningful metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  latency&lt;/li&gt;
&lt;li&gt;  error rates&lt;/li&gt;
&lt;li&gt;  system saturation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to measure everything, but to measure what reflects system behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  Observability as a system property
&lt;/h3&gt;

&lt;p&gt;Observability is not something added later.&lt;/p&gt;

&lt;p&gt;It must be part of system design.&lt;/p&gt;

&lt;p&gt;Systems should be built in a way that their internal state can be inferred from external outputs.&lt;/p&gt;

&lt;p&gt;This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  structured logging&lt;/li&gt;
&lt;li&gt;  consistent metrics&lt;/li&gt;
&lt;li&gt;  traceable request flows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this, understanding system behavior becomes difficult, especially under load.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Observability defines how well a system can be understood from the outside.&lt;/p&gt;

&lt;p&gt;Without it, diagnosing issues becomes slow and uncertain.&lt;/p&gt;

&lt;p&gt;With it, systems become easier to analyze, debug, and improve.&lt;/p&gt;

&lt;p&gt;Performance issues, failures, and bottlenecks are not always obvious.&lt;br&gt;&lt;br&gt;
They must be observed, connected, and interpreted.&lt;/p&gt;

&lt;p&gt;In the next part, we will look at common scaling myths that often mislead developers when designing systems.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>systemdesignconcepts</category>
      <category>distributedsystems</category>
      <category>backenddevelopment</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Load Testing: Why Most Developers Do It Wrong</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Fri, 01 May 2026 15:31:42 +0000</pubDate>
      <link>https://forem.com/akshatjme/load-testing-why-most-developers-do-it-wrong-b0h</link>
      <guid>https://forem.com/akshatjme/load-testing-why-most-developers-do-it-wrong-b0h</guid>
      <description>&lt;h4&gt;
  
  
  Why testing for stability often hides the real limits of your system
&lt;/h4&gt;

&lt;p&gt;In previous parts, we explored how systems behave under pressure.&lt;/p&gt;

&lt;p&gt;Load testing is meant to reveal those behaviors before they appear in production.&lt;/p&gt;

&lt;p&gt;However, many systems still fail unexpectedly, even after being tested.&lt;/p&gt;

&lt;p&gt;The issue is not the absence of testing.&lt;br&gt;&lt;br&gt;
It is how testing is approached.&lt;/p&gt;

&lt;p&gt;Load testing is often treated as a validation step, rather than a method to understand system limits.&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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2A0aTnB1LaKS1NmFGW2m7CLQ.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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2A0aTnB1LaKS1NmFGW2m7CLQ.png" alt="Load Testing" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Load Testing&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing average instead of peak
&lt;/h3&gt;

&lt;p&gt;Most load tests simulate normal conditions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  expected number of users&lt;/li&gt;
&lt;li&gt;  typical request patterns&lt;/li&gt;
&lt;li&gt;  stable traffic levels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under these conditions, systems usually perform well.&lt;/p&gt;

&lt;p&gt;However, real failures occur under &lt;strong&gt;peak conditions&lt;/strong&gt;, not average ones.&lt;/p&gt;

&lt;p&gt;Traffic spikes, sudden bursts, and extreme concurrency reveal issues that normal testing cannot.&lt;/p&gt;

&lt;p&gt;Testing only average load gives a false sense of confidence.&lt;br&gt;&lt;br&gt;
It confirms that the system works, but not how it behaves under stress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unrealistic test scenarios
&lt;/h3&gt;

&lt;p&gt;Load tests often use simplified or artificial traffic patterns.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  uniform request distribution&lt;/li&gt;
&lt;li&gt;  predictable intervals&lt;/li&gt;
&lt;li&gt;  identical requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real user behavior is different.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  traffic comes in bursts&lt;/li&gt;
&lt;li&gt;  request patterns vary&lt;/li&gt;
&lt;li&gt;  some endpoints are used more than others&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because of this mismatch, tests fail to capture real-world complexity.&lt;/p&gt;

&lt;p&gt;The system passes the test but fails in production, where conditions are less predictable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ignoring system limits
&lt;/h3&gt;

&lt;p&gt;A key purpose of load testing is to identify limits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  maximum throughput&lt;/li&gt;
&lt;li&gt;  latency thresholds&lt;/li&gt;
&lt;li&gt;  resource saturation points&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, many tests stop once the system appears stable.&lt;/p&gt;

&lt;p&gt;They measure success instead of exploring failure.&lt;/p&gt;

&lt;p&gt;Without pushing the system to its limits, it is not possible to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  when performance starts degrading&lt;/li&gt;
&lt;li&gt;  how quickly failures spread&lt;/li&gt;
&lt;li&gt;  which component fails first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding limits is more valuable than confirming stability.&lt;/p&gt;

&lt;h3&gt;
  
  
  No continuous testing
&lt;/h3&gt;

&lt;p&gt;Load testing is often treated as a one-time activity.&lt;/p&gt;

&lt;p&gt;It is performed before release and then ignored.&lt;/p&gt;

&lt;p&gt;However, systems evolve over time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  new features are added&lt;/li&gt;
&lt;li&gt;  traffic patterns change&lt;/li&gt;
&lt;li&gt;  dependencies are updated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These changes affect performance.&lt;/p&gt;

&lt;p&gt;A system that was stable earlier may degrade gradually.&lt;/p&gt;

&lt;p&gt;Without continuous testing, these changes go unnoticed until failure occurs in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of failure analysis
&lt;/h3&gt;

&lt;p&gt;Many load tests focus on metrics like response time and throughput.&lt;/p&gt;

&lt;p&gt;But they do not analyze how the system fails.&lt;/p&gt;

&lt;p&gt;Important questions are often ignored:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  does the system degrade gradually or suddenly&lt;/li&gt;
&lt;li&gt;  which component fails first&lt;/li&gt;
&lt;li&gt;  how failures propagate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding failure behavior is essential for improving system design.&lt;/p&gt;

&lt;p&gt;Without it, testing provides limited insight.&lt;/p&gt;

&lt;h3&gt;
  
  
  No correlation with real metrics
&lt;/h3&gt;

&lt;p&gt;Load testing results are often viewed in isolation.&lt;/p&gt;

&lt;p&gt;They are not always compared with real system metrics such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  CPU usage&lt;/li&gt;
&lt;li&gt;  memory consumption&lt;/li&gt;
&lt;li&gt;  database performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this correlation, it is difficult to identify the root cause of performance issues.&lt;/p&gt;

&lt;p&gt;Testing shows that a problem exists, but not why it exists.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Load testing is not just about checking if a system works.&lt;/p&gt;

&lt;p&gt;It is about understanding how the system behaves under pressure.&lt;/p&gt;

&lt;p&gt;Testing average conditions, using unrealistic scenarios, and avoiding system limits leads to incomplete results.&lt;/p&gt;

&lt;p&gt;To be effective, load testing must explore extremes, reflect real-world usage, and evolve with the system.&lt;/p&gt;

&lt;p&gt;In the next part, we will look at observability and why understanding system behavior is essential for fixing performance issues.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>scalability</category>
      <category>backenddevelopment</category>
      <category>systemdesignconcepts</category>
      <category>softwaretesting</category>
    </item>
    <item>
      <title>How I Built a Decision-Tree Based Help and Support System</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Wed, 29 Apr 2026 16:10:54 +0000</pubDate>
      <link>https://forem.com/akshatjme/how-i-built-a-decision-tree-based-help-and-support-system-14c0</link>
      <guid>https://forem.com/akshatjme/how-i-built-a-decision-tree-based-help-and-support-system-14c0</guid>
      <description>&lt;h4&gt;
  
  
  80% of user problems are repeated patterns.
&lt;/h4&gt;

&lt;p&gt;So why are we solving them manually every time?&lt;/p&gt;

&lt;p&gt;If you’ve ever built a &lt;strong&gt;help and support system&lt;/strong&gt;, you’ve probably done this&lt;br&gt;&lt;br&gt;
Add a few FAQs, maybe a help page, and a “Contact Us” button.&lt;/p&gt;

&lt;p&gt;It feels enough.&lt;/p&gt;

&lt;p&gt;But then users start reaching out… and you notice something strange.&lt;/p&gt;

&lt;p&gt;They’re asking the same questions. Over and over again.&lt;/p&gt;

&lt;p&gt;“How do I add a subscription?”&lt;br&gt;&lt;br&gt;
“Why is my billing date wrong?”&lt;br&gt;&lt;br&gt;
“Where can I see my payments?”&lt;/p&gt;

&lt;p&gt;At first, it feels like users aren’t reading.&lt;/p&gt;

&lt;p&gt;But that’s not the real problem.&lt;/p&gt;

&lt;p&gt;The real problem is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Most help systems are designed for information.&lt;br&gt;&lt;br&gt;
Users need guidance.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A static FAQ assumes the user already knows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  what their problem is&lt;/li&gt;
&lt;li&gt;  what to search for&lt;/li&gt;
&lt;li&gt;  which answer applies to them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In reality, most users are confused at the first step.&lt;/p&gt;

&lt;p&gt;They don’t think in terms of categories like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  “billing issues”&lt;/li&gt;
&lt;li&gt;  “subscription errors”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They think in situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  “something is not working”&lt;/li&gt;
&lt;li&gt;  “I don’t understand this screen”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here’s where things get interesting.&lt;/p&gt;

&lt;p&gt;When I started looking at support requests closely, I realized something:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;A large percentage of problems were repeated patterns.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not unique cases.&lt;/p&gt;

&lt;p&gt;Just the same issues showing up again and again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  multiple users struggling to add a subscription&lt;/li&gt;
&lt;li&gt;  users misunderstanding renewal dates&lt;/li&gt;
&lt;li&gt;  confusion around monthly vs yearly billing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This changed how I looked at the problem.&lt;/p&gt;

&lt;p&gt;Instead of building a better FAQ…&lt;/p&gt;

&lt;p&gt;I started thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What if the system could guide users step-by-step to the solution instead of expecting them to find it?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That idea is what led to building a &lt;strong&gt;decision-tree based help system&lt;/strong&gt;.&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%2Fl94q5iqpq2r7iddj19e1.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%2Fl94q5iqpq2r7iddj19e1.png" alt="How I Built a Decision-Tree Based Help and Support System" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Thinking Like a System, Not a Page
&lt;/h3&gt;

&lt;p&gt;After noticing that most user issues were repetitive, the problem became clearer.&lt;/p&gt;

&lt;p&gt;The issue wasn’t lack of content.&lt;br&gt;&lt;br&gt;
It was lack of &lt;strong&gt;direction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Traditional help systems are built like documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Lists of FAQs&lt;/li&gt;
&lt;li&gt;  Search bars&lt;/li&gt;
&lt;li&gt;  Static categories&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But users don’t navigate problems like that.&lt;/p&gt;

&lt;p&gt;They don’t think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Let me go to the billing section and read all options.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Something is wrong what do I do next?”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That shift is important.&lt;/p&gt;

&lt;p&gt;Instead of designing a &lt;strong&gt;help page&lt;/strong&gt;, I started designing a &lt;strong&gt;guided system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A system that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  asks the right questions&lt;/li&gt;
&lt;li&gt;  narrows down the problem&lt;/li&gt;
&lt;li&gt;  leads the user to a solution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Almost like how a support agent would think.&lt;/p&gt;

&lt;p&gt;And that’s where the idea of a &lt;strong&gt;decision tree&lt;/strong&gt; fits naturally.&lt;/p&gt;

&lt;p&gt;Instead of overwhelming users with options, you guide them step by step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What’s the issue?&lt;/li&gt;
&lt;li&gt;  What exactly went wrong?&lt;/li&gt;
&lt;li&gt;  When did it happen?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each answer moves them closer to the solution.&lt;/p&gt;

&lt;p&gt;This approach does two things really well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Reduces user confusion&lt;/li&gt;
&lt;li&gt;  Reduces repeated support requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because now, instead of 20 users asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“How do I add a subscription?”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system guides them through the exact steps automatically.&lt;/p&gt;

&lt;p&gt;At this point, the help system stops being passive.&lt;/p&gt;

&lt;p&gt;It becomes &lt;strong&gt;interactive and problem-solving&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Designing the Decision Tree Structure
&lt;/h3&gt;

&lt;p&gt;Once the idea of a guided system was clear, the next step was structuring it properly.&lt;/p&gt;

&lt;p&gt;At its core, the help system is just a &lt;strong&gt;decision tree&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Simple concept:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Each &lt;strong&gt;node&lt;/strong&gt; = a question&lt;/li&gt;
&lt;li&gt;  Each &lt;strong&gt;branch&lt;/strong&gt; = a user choice&lt;/li&gt;
&lt;li&gt;  Each &lt;strong&gt;leaf&lt;/strong&gt; = a solution or a real person/agent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of showing everything at once, the system reveals only what’s needed at each step.&lt;/p&gt;

&lt;p&gt;Here’s a simple example:&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%2Fhg92m3wb1ti6jb35n39g.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%2Fhg92m3wb1ti6jb35n39g.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tree Structure&lt;/p&gt;

&lt;p&gt;Now compare this to a typical FAQ page.&lt;/p&gt;

&lt;p&gt;Instead of scanning 10–15 questions, the user just answers 2–3 guided steps and reaches the solution.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why This Structure Works
&lt;/h3&gt;

&lt;p&gt;This works well because of one key observation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Most user problems fall into a limited number of patterns.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Many users struggle with adding subscriptions&lt;/li&gt;
&lt;li&gt;  Many get confused about billing cycles&lt;/li&gt;
&lt;li&gt;  Many face similar payment issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So instead of handling each request individually, we &lt;strong&gt;categorize and guide&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This reduces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  repeated support queries&lt;/li&gt;
&lt;li&gt;  manual intervention&lt;/li&gt;
&lt;li&gt;  user frustration&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Designing It Properly
&lt;/h3&gt;

&lt;p&gt;While building this, a few principles mattered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Keep questions simple&lt;/li&gt;
&lt;li&gt;  Avoid deep nesting (3–5 levels max)&lt;/li&gt;
&lt;li&gt;  Always provide an exit (contact support)&lt;/li&gt;
&lt;li&gt;  Log where users drop off&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because if users abandon the flow, that’s where your system needs improvement.&lt;/p&gt;

&lt;p&gt;At this point, the structure is clear.&lt;/p&gt;

&lt;p&gt;Next step is making it &lt;strong&gt;work in code&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Implementing the Decision Tree (Python Code)
&lt;/h3&gt;

&lt;p&gt;Once the structure was clear, implementing it was surprisingly simple.&lt;/p&gt;

&lt;p&gt;You don’t need complex frameworks.&lt;br&gt;&lt;br&gt;
A decision tree can be represented using basic objects.&lt;/p&gt;

&lt;p&gt;At its core, each node needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  a question (or condition)&lt;/li&gt;
&lt;li&gt;  possible next steps&lt;/li&gt;
&lt;li&gt;  or a final action (solution)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Basic Implementation
&lt;/h3&gt;

&lt;p&gt;Here’s a clean and minimal version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node:  
    def \_\_init\_\_(self, question=None, options=None, action=None):  
        self.question = question  
        self.options = options or {}  
        self.action = action  

    def evaluate(self, context):  
        if self.action:  
            return self.action(context)  

        answer = context.get(self.question)  

        if answer in self.options:  
            return self.options\[answer\].evaluate(context)  

        return escalate\_to\_agent(context)  

\# Actions  
def resolved(ctx):  
    return "Issue Resolved"  

def retry\_payment(ctx):  
    if ctx.get("retry\_success"):  
        return "Payment Successful"  
    return escalate\_to\_agent(ctx)  

def escalate\_to\_agent(ctx):  
    return "Escalating to Customer Support Agent"  

\# Tree Construction  

tree = Node(  
    question="issue\_type",  
    options={  
        "subscription": Node(  
            question="subscription\_problem",  
            options={  
                "add": Node(  
                    question="add\_issue\_type",  
                    options={  
                        "ui": Node(action=resolved),  
                        "error": Node(action=escalate\_to\_agent)  
                    }  
                ),  
                "manage": Node(  
                    question="manage\_issue",  
                    options={  
                        "edit": Node(action=resolved),  
                        "delete": Node(action=escalate\_to\_agent)  
                    }  
                )  
            }  
        ),  
        "payment": Node(  
            question="payment\_problem",  
            options={  
                "failed": Node(action=retry\_payment),  
                "incorrect\_charge": Node(action=escalate\_to\_agent)  
            }  
        )  
    }  
)  

\# Example Context  
context = {  
    "issue\_type": "payment",  
    "payment\_problem": "failed",  
    "retry\_success": False  
}  

print(tree.evaluate(context))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What This Gives You
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  A flexible structure&lt;/li&gt;
&lt;li&gt;  Easy to extend (just add nodes)&lt;/li&gt;
&lt;li&gt;  Clear separation of logic&lt;/li&gt;
&lt;li&gt;  No hardcoded if-else chains&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And most importantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can model real user journeys instead of writing scattered logic.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In a real system, this wouldn’t use input().&lt;/p&gt;

&lt;p&gt;Instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  UI handles selections&lt;/li&gt;
&lt;li&gt;  Backend returns next node&lt;/li&gt;
&lt;li&gt;  State is maintained per sessionNow the final step is connecting this to your actual system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Integrating It into the Real Project
&lt;/h3&gt;

&lt;p&gt;The best part about this help and support system is that it doesn’t need to live separately from the main application.&lt;/p&gt;

&lt;p&gt;I integrated it as its own &lt;strong&gt;Help/Support Service&lt;/strong&gt; inside the project architecture.&lt;/p&gt;

&lt;p&gt;The flow is simple:&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%2F4qx4b16cg1lnzn20ywre.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%2F4qx4b16cg1lnzn20ywre.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a user taps &lt;strong&gt;Help&lt;/strong&gt;, the mobile app sends the selected category or current screen context to the service.&lt;/p&gt;

&lt;p&gt;For example, if the user is on the &lt;em&gt;Add Subscription&lt;/em&gt; page and opens support, the system can already start from a relevant branch of the tree instead of asking generic questions.&lt;/p&gt;

&lt;p&gt;This makes the experience feel much smarter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reducing Human Effort
&lt;/h3&gt;

&lt;p&gt;The biggest win was reducing repeated manual support effort.&lt;/p&gt;

&lt;p&gt;Earlier, if 20 users had trouble adding a new subscription, all 20 would either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  read the same FAQ&lt;/li&gt;
&lt;li&gt;  message support&lt;/li&gt;
&lt;li&gt;  wait for a response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, the tree handles the majority of these repeated issues automatically.&lt;/p&gt;

&lt;p&gt;Some common examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  unable to add a new subscription&lt;/li&gt;
&lt;li&gt;  confusion between monthly and yearly plans&lt;/li&gt;
&lt;li&gt;  payment failure after renewal&lt;/li&gt;
&lt;li&gt;  missing notification alerts&lt;/li&gt;
&lt;li&gt;  dashboard analytics not updating&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are &lt;strong&gt;pattern-based problems&lt;/strong&gt;, which makes them perfect for tree traversal.&lt;/p&gt;

&lt;p&gt;This means human agents only need to handle edge cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Escalation Path
&lt;/h3&gt;

&lt;p&gt;Every branch ends with one of two outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Resolved automatically&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Escalate to human agent&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That fallback is important.&lt;/p&gt;

&lt;p&gt;Because no matter how good the tree is, some cases will always need human judgment.&lt;/p&gt;

&lt;p&gt;The system should help users first, not trap them.&lt;/p&gt;

&lt;p&gt;That balance is what makes it practical inside a larger product.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Learned Building This
&lt;/h3&gt;

&lt;p&gt;Building a &lt;strong&gt;help and support system&lt;/strong&gt; like this taught me something simple but important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Most problems are not unique they’re repeated patterns.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you accept that, the solution becomes clearer.&lt;/p&gt;

&lt;p&gt;You don’t need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  more FAQs&lt;/li&gt;
&lt;li&gt;  more documentation&lt;/li&gt;
&lt;li&gt;  more support agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need a system that can &lt;strong&gt;recognize patterns and guide users&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The decision-tree approach worked well because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  it simplifies user choices&lt;/li&gt;
&lt;li&gt;  it reduces cognitive load&lt;/li&gt;
&lt;li&gt;  it scales without increasing support effort&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But it’s not perfect.&lt;/p&gt;

&lt;p&gt;Some trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Deep trees can become hard to manage&lt;/li&gt;
&lt;li&gt;  Poorly designed questions can confuse users&lt;/li&gt;
&lt;li&gt;  Edge cases still require human support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the goal isn’t to replace support.&lt;/p&gt;

&lt;p&gt;It’s to &lt;strong&gt;handle the predictable 70–80% of issues automatically&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;A help system shouldn’t just exist it should &lt;strong&gt;actively solve problems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Most applications treat support as a secondary feature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  static pages&lt;/li&gt;
&lt;li&gt;  long FAQs&lt;/li&gt;
&lt;li&gt;  contact forms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But users don’t want information.&lt;/p&gt;

&lt;p&gt;They want &lt;strong&gt;resolution&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By turning the help system into a &lt;strong&gt;decision-tree based flow&lt;/strong&gt;, you shift from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  passive content → guided experience&lt;/li&gt;
&lt;li&gt;  repeated queries → automated solutions&lt;/li&gt;
&lt;li&gt;  manual effort → scalable support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the result is something that feels natural.&lt;/p&gt;

&lt;p&gt;Users don’t feel like they’re navigating a system.&lt;br&gt;&lt;br&gt;
They feel like the system understands them.&lt;/p&gt;

&lt;p&gt;That’s when support stops being a feature…&lt;/p&gt;

&lt;p&gt;and starts becoming part of the product experience.&lt;/p&gt;

</description>
      <category>systemdesignconcepts</category>
      <category>softwareengineering</category>
      <category>backenddevelopment</category>
      <category>userexperience</category>
    </item>
    <item>
      <title>Async Processing: The Secret to Surviving Spikes</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Mon, 27 Apr 2026 16:05:51 +0000</pubDate>
      <link>https://forem.com/akshatjme/async-processing-the-secret-to-surviving-spikes-4n45</link>
      <guid>https://forem.com/akshatjme/async-processing-the-secret-to-surviving-spikes-4n45</guid>
      <description>&lt;h4&gt;
  
  
  How decoupling work from requests helps systems stay stable under load
&lt;/h4&gt;

&lt;p&gt;In the previous part, we saw the limitations of synchronous systems.&lt;/p&gt;

&lt;p&gt;When every request waits for all operations to complete, performance suffers under load. Resources remain blocked, and slow dependencies affect the entire flow.&lt;/p&gt;

&lt;p&gt;Asynchronous processing takes a different approach.&lt;/p&gt;

&lt;p&gt;Instead of doing all work during the request, it separates immediate responses from background work.&lt;/p&gt;

&lt;p&gt;This shift changes how systems handle load, especially during traffic spikes.&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%2Fu15n1j4s1npi631d3wya.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%2Fu15n1j4s1npi631d3wya.png" alt="Async Processing" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Decoupling work from requests
&lt;/h3&gt;

&lt;p&gt;In an asynchronous system, not all work is done in real time.&lt;/p&gt;

&lt;p&gt;The request handles only what is necessary for an immediate response.&lt;br&gt;&lt;br&gt;
The remaining work is moved to background processing.&lt;/p&gt;

&lt;p&gt;This reduces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  request duration&lt;/li&gt;
&lt;li&gt;  resource usage during the request&lt;/li&gt;
&lt;li&gt;  dependency on slow operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By decoupling work, the system avoids holding resources for long periods and improves overall throughput.&lt;/p&gt;

&lt;h3&gt;
  
  
  Queues absorb traffic spikes
&lt;/h3&gt;

&lt;p&gt;Queues are a core part of asynchronous systems.&lt;/p&gt;

&lt;p&gt;Instead of processing all requests immediately, incoming tasks are stored in a queue and processed at a controlled rate.&lt;/p&gt;

&lt;p&gt;This creates a buffer between incoming traffic and system capacity.&lt;/p&gt;

&lt;p&gt;During traffic spikes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  requests are queued instead of rejected&lt;/li&gt;
&lt;li&gt;  processing happens gradually&lt;/li&gt;
&lt;li&gt;  system load remains stable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Queues do not eliminate load, but they prevent sudden overload.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improved user experience
&lt;/h3&gt;

&lt;p&gt;Asynchronous systems improve perceived performance.&lt;/p&gt;

&lt;p&gt;Users receive faster responses because the system does not wait for all operations to complete.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  a request can be accepted immediately&lt;/li&gt;
&lt;li&gt;  heavy processing happens in the background&lt;/li&gt;
&lt;li&gt;  results are delivered later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reduces user wait time and makes the system feel more responsive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event driven architecture basics
&lt;/h3&gt;

&lt;p&gt;Asynchronous systems are often built around events.&lt;/p&gt;

&lt;p&gt;Instead of calling services directly and waiting for responses, components emit events when something happens.&lt;/p&gt;

&lt;p&gt;Other components react to these events independently.&lt;/p&gt;

&lt;p&gt;This model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  reduces direct dependencies between services&lt;/li&gt;
&lt;li&gt;  allows work to happen in parallel&lt;/li&gt;
&lt;li&gt;  improves system flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Event driven systems shift the focus from request flow to state changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Better resource utilization
&lt;/h3&gt;

&lt;p&gt;Asynchronous processing allows better use of system resources.&lt;/p&gt;

&lt;p&gt;Since requests are shorter and less blocking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  threads are freed faster&lt;/li&gt;
&lt;li&gt;  connections are reused efficiently&lt;/li&gt;
&lt;li&gt;  overall throughput increases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Background workers can process tasks independently, making better use of available capacity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isolation of failures
&lt;/h3&gt;

&lt;p&gt;In synchronous systems, failure in one step affects the entire request.&lt;/p&gt;

&lt;p&gt;In asynchronous systems, failures can be isolated.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  a background job can fail without blocking user requests&lt;/li&gt;
&lt;li&gt;  retries can be handled separately&lt;/li&gt;
&lt;li&gt;  issues remain contained within specific components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reduces the impact of failures on the overall system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trade offs of asynchronous systems
&lt;/h3&gt;

&lt;p&gt;Asynchronous systems are not without challenges.&lt;/p&gt;

&lt;p&gt;They introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  increased system complexity&lt;/li&gt;
&lt;li&gt;  delayed consistency&lt;/li&gt;
&lt;li&gt;  need for monitoring background jobs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Debugging becomes harder because work is distributed across multiple components.&lt;/p&gt;

&lt;p&gt;Despite these trade offs, the benefits are significant for systems under variable load.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Asynchronous processing changes how systems handle work.&lt;/p&gt;

&lt;p&gt;By separating immediate responses from background tasks, systems can reduce load, improve responsiveness, and handle traffic spikes more effectively.&lt;/p&gt;

&lt;p&gt;This approach is especially useful in environments where demand is unpredictable.&lt;/p&gt;

&lt;p&gt;In the next part, we will explore why APIs feel slow even when backend systems are fast.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>performance</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>The Hidden Cost of Synchronous Systems</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Sat, 25 Apr 2026 15:05:22 +0000</pubDate>
      <link>https://forem.com/akshatjme/the-hidden-cost-of-synchronous-systems-d33</link>
      <guid>https://forem.com/akshatjme/the-hidden-cost-of-synchronous-systems-d33</guid>
      <description>&lt;h4&gt;
  
  
  Why waiting for every step to finish can quietly slow down your entire backend
&lt;/h4&gt;

&lt;p&gt;In previous parts, we explored how system design choices affect performance.&lt;/p&gt;

&lt;p&gt;One such choice is how work is executed.&lt;/p&gt;

&lt;p&gt;Many backend systems follow a &lt;strong&gt;synchronous model&lt;/strong&gt;, where each step waits for the previous one to complete.&lt;/p&gt;

&lt;p&gt;This approach is simple and easy to reason about.&lt;/p&gt;

&lt;p&gt;However, under load, it introduces hidden costs that affect performance, scalability, and user experience.&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%2F33wj1a8fzd1ymdvsd9ae.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%2F33wj1a8fzd1ymdvsd9ae.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Blocking requests
&lt;/h3&gt;

&lt;p&gt;In a synchronous system, a request waits until all operations are complete.&lt;/p&gt;

&lt;p&gt;During this time, system resources remain occupied.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  threads stay blocked&lt;/li&gt;
&lt;li&gt;  connections remain open&lt;/li&gt;
&lt;li&gt;  memory is held&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reduces the number of requests the system can handle at the same time.&lt;/p&gt;

&lt;p&gt;As traffic increases, blocked resources begin to accumulate, leading to slower responses and reduced throughput.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slow dependencies lead to slow systems
&lt;/h3&gt;

&lt;p&gt;A synchronous flow depends on the speed of each component.&lt;/p&gt;

&lt;p&gt;If one dependency is slow, the entire request becomes slow.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  database queries&lt;/li&gt;
&lt;li&gt;  external APIs&lt;/li&gt;
&lt;li&gt;  internal services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each step adds to the total response time.&lt;/p&gt;

&lt;p&gt;The system’s performance becomes limited by its slowest dependency.&lt;/p&gt;

&lt;p&gt;This creates a chain where delays propagate across the entire request lifecycle.&lt;/p&gt;

&lt;h3&gt;
  
  
  User perceived latency
&lt;/h3&gt;

&lt;p&gt;In synchronous systems, users wait for the full operation to complete.&lt;/p&gt;

&lt;p&gt;Even if some parts of the work are not immediately required, the response is delayed until everything finishes.&lt;/p&gt;

&lt;p&gt;This increases perceived latency.&lt;/p&gt;

&lt;p&gt;From the user’s perspective, the system feels slow, even if individual operations are fast.&lt;/p&gt;

&lt;p&gt;Reducing perceived latency is not only about speed, but also about how responses are structured.&lt;/p&gt;

&lt;h3&gt;
  
  
  No parallelism advantage
&lt;/h3&gt;

&lt;p&gt;Synchronous execution processes tasks in sequence.&lt;/p&gt;

&lt;p&gt;This limits the ability to use available resources efficiently.&lt;/p&gt;

&lt;p&gt;Many operations can be performed independently, but in a synchronous flow they are executed one after another.&lt;/p&gt;

&lt;p&gt;This results in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  underutilized resources&lt;/li&gt;
&lt;li&gt;  longer total processing time&lt;/li&gt;
&lt;li&gt;  lower system efficiency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Parallel execution can reduce total latency, but synchronous systems do not take full advantage of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limited scalability under load
&lt;/h3&gt;

&lt;p&gt;As traffic increases, synchronous systems struggle to scale.&lt;/p&gt;

&lt;p&gt;Each request holds resources for its entire duration.&lt;br&gt;&lt;br&gt;
More requests require more threads, more connections, and more memory.&lt;/p&gt;

&lt;p&gt;At some point, the system reaches its limits.&lt;/p&gt;

&lt;p&gt;This makes scaling more expensive and less efficient compared to systems that release resources early.&lt;/p&gt;

&lt;h3&gt;
  
  
  Coupling between operations
&lt;/h3&gt;

&lt;p&gt;Synchronous flows create tight coupling between steps.&lt;/p&gt;

&lt;p&gt;Each operation depends on the previous one to complete successfully.&lt;/p&gt;

&lt;p&gt;If one step fails or slows down, the entire request is affected.&lt;/p&gt;

&lt;p&gt;This reduces flexibility and makes systems more sensitive to failures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Synchronous systems are simple and predictable, but they come with trade-offs.&lt;/p&gt;

&lt;p&gt;They block resources, amplify the impact of slow dependencies, and limit how efficiently a system can scale.&lt;/p&gt;

&lt;p&gt;These costs are not always visible at small scale, but they become significant under load.&lt;/p&gt;

&lt;p&gt;Understanding these limitations is important when designing systems that need to handle real-world traffic.&lt;/p&gt;

&lt;p&gt;In the next part, we will explore asynchronous processing and how it helps systems handle load more efficiently.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>design</category>
      <category>softwaredevelopment</category>
      <category>performance</category>
      <category>systemsthinking</category>
    </item>
    <item>
      <title>Why Microservices Make Performance Worse (If Done Wrong)</title>
      <dc:creator>Akshat Jain</dc:creator>
      <pubDate>Thu, 23 Apr 2026 16:16:27 +0000</pubDate>
      <link>https://forem.com/akshatjme/why-microservices-make-performance-worse-if-done-wrong-2i5e</link>
      <guid>https://forem.com/akshatjme/why-microservices-make-performance-worse-if-done-wrong-2i5e</guid>
      <description>&lt;h4&gt;
  
  
  How breaking your system into services can increase complexity and slow everything down
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://medium.com/codetodeploy/designing-systems-that-dont-collapse-under-pressure-11ae443fcdfc" rel="noopener noreferrer"&gt;In the previous part&lt;/a&gt;, we discussed how to design systems that survive under pressure.&lt;/p&gt;

&lt;p&gt;Microservices are often seen as a solution to scaling and reliability.&lt;/p&gt;

&lt;p&gt;But in practice, many systems become slower and harder to manage after moving to microservices.&lt;/p&gt;

&lt;p&gt;The problem is not microservices themselves.&lt;br&gt;&lt;br&gt;
The problem is how they are used.&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%2Fm0307za24k7wtsx7licv.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%2Fm0307za24k7wtsx7licv.png" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Too many network calls
&lt;/h3&gt;

&lt;p&gt;In a monolithic system, components communicate in memory.&lt;/p&gt;

&lt;p&gt;In microservices, communication happens over the network.&lt;/p&gt;

&lt;p&gt;Every request between services adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  network latency&lt;/li&gt;
&lt;li&gt;  serialization and deserialization cost&lt;/li&gt;
&lt;li&gt;  additional failure points&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single user request may trigger multiple internal calls.&lt;/p&gt;

&lt;p&gt;This increases total response time.&lt;/p&gt;

&lt;p&gt;What was once a fast internal function call becomes a slower network operation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chatty services problem
&lt;/h3&gt;

&lt;p&gt;Microservices often become too dependent on each other.&lt;/p&gt;

&lt;p&gt;Instead of one efficient call, services make many small calls.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  service A calls service B&lt;/li&gt;
&lt;li&gt;  service B calls service C&lt;/li&gt;
&lt;li&gt;  service C returns partial data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates a chain of requests.&lt;/p&gt;

&lt;p&gt;Each call adds latency.&lt;br&gt;&lt;br&gt;
Together, they create significant overhead.&lt;/p&gt;

&lt;p&gt;This pattern is known as chatty services.&lt;/p&gt;

&lt;p&gt;It is one of the most common causes of slow systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Distributed failures
&lt;/h3&gt;

&lt;p&gt;In a distributed system, failures spread easily.&lt;/p&gt;

&lt;p&gt;If one service becomes slow or unavailable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  dependent services are affected&lt;/li&gt;
&lt;li&gt;  requests start timing out&lt;/li&gt;
&lt;li&gt;  retries increase traffic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can lead to cascading failures across the system.&lt;/p&gt;

&lt;p&gt;Unlike monoliths, where failure is contained, microservices increase the surface area of failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harder debugging
&lt;/h3&gt;

&lt;p&gt;Debugging performance issues becomes more complex.&lt;/p&gt;

&lt;p&gt;In a single system, it is easier to trace a request.&lt;/p&gt;

&lt;p&gt;In microservices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  requests pass through multiple services&lt;/li&gt;
&lt;li&gt;  logs are spread across systems&lt;/li&gt;
&lt;li&gt;  latency is distributed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finding the root cause requires tracing across multiple components.&lt;/p&gt;

&lt;p&gt;Without proper observability, diagnosing issues becomes difficult.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data consistency challenges
&lt;/h3&gt;

&lt;p&gt;Microservices often manage separate databases.&lt;/p&gt;

&lt;p&gt;This improves independence but creates consistency challenges.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  data may not be updated at the same time&lt;/li&gt;
&lt;li&gt;  systems may temporarily disagree&lt;/li&gt;
&lt;li&gt;  additional logic is required to handle this&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managing consistency adds complexity and can impact performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overengineering too early
&lt;/h3&gt;

&lt;p&gt;Microservices are often adopted too early.&lt;/p&gt;

&lt;p&gt;For small systems, they introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  more services to manage&lt;/li&gt;
&lt;li&gt;  more deployment complexity&lt;/li&gt;
&lt;li&gt;  more communication overhead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before scaling becomes a real problem, this added complexity slows development and performance.&lt;/p&gt;

&lt;p&gt;A simple system becomes unnecessarily complicated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Microservices are powerful, but they are not a default solution.&lt;/p&gt;

&lt;p&gt;They introduce network overhead, increase system complexity, and make failures harder to manage.&lt;/p&gt;

&lt;p&gt;When used correctly, they help systems scale.&lt;br&gt;&lt;br&gt;
When used too early or without proper design, they make performance worse.&lt;/p&gt;

&lt;p&gt;Choosing the right architecture depends on the problem, not the trend.&lt;/p&gt;

&lt;p&gt;In the next part, we will look at synchronous systems and how waiting on responses can slow down your backend.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>designsystems</category>
      <category>backenddevelopment</category>
      <category>microservicearchitecture</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
