<?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: vishal</title>
    <description>The latest articles on Forem by vishal (@vishalrana9915).</description>
    <link>https://forem.com/vishalrana9915</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%2F973339%2Fda26261f-d4b9-4f6f-b605-667486dcafb9.png</url>
      <title>Forem: vishal</title>
      <link>https://forem.com/vishalrana9915</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vishalrana9915"/>
    <language>en</language>
    <item>
      <title>How I Built a Personal AI Assistant That Remembers Everything — So I Don’t Have To</title>
      <dc:creator>vishal</dc:creator>
      <pubDate>Tue, 31 Mar 2026 04:39:58 +0000</pubDate>
      <link>https://forem.com/vishalrana9915/how-i-built-a-personal-ai-assistant-that-remembers-everything-so-i-dont-have-to-1pdn</link>
      <guid>https://forem.com/vishalrana9915/how-i-built-a-personal-ai-assistant-that-remembers-everything-so-i-dont-have-to-1pdn</guid>
      <description>&lt;p&gt;A practical guide to running your entire life with just your voice.&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%2Flqsnc9sc54x58u1ld8u7.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%2Flqsnc9sc54x58u1ld8u7.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  I have a terrible memory for the things that matter most.
&lt;/h2&gt;

&lt;p&gt;Not the big stuff — I remember birthdays, deadlines, major milestones. I mean the small things that quietly shape a life. The conversation where a colleague mentioned something that turned out to be important three weeks later. The moment I realized I hadn’t called my dad in two weeks. The health metric I tracked for four days and then completely forgot about. The task I was going to do “right after this” that never got done.&lt;/p&gt;

&lt;p&gt;I tried every system. Notebooks. Apps. Reminders. Post-its. I’d set up elaborate structures and abandon them within a week because maintaining the system took more energy than the work itself.&lt;/p&gt;

&lt;p&gt;Then I built &lt;a href="https://chela.io" rel="noopener noreferrer"&gt;Chela&lt;/a&gt;— and I stopped forgetting.&lt;/p&gt;

&lt;p&gt;This is a practical guide to how it works, what it does, and how you can use it to actually take control of your day.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Idea: Stop Managing Systems. Just Talk
&lt;/h2&gt;

&lt;p&gt;Most productivity tools ask you to serve them. You open the app, pick a category, fill a field, and hit save. Repeat, forever, or the system dies.&lt;/p&gt;

&lt;p&gt;Chela flips this. Instead of going to the tool, you just speak out loud, naturally, the way you’d tell a friend about your day. Chela captures it, understands it, and structures it automatically.&lt;/p&gt;

&lt;p&gt;Here’s what a typical morning looks like for me now:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Finished a 40-minute run. Had a good call with the design team — they need the brief by Thursday. Remind me to call the accountant at 2 PM. I slept about 6 hours, feeling a bit groggy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;From that single voice note, Chela automatically logs:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A 40-minute exercise session&lt;/li&gt;
&lt;li&gt;A task: send design brief — due Thursday&lt;/li&gt;
&lt;li&gt;A reminder: call the accountant at 2 PM&lt;/li&gt;
&lt;li&gt;A sleep metric: 6 hours&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;No typing. No switching apps. No decisions. Thirty seconds of talking, and your day is already organized.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Feature 1: Voice-First Input — The Interface That Gets Out of the Way
&lt;/h2&gt;

&lt;p&gt;The voice-first design isn’t just a convenience — it’s a philosophy.&lt;/p&gt;

&lt;p&gt;Typing forces you into structure before you’re ready. You have to decide: is this a task or a note? Does it go in the journal or the habit tracker? That micro-decision, repeated dozens of times a day, is what kills most productivity systems.&lt;/p&gt;

&lt;p&gt;Speaking doesn’t have that problem. You say what’s on your mind, in whatever order it comes, and Chela sorts it out on the other end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to use it effectively:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Morning brain dump&lt;/strong&gt;: Right after you wake up, before you look at anything else, speak whatever’s on your mind. Tasks you’re worried about, things you need to do, how you’re feeling. Two minutes of unfiltered thought creates a surprisingly clear picture of your day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Post-meeting capture&lt;/strong&gt;: Immediately after a call or meeting, record a 60-second debrief. What was decided? What do you need to do? What should you remember? This is where most action items die — Chela keeps them alive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mid-day check-ins&lt;/strong&gt;: A quick “just finished X, now moving to Y” keeps your log current without interrupting your flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-of-day reflection&lt;/strong&gt;: A two-minute spoken summary of your day — what went well, what didn’t, what’s carrying over tomorrow — is more valuable than any journal template.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;The principle: lower the activation energy to zero, and you’ll actually do it.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 2: Automatic Habit &amp;amp; Metric Tracking — No Manual Logging Required
&lt;/h2&gt;

&lt;p&gt;Most habit trackers fail because they require a deliberate action at the end of the day to mark something done. By then, you’ve either forgotten half of it or you’re too tired to care.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Chela tracks your habits as a side effect of talking about your day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you mention you went for a run, it logs exercise. When you say you had eight glasses of water, it logs hydration. When you mention reading for 30 minutes before bed, it logs reading time. Sleep, calories, cycling, steps — all of it gets captured from natural language, automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The metrics Chela tracks out of the box:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sleep duration&lt;/li&gt;
&lt;li&gt;Exercise (type and duration)&lt;/li&gt;
&lt;li&gt;Calories and nutrition&lt;/li&gt;
&lt;li&gt;Reading time&lt;/li&gt;
&lt;li&gt;Hydration&lt;/li&gt;
&lt;li&gt;Any custom metric you tell it to watch for&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Practical tip: You don’t need to be precise. “I slept roughly seven hours” works just as well as “7 hours and 14 minutes.” Chela extracts the number and the context. Over time, it builds a picture of your patterns that’s more accurate than anything you’d log manually — because you’re not curating it, you’re just living and talking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The goal isn’t perfect data. It’s consistent data. And voice capture makes consistency effortless.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 3: QUIT IT — A Dedicated Module for Breaking Bad Habits
&lt;/h2&gt;

&lt;p&gt;Building good habits is one side of the equation. The other — and often harder — side is quitting the bad ones.&lt;/p&gt;

&lt;p&gt;Chela has a dedicated module called &lt;strong&gt;&lt;em&gt;QUIT IT&lt;/em&gt;&lt;/strong&gt;, built specifically for this. Whether you’re trying to quit smoking, cut back on alcohol, stop watching porn, or break any other habit that’s been quietly draining you — QUIT IT gives you a structured, compassionate way to track your progress without judgment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here’s how it works: you can choose which habit to quit from the menu section on the home screen. From then on, you log your urges and slip-ups the same way you log everything else — by talking. No forms, no shame spirals, no complicated trackers. Just honest voice notes. “Had a craving around 3 PM but didn’t act on it.” “Slipped up tonight, one cigarette.” Chela logs it, tracks your streaks, and notices your patterns — what triggers the urge, what time of day is hardest, what situations put you at risk.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Over time, that data becomes insight. And insight is what turns a vague intention to quit into an actual plan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why this approach works better than willpower alone:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Most quitting attempts fail not because people aren’t motivated, but because they have no visibility into their own patterns. You don’t realize that you always reach for a cigarette after a stressful call, or that your drinking spikes on Tuesday evenings, until someone — or something — maps it for you.&lt;/p&gt;

&lt;p&gt;QUIT IT does that mapping. Quietly, consistently, without making you feel bad about the days you struggled. Because quitting something hard is not a straight line, and a tool that treats every slip-up as a failure is a tool you’ll stop using.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 4: Task &amp;amp; Reminder Automation — From Thought to Action in Seconds
&lt;/h2&gt;

&lt;p&gt;The most dangerous place for a task to live is in your head. It feels like you’ll remember it. You won’t.&lt;br&gt;
Every time you mention something that needs doing — explicitly (“remind me to call Sarah”) or implicitly (“I need to follow up on that invoice”) — Chela creates a structured task or reminder with a time and priority attached.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;What this looks like in practice:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Say “Remind me to submit the report Friday morning” and Chela creates a task titled “Submit report” due Friday at 9 AM. Say “I need to follow up with the client next week” and it schedules a follow-up task without you lifting a finger. Say “Don’t let me forget to renew the domain” and it flags a reminder. Say “Call mom tonight” and it appears in your evening reminders automatically.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No forms. No dropdowns. No copy-pasting between apps. The task exists because you said it once.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One important setup step: Enable notifications when Chela asks for permission. This is what transforms reminders from a passive list into an active system — Chela nudges you at the right moment so nothing slips through. Without notifications, you’d have to remember to check the app. With them, Chela checks on you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;How to get the most out of task automation:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you finish a meeting, immediately speak about your action items. Don’t wait. “Three things from that call: update the contract, send the agenda for Thursday, and ask James about the budget.”&lt;/li&gt;
&lt;li&gt;Use natural time references — “by the end of the week,” “before my flight,” “next Monday morning.” Chela understands context.&lt;/li&gt;
&lt;li&gt;Do a quick verbal task review in the morning. Speaking “what do I have to do today?” and then narrating your priorities cements them and keeps your log updated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Your task list stops being something you manage. It becomes something that builds itself.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 5: People &amp;amp; Relationships — Chela Learns Who Everyone Is
&lt;/h2&gt;

&lt;p&gt;Here’s something most productivity tools completely ignore: the people in your life.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you log tasks and notes, you’re constantly referencing people — by name, by role, by relationship. “Call my wife.” “Follow up with the accountant.” “Check in with Jake from the design team.” Most apps treat these as plain text. Chela treats them as connections.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first time you mention someone alongside their relationship — “&lt;em&gt;had a great dinner with Sarah, my wife&lt;/em&gt;” — Chela builds that link. From that point on, whenever you say “my wife,” Chela knows you mean Sarah. Say “remind me to pick up something for my wife’s birthday” and the reminder is connected to Sarah, not just a floating note about a spouse.&lt;/p&gt;

&lt;p&gt;Over time, Chela quietly builds a relationship map of your world: family members, colleagues, friends, and clients. Each name is anchored to a role, each role is anchored to a real person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why this matters in practice:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can speak naturally without repeating context. “Call mom” works. “Follow up with my manager” works. You don’t have to remind Chela who these people are every single time.&lt;/li&gt;
&lt;li&gt;When you search for someone by name, you also surface everything logged under their relationship — and vice versa.&lt;/li&gt;
&lt;li&gt;Notes about a person accumulate over time. Before an important call with a client, search their name, and you’ll find every task, conversation snippet, and observation you’ve ever logged about them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;It’s a small thing that makes every other feature feel more personal. Because your life isn’t made of tasks and metrics — it’s made of people. Chela remembers them too.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 6: Universal Search — Find Anything, From Any Conversation, Ever
&lt;/h2&gt;

&lt;p&gt;This is the feature that quietly solves a problem you didn’t know you had: the anxiety of forgetting.&lt;/p&gt;

&lt;p&gt;Every voice note, every log entry, every task, metric, and reflection is permanently indexed and searchable. Not just keyword search — contextual search that understands what you were talking about, not just what words you used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Practical examples of what this unlocks:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Before a meeting&lt;/strong&gt;: Search “everything I’ve said about [client name]” and get a full history of your notes, concerns, decisions, and outstanding tasks — in seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monthly review&lt;/strong&gt;: Search “sleep this month” or “exercise in March” and see your actual data, not an estimate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lost thoughts&lt;/strong&gt;: Search “that idea I had about the pricing model” even if you can’t remember exactly how you phrased it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accountability&lt;/strong&gt;: Search “things I said I’d do this week” and see what actually happened.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The shift this creates&lt;/strong&gt;: You stop keeping things in your head as a backup. You know Chela has them. That mental release — the ability to think “I’ll just tell Chela” and genuinely trust that you’ll find it later — is one of the most underrated productivity upgrades I’ve experienced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Build the habit of searching before you assume you’ve forgotten something. Nine times out of ten, it’s there.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature 7: Daily Briefings — Know What Matters Before the Day Starts
&lt;/h2&gt;

&lt;p&gt;Every morning, before the noise of the day begins, Chela gives you a briefing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Not a dump of everything in your calendar. A curated summary of what actually matters today: your top tasks, any reminders due, habits you’ve been building, and context pulled from your recent logs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s the equivalent of having a chief of staff review your day before you wake up and tell you: “Here’s what you need to focus on. Here’s what you said you’d do. Here’s what you shouldn’t forget.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;How to use your daily briefing effectively:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read or listen to it before you check your email or messages. Your briefing sets your agenda; your inbox sets everyone else’s.&lt;/li&gt;
&lt;li&gt;Use it as a trigger for your morning voice note. After seeing your priorities, speak a quick “here’s what I’m actually going to do today” — this creates accountability and gives Chela updated context.&lt;/li&gt;
&lt;li&gt;Pay attention to recurring items. If something keeps showing up in your briefing and never gets done, that’s a signal — either it’s not actually important, or there’s a real block worth addressing.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The daily briefing turns Chela from a logging tool into a planning partner. It closes the loop between what you captured yesterday and what you need to do today&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Mistakes Most People Make in the First Week
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://chela.io" rel="noopener noreferrer"&gt;Chela&lt;/a&gt; is simple to use, but there are a few patterns that trip people up early on. Knowing them in advance will save you a lot of frustration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mistake 1: Waiting for the “right” moment to record.&lt;/em&gt;&lt;/strong&gt; People treat voice notes like they’d treat a journal entry — something to sit down and do properly. Don’t. Chela works best when you capture things in the moment: right after a meeting, right after a workout, right after a thought crosses your mind. Waiting until the end of the day means you’re reconstructing from memory, which defeats the whole purpose.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Mistake 2: Being too formal.&lt;/strong&gt;&lt;/em&gt; You don’t need to speak in clean sentences. “Gym, 45 minutes, legs day, feeling good” is enough. Chela isn’t grading your grammar — it’s extracting meaning. The more naturally you talk, the better it works. You can record in your native language. &lt;strong&gt;&lt;em&gt;We support more than 99+ languages&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Mistake 3: Not enabling notifications.&lt;/strong&gt;&lt;/em&gt; This one kills the task and reminder system entirely. Without notifications, Chela can create reminders all day long, and you’ll never see them until you open the app. Enable them on day one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Mistake 4: Quitting after a missed day.&lt;/strong&gt;&lt;/em&gt; The value of Chela compounds over time. One missed day doesn’t break the system — the logs are still there, the patterns are still building. Just pick up where you left off. Unlike a habit streak tracker, Chela doesn’t punish gaps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Your System: The First Week
&lt;/h2&gt;

&lt;p&gt;Here’s a practical guide to making Chela part of your daily life:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Day 1–2: Just capture, don’t optimize.&lt;/strong&gt;&lt;/em&gt; Download the app, and for 48 hours, use it as a pure voice journal. Talk about your day, your tasks, your thoughts. Don’t worry about structure. Let Chela learn your patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Day 3–4: Notice what it extracts.&lt;/em&gt;&lt;/strong&gt; Review your task list and metrics(You can choose from a list of trackers that Chela can track). What did Chela pick up automatically? What did it miss? Choose from the list of trackers/metrics that Chela will track for you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Day 5–7: Add the daily rituals.&lt;/strong&gt;&lt;/em&gt; Lock in a morning brain dump (2 minutes), and an end-of-day debrief (2 minutes). These two habits, done consistently, are the backbone of the whole system.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Week 2 onwards:&lt;/strong&gt;&lt;/em&gt; Start using search actively. Before any important meeting or decision, search your logs. Let Chela’s memory supplement yours. The compounding value starts here.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Productivity Unlock
&lt;/h2&gt;

&lt;p&gt;After several months of using Chela daily, the biggest change isn’t that I’m more organized — it’s that I trust myself more.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you have a reliable system for capturing what you’ve said and what you’ve committed to, you stop the background anxiety of wondering what you’ve forgotten. You stop re-processing the same thoughts because you know they’re safe somewhere. You stop losing good ideas and important details to the simple fact of a busy day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The overhead of maintaining your life drops to almost nothing. And everything you recover — the attention, the energy, the mental clarity — you can actually put toward the things that matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Today. Seriously.
&lt;/h2&gt;

&lt;p&gt;Here’s the honest truth: most people who read articles like this don’t do anything differently afterward. They close the tab, think “that’s interesting,” and go back to their seven apps and their low-grade panic.&lt;/p&gt;

&lt;p&gt;Don’t be that person.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chela.io" rel="noopener noreferrer"&gt;Download Chela&lt;/a&gt;. &lt;em&gt;&lt;strong&gt;Enable notifications&lt;/strong&gt;&lt;/em&gt;. Record one voice note today — even just 30 seconds about what you need to do tomorrow. That’s it. That’s the whole starting point.&lt;br&gt;
The system builds itself from there.&lt;/p&gt;

&lt;p&gt;You just have to talk.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Chela is available on iOS and Android at chela.io. &lt;em&gt;&lt;strong&gt;Redeem code CHELAFIRST50 in your profile for 7-day free access. Limited slots only&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
      <category>ai</category>
      <category>mentalhealth</category>
      <category>startup</category>
    </item>
    <item>
      <title>I Spent Years Optimizing Servers, But Forgot to Optimize My Own Life.</title>
      <dc:creator>vishal</dc:creator>
      <pubDate>Wed, 04 Feb 2026 11:32:49 +0000</pubDate>
      <link>https://forem.com/vishalrana9915/i-spent-years-optimizing-servers-but-forgot-to-optimize-my-own-life-382n</link>
      <guid>https://forem.com/vishalrana9915/i-spent-years-optimizing-servers-but-forgot-to-optimize-my-own-life-382n</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I’ve spent the last few years writing about Event-Driven Architecture, Kafka, and WebSockets. I love building systems that handle millions of requests without crashing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But recently, I realized the one system that was crashing… was me.&lt;br&gt;
As a father and a developer, my personal “RAM” was full. I wanted to track my health, journal my thoughts, and remember the funny things my kid said. But let’s be real-at the end of a 10-hour coding session, I had zero energy to open a health app and tap through five menus just to log that I drank a glass of water.&lt;br&gt;
So, the data was lost. The memories faded. My “personal logs” were empty.&lt;/p&gt;

&lt;p&gt;I decided to fix it. Not with a complex Notion template, but with code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The “Zero-Friction” Solution&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I asked myself: What is the lowest latency input method for humans? It’s not typing. Its voice.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I built &lt;a href="https://chela.io" rel="noopener noreferrer"&gt;Chela&lt;/a&gt;. It’s an app that acts like an ingestion layer for my brain. &lt;strong&gt;I don’t categorize. I don’t organize. I just speak.&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%2Fhmt8duq0dxyocaas5knu.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%2Fhmt8duq0dxyocaas5knu.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How I Use It (The “Dad” Workflow)&lt;br&gt;
Here is what happened yesterday. I was exhausted, but I wanted to log my day. Instead of typing, I just held the button and said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I slept about 7 hours last night, feeling good. Had a great workout for a couple of hours, had 5 glasses of water, and did meditation for 10 min, also remind me to have a call today with the social media marketer.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is what Chela did with that 10-second audio:&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%2Fuiff9aus8zy718x7kehp.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%2Fuiff9aus8zy718x7kehp.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;It didn’t just save the audio; it structured the data.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;_Health &amp;amp; Activity&lt;/li&gt;
&lt;li&gt;Sleep logged (7 hours)&lt;/li&gt;
&lt;li&gt;Workout Captured&lt;/li&gt;
&lt;li&gt;Meditation Captured&lt;/li&gt;
&lt;li&gt;Water Intake Captured&lt;/li&gt;
&lt;li&gt;Tasks &amp;amp; Todos_&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Added “Meeting with social media marketer” to my list&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;&lt;br&gt;
I didn’t build this to be the next “Unicorn AI startup.” I built it because I was tired of forgetting my own life.&lt;/p&gt;

&lt;p&gt;I wanted a Second Brain that didn’t feel like homework.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are a working professional, a parent, or just someone who feels like their brain has too many open tabs, I’d love for you to try it. It’s the first system I’ve built that prioritizes peace of mind over throughput.&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%2Fmgepa4exrv0hz2lbzyd9.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%2Fmgepa4exrv0hz2lbzyd9.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can download it here and let me know if it helps you clear your cache:&lt;br&gt;
Download for &lt;a href="https://apps.apple.com/us/app/chela-io/id6756540516" rel="noopener noreferrer"&gt;IOS&lt;/a&gt; &lt;br&gt;
Download for &lt;a href="https://play.google.com/store/apps/details?id=com.chelaio.chela" rel="noopener noreferrer"&gt;Android&lt;/a&gt;\&lt;/p&gt;

&lt;p&gt;A Step Toward a Simplified Life&lt;/p&gt;

&lt;p&gt;Join thousands of early adopters who have stopped typing and started living.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://chela.io/blog/introducing-chela.html" rel="noopener noreferrer"&gt;https://chela.io/blog/introducing-chela.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>devjournal</category>
      <category>ai</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Back Of The Envelop Estimation</title>
      <dc:creator>vishal</dc:creator>
      <pubDate>Thu, 12 Jan 2023 10:11:38 +0000</pubDate>
      <link>https://forem.com/vishalrana9915/back-of-the-envelop-estimation-45m1</link>
      <guid>https://forem.com/vishalrana9915/back-of-the-envelop-estimation-45m1</guid>
      <description>&lt;p&gt;Back of the envelop estimation is exactly what the name implies “Back Of The Envelop”. Back-of-the-envelope (BOE) estimation is a quick and approximate method of estimating an unknown value.&lt;/p&gt;

&lt;p&gt;The method is based on using simple and rough approximations, along with basic mathematical operations and known values, to estimate an unknown value. For example, you may use proportions, ratios, and order-of-magnitude calculations to estimate a value, rather than using complex formulas or exact measurements.&lt;/p&gt;

&lt;p&gt;A “back of the envelope” (BOE) estimation is a rough calculation that is often used in the early stages of system design to quickly estimate the order of magnitude of a quantity or to gain a rough understanding of the feasibility of a project. BOE estimates are not intended to be precise, but they can provide valuable information that can guide further research and development.&lt;/p&gt;

&lt;p&gt;Let’s say you want to design a new application something like Youtube, You need to be aware of the rough estimations for speed, throughput, or capacity.&lt;/p&gt;

&lt;p&gt;For this blog, we’ll understand how BOE can be used to estimate the resources that are required, the amount of storage that we required, the throughput that we are targeting and how scalable the system needs to be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Power of two
&lt;/h2&gt;

&lt;p&gt;For calculating the data volume , we can use something called Power of 2. One bit represent the smallest unit of memory in computer, A byte is made up of 8 bits and 1024 bytes made up a kilobyte.&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%2Fgglik5tdsq1a6e12oh18.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%2Fgglik5tdsq1a6e12oh18.png" alt=" " width="483" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Let’s say you are designing a system for a large company that is basically like YouTube. They have large user base , each users can upload videos of any size and view video. Here are some numbers:&lt;/p&gt;

&lt;p&gt;Let’s understand how much data is being uploaded to the server each day and what will be the QPS for the system to process.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily active users : 1 billion&lt;/li&gt;
&lt;li&gt;Daily video upload 100 million( let’s say 10% of users upload )&lt;/li&gt;
&lt;li&gt;Average user upload 1 video a day&lt;/li&gt;
&lt;li&gt;Average video size: 500MB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use these numbers, Let’s quickly create a BOE estimation&lt;/p&gt;

&lt;h2&gt;
  
  
  Estimation
&lt;/h2&gt;

&lt;p&gt;Query per second (QPS) estimation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we have 1 billion DAU.&lt;/li&gt;
&lt;li&gt;10% of the user uploads 1 video per day
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Daily uploaded video = 1 billion * 10%= 100 million

Query per second = (100 million * 1 video ) / 24 hours / 3600 seconds = ~1200 (approx)

Peek QPS = 2 * QPS = ~ 2400 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ll have 2400 requests per second in peek hours.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let’s estimate media storage:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;We have 1 billion DAU&lt;/li&gt;
&lt;li&gt;Each user uploads 1 video per day&lt;/li&gt;
&lt;li&gt;Each video has 500MB of size.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Daily users uploaded video = 1 billion * 10%= 100 million

Media storage per day = 100 million * 1(videos a day)* 500MB= 50 PB(Petabyte) storage

Media storage per year = 50 PB * 365 = 19 exabyte per year

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

&lt;/div&gt;



&lt;p&gt;we need 19 exabyte of storage to store media for a single year.&lt;/p&gt;

&lt;p&gt;Back-of-the-envelope estimation is all about the process. Solving the problem is more important than obtaining results&lt;/p&gt;

&lt;h2&gt;
  
  
  Power of 10
&lt;/h2&gt;

&lt;p&gt;It is difficult to perform complicated math operations during the estimation. For example, what is the result of “99987 / 9.1”? There is no need to spend time to solve complicated math problems. Precision is not expected. Use round numbers and approximation to your advantage. The division question can be simplified as follows: “100,000 / 10”&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%2F1h3dnx6yz3fj84s01pv6.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%2F1h3dnx6yz3fj84s01pv6.png" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In estimation, a power of 10 refers to a factor of 10 that is raised to a certain exponent. For example, 10³ (10 to the 3rd power) is equal to 1,000. This concept is often used to express very large or very small numbers in a more manageable form.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;For example, instead of writing out 0.000000001, it can be written as 10^-9 (10 to the -9th power). This makes it easier to perform calculations and to understand the order of magnitude of a number.&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule of 72
&lt;/h2&gt;

&lt;p&gt;The Rule of 72 is a quick way to estimate the number of years it will take for an investment to double in value given a fixed annual rate of return. It works by dividing 72 by the annual rate of return as a percentage.&lt;/p&gt;

&lt;p&gt;How this is valid in our case, the rule of 72 can be used to calculate the time when our traffic can be double for the platform.&lt;/p&gt;

&lt;p&gt;let say our application is growing with a pace of 8% per month. so we can use this rule to calculate how much time it will take to double the traffic for our app.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;72/8 = 9 month&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will take 9 months to double the traffic with this 8% increase in traffic each month.&lt;/p&gt;

&lt;p&gt;It’s important to note that the Rule of 72 is only an approximation and it only works with fixed rate of change.&lt;/p&gt;

&lt;p&gt;In conclusion, Back of the envelop estimation can help you in figuring out a rough estimation for your storage, load on server so that you can plan things accordingly before designing your systems.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Consistent Hashing</title>
      <dc:creator>vishal</dc:creator>
      <pubDate>Wed, 11 Jan 2023 04:51:49 +0000</pubDate>
      <link>https://forem.com/vishalrana9915/consistent-hashing-986</link>
      <guid>https://forem.com/vishalrana9915/consistent-hashing-986</guid>
      <description>&lt;p&gt;In this blog, we’ll talk about &lt;strong&gt;what is consistent hashing and why we need to use it and how it can be used&lt;/strong&gt;. Let’s first understand why we need to use consistent hashing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Consistent Hashing?
&lt;/h2&gt;

&lt;p&gt;In our previous blog about system design. We define a problem where one server is not able to server our heavy load of traffic and we need something reliable, so we thought of scaling our server horizontally and adding a load balancer on top of it to redirect traffic to each server equally.&lt;br&gt;
When a client sends a request to a load balancer, the load balancer routes the request to one of the servers in its pool of servers using a load balancing algorithm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are several different load balancing algorithms that can be used to determine which server to send the request to. Some common algorithms include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Round-robin: The load balancer sends requests to servers in a rotation, sending the next request to the next server in the list.&lt;/li&gt;
&lt;li&gt;Least connections: The load balancer sends requests to the server with the least number of active connections.&lt;/li&gt;
&lt;li&gt;Least response time: The load balancer sends requests to the server that has the lowest response time for previous requests.&lt;/li&gt;
&lt;li&gt;Weighted round-robin: The load balancer sends requests to servers in a rotation, but the rotation is based on the weight assigned to each server. Servers with a higher weight receive a higher proportion of the requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The load balancer can also use health checks to monitor the status of each server and route requests only to healthy servers. This helps to ensure that requests are not sent to servers that are down or experiencing issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  HASH FUNCTION
&lt;/h2&gt;

&lt;p&gt;Load balancers also use a hash function to redirect the user to server which they were connected before. A hash function is a mathematical function that takes an input value (also called a key) and returns a fixed-size output value (also called a hash or a digest).&lt;/p&gt;

&lt;p&gt;Hash function are good, in case where we want to connect a user to same server throughout its course of actions so that we can server them better based on the session state or cache we have stored for that user on that same server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4cmhij21oir8hs00kunk.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%2F4cmhij21oir8hs00kunk.png" alt=" " width="800" height="699"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If another user connects, load balancer will calculate the hash value and decide which server to assign that request. It is important to assign the same user to same server as we have cache and other things related to that user saved on the server that can help us to server they better.&lt;/p&gt;

&lt;p&gt;This looks good, but the problem is when servers are added and removed from the server pool.&lt;/p&gt;

&lt;p&gt;Let’s understand how it is a problem.&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%2F1thsoe9t8po9zpg2dgah.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%2F1thsoe9t8po9zpg2dgah.png" alt=" " width="800" height="686"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s suppose , due to increase in load, we added a new server and now we have 5 servers to serve the traffic. Now, the issue is when user A will make a request, it will be handled by completely different server because our servers increased and so does our hash function output, because before it was calculating the value considering 4 servers but now we have 5. so This is where the whole issue lies.&lt;/p&gt;

&lt;p&gt;Adding or Removing a server will result in shuffling the users on different servers and this can be a big problem for us. So what is the solution?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is where Consistent Hashing comes in.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS CONSISTENT HASHING?
&lt;/h2&gt;

&lt;p&gt;Consistent hashing is a hashing technique that allows nodes to be added or removed from a hash table (also called a distributed hash table or DHT) without significantly altering the mapping of keys to nodes.&lt;/p&gt;

&lt;p&gt;It means , we can add and remove servers without doing much of the shuffling of connected users.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In consistent hashing, the set of all possible keys is called the “hash space.” The hash space is typically represented as a circle, with the keys distributed evenly around the circle. This representation is called a “hash ring.”&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%2F7pqqa42hszrwszystf8k.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%2F7pqqa42hszrwszystf8k.png" alt=" " width="769" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once we connect our hash space and repesents it like a ring that will be called hash ring.&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%2F1b5pl0d3j7egmht2wp86.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%2F1b5pl0d3j7egmht2wp86.png" alt=" " width="380" height="338"&gt;&lt;/a&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%2Fcjckuedmatg5r78a8zb9.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%2Fcjckuedmatg5r78a8zb9.png" alt=" " width="437" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each node in the distributed system is also assigned a position on the hash ring, and is responsible for storing the keys that fall within a certain range of the hash ring. The range of keys that a node is responsible for is called its “zone.”&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Using a hash function, we can map servers onto the ring.&lt;br&gt;
*&lt;/em&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%2Fnen4k31cgyaogpwfmv5d.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%2Fnen4k31cgyaogpwfmv5d.png" alt=" " width="512" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we have our server mapped on to the ring, let’s understand how the requests will be handled by these servers.&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%2Fymastdpd3hm8zhljfv43.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%2Fymastdpd3hm8zhljfv43.png" alt=" " width="605" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each request will be handled by the first server it encounter by moving to the clockwise direction. Based on the hash function, r1 is places on the ring between s4 and s1, so r1 will be handled by the server s1. r2 is places on the ring between s2 and s1, so r2 will be handled by the server s2. r3 is places on the ring between s4 and s3, so r3 will be handled by the server s4.&lt;/p&gt;

&lt;p&gt;When a new request is inserted into the system, it is hashed and placed on the hash ring at a specific position.&lt;/p&gt;

&lt;p&gt;This looks good. Now what will happen when we add and remove servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding A New Server
&lt;/h2&gt;

&lt;p&gt;Adding a new server to the ring will require only redistribution of few keys as we discussed before.&lt;/p&gt;

&lt;p&gt;Let’s suppose we added a new server and based on the hash function , it is placed on the ring between s3 and s4.&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%2Fi8x6z2e0tloqpj8ddx96.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%2Fi8x6z2e0tloqpj8ddx96.png" alt=" " width="687" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we add a new server s5, it is mapped on the ring between s3 and s4. So the only requests that needs to be shuffled is r3. So from now on, r3 is handled by the server s5.&lt;/p&gt;

&lt;h2&gt;
  
  
  Removing A Server
&lt;/h2&gt;

&lt;p&gt;Removing a server from the ring will require only redistribution of few keys as well.&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%2Fosynyeyet3fzifwjrf3g.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%2Fosynyeyet3fzifwjrf3g.png" alt=" " width="659" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s suppose s1 goes down, then the only request that need to redistributed is r1 . Based on the clockwise approach, r1 will be handled by the server s2.&lt;/p&gt;

&lt;p&gt;This looks good as we have solved large redistribution of requests if any server is added or removed. But there are few issues with this approach as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Issues With Consistent Hashing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Uneven hash space.&lt;/li&gt;
&lt;li&gt;Non uniform request distribution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Uneven hash space&lt;/strong&gt;&lt;br&gt;
It is impossible to keep the size of each hash space on the ring same for all servers considering that new servers can be added and existing one can be removed.&lt;/p&gt;

&lt;p&gt;It is possible that the size of the hash space on the ring assigned to each server is very small or fairly large.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non uniform request distribution&lt;/strong&gt;&lt;br&gt;
Non uniform request distribution means distribution of most of the requests to one server and little or no request to other servers. &lt;br&gt;
It might happen that our hash function will create results that will make most of the requests to be handled by one server only.&lt;/p&gt;

&lt;p&gt;So, how do we fix these two issues?&lt;/p&gt;

&lt;p&gt;A technique called virtual nodes is used to solve these two issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtual nodes
&lt;/h2&gt;

&lt;p&gt;Virtual nodes refers to real nodes. Each server we have on the ring has multiple virtual nodes. Let’s try to understand it with an 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%2Fblv6d44zitg4beblo85g.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%2Fblv6d44zitg4beblo85g.png" alt=" " width="785" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In above diagram, we have 3 virtual nodes for server 1 that points to server 1, it means any request handled by the virtual nodes will be redirected to s1.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A server can have more virtual nodes as well 3 is just an arbitrary number.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now according to our virtual nodes, request r3 will be handed by VN 1_2 as it was handled by s5.&lt;/p&gt;

&lt;p&gt;As the number of virtual nodes increases, the distribution of requests become more balanced. We can use different hash functions for our virtual nodes to distribute them across hash ring.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                          - - - 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I hope this gives you an understanding of how consistent hashing works and why we use it.&lt;/p&gt;

&lt;p&gt;Overall, consistent hashing is a useful tool for distributing keys evenly across a group of nodes in a distributed system, and for minimising the impact of changes to the system on the distribution of keys. &lt;br&gt;
It can be an effective way to scale and manage distributed systems, and is worth considering for organizations that need to maintain high levels of performance and availability.&lt;/p&gt;

</description>
      <category>welcome</category>
      <category>community</category>
      <category>forem</category>
    </item>
  </channel>
</rss>
