<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mayank Kumar on Medium]]></title>
        <description><![CDATA[Stories by Mayank Kumar on Medium]]></description>
        <link>https://medium.com/@mayankkumar1205?source=rss-c2b21340bc24------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ARFgXzn_Vt7JpO0i</url>
            <title>Stories by Mayank Kumar on Medium</title>
            <link>https://medium.com/@mayankkumar1205?source=rss-c2b21340bc24------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:52:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mayankkumar1205/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kedarkantha: Fine Doesn’t Feel Like Enough]]></title>
            <link>https://medium.com/@mayankkumar1205/kedarkantha-fine-doesnt-feel-like-enough-8142254b1ca1?source=rss-c2b21340bc24------2</link>
            <guid isPermaLink="false">https://medium.com/p/8142254b1ca1</guid>
            <dc:creator><![CDATA[Mayank Kumar]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 10:49:39 GMT</pubDate>
            <atom:updated>2026-04-03T10:49:39.894Z</atom:updated>
            <content:encoded><![CDATA[<p><em>If you haven’t read Part 1, it’s </em><a href="https://medium.com/@mayankkumar1205/kedarkantha-the-city-brain-goes-to-the-mountains-80bc14eef3b0"><em>here</em></a><em>. It’s fine to start here. The mountains don’t require prerequisite reading.</em></p><p>There is a concept in thermodynamics called <em>activation energy</em> — the minimum energy required to start a reaction, even if the final state is lower energy than where you began. Going downhill is easier. But getting there still requires a push.</p><p>Summit day was all activation energy.</p><h3>-10°C, No Sleep, and Borrowed Footsteps</h3><p>We woke up in the dark at Dhoka camp, the temperature sitting at -10°C — the cold that doesn’t announce itself so much as simply take up residence in your joints. Light breakfast, black tea, headlamps on. We set off before sunrise, deliberately late enough to avoid the morning crowd at the top but early enough to not be navigating icy trail in afternoon slush. This sounds very rational at 10 PM and extremely debatable at 4:30 AM.</p><p>Every exhale produced a small cloud. I’d read that this happens because the moisture in warm breath condenses when it meets cold air — the same physics behind actual clouds, but personalised, right in front of your face. In cold enough air, you become a tiny weather system. You’re advised to keep drinking water partly because of this: you’re losing moisture with every breath and not feeling thirsty in the cold, which is your body lying to you in a way that has a name — <em>cold-induced blunting of thirst</em>.</p><p>I was moving slower than usual. My legs — trained through months to go fast and keep going — were fine. My glasses, however, refused to cooperate. Fogged glasses versus a cold nose: I chose the nose. This meant I was navigating by the footsteps of the person ahead of me, which is, now that I think about it, a <em>reasonable</em> strategy for life in conditions of low visibility. One foot in front of the other. Trust the path that’s already been made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZOWXfkBukcOP3YGGE2wE7A.png" /></figure><p>The terrain got serious as we climbed. Snow thigh-deep in places just off the trail — one misstep and you’d sink into it like a debugging error that swallows all your context. Trek lead and guides were always nearby, watchful, the way a good reviewer is: not doing the work for you, but absolutely ready to catch something before it becomes a serious problem.</p><p>Audvik, the seven-year-old in our group, was also climbing. I want to sit with that for a moment. Seven years old. Kedarkantha summit. I have genuinely met adults who treat a 3 km uphill walk as a trauma event, and here was a child ascending a Himalayan peak before he’s lost all his milk teeth. He wasn’t even breathing hard. His legs were moving at a frequency that suggested he had not yet been informed that mountains are supposed to be difficult.</p><h3>The Path Not Taken (Involuntarily)</h3><p>Manas, Priyam, and a few others reached the summit before me. I was making my way up with Krutika — a fellow first-timer and, it turned out, a birder (a new word for me on this trip; apparently <em>“I like birds”</em> is just a preference, and <em>“I go birding”</em> is an entire community). We were climbing steadily when we realised we’d taken a slightly wrong line and had ended up on a section of slope where the path simply wasn’t. Forward felt exposed. Going back felt equally committed. Neither option was obvious.</p><p>We shouted. Nobody heard us — they were busy celebrating at the top, which, to be fair, is exactly what you do when you reach a summit. Eventually a guide spotted us and talked us through an alternate approach. We made it, arriving slightly wild-eyed, the way people do when they’ve briefly touched the edge of a situation they didn’t plan for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaEJ7JgUWd_oQwSmYmD4uA.jpeg" /></figure><p>I’m glad it happened, in retrospect. Robert Frost was talking about a road in a yellow wood, but the mountain gave us a literal version: the path not taken, taken accidentally, with significantly higher stakes than poetry.</p><h3>At the Top of the World</h3><p>Kedarkantha stands at 12,500 feet. At the summit, you get a full 360 degrees of the Garhwal Himalayas — Swargarohini, Bandarpoonch, Black Peak, and further away, the Gangotri range. There are peaks here that have been climbed fewer times than people have followed through on learning guitar after buying one. It’s the kind of view that makes every Wi-Fi password, meeting invite, and notification badge on your phone feel like a very elaborate misallocation of attention.</p><p>The air at the top is thinner, which your body notices before your brain does. You take a step, pause, take another. Breathing becomes a slightly more deliberate activity — not a struggle, just a conscious negotiation. Your lungs ask for more. You give them time. The trade-off is that everything slows down enough for you to actually look at what’s around you, which is something most of us are catastrophically bad at in daily life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wA_NvNI9wxRcsudH4_0n7Q.jpeg" /></figure><p>The name itself — Kedar-kantha, or “the throat of Kedar” — is tied to Shiva. Local lore holds that this was a meditative resting point on his journey toward Kedarnath, one of the Char Dham pilgrimage sites. The mountains are dense with such stories — there’s barely a peak, pass, or river in the Uttarkashi region that doesn’t have a mythological layer under the physical one. The <em>Swarg</em> in Swargarohini literally means heaven. Standing where you’re standing, looking at where it’s pointing, you understand how it got the name. You also understand, in a quiet and slightly embarrassing way, why people have always needed to put gods at the top of things. It’s not naïve. It’s the only proportionate response.</p><p>The exhaustion of the climb had simply ceased to exist. Something about having physically <em>earned</em> a view does something to you that no amount of googling the same image can replicate — and everyone at the top seemed to feel it at once. Photographs were taken in quantities that would have embarrassed us back in the city and felt entirely reasonable here.</p><p>And then, somewhere in the middle of all of this: Jitesh proposed to Uttami.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*UrtKOlK-q3iWeW_vsU40Eg.png" /></figure><p>No build-up. No getting down on one knee. Just Uttami turning to the group and announcing, excited, <em>“guys I just got engaged.”</em> We turned. Jitesh confirmed with the slightly stunned expression of a man who has just done the thing and is still catching up to it. We immediately made him get on one knee properly anyway — not to invalidate the moment but because a summit proposal with no photographic evidence is a missed opportunity of the highest order.</p><p>We were the only group at the top for a long stretch — that particular silence, of having a high place entirely to yourself, is a gift. The sun was bright, the wind was doing things up there that it doesn’t do lower down — it came in gusts that felt like the mountain clearing its throat, and in the gaps between them, the quiet was total. Leaving felt like it required a decision. We made it anyway. The descent was waiting.</p><h3>Gravity Is Free, Running Is Faster</h3><p>Descents have a physics problem: they’re mechanically easier than ascents but practically harder on the body. Knees absorb more impact going down. Traction is less predictable. The mountain lets you go faster than it’s safe to go, and this is where discipline is required.</p><p>We had been warned — firmly — not to slide. Sliding ruins the trail for everyone behind you, compressing and icing over the snow in ways that compound across hundreds of trekkers. It’s a collective action problem: individually satisfying, collectively destructive. Classic. We did not slide.</p><p>But we ran.</p><p><em>Nobody said anything about running.</em></p><p>Manas and I found each other at the front within about thirty seconds of starting the descent and without a single word of discussion, we just went. The trail — wide enough, clearly marked, free of obstacles — seemed to invite it. We ran through snow sections, slowed for anything uncertain, ran again. It was, in the only word that works here, <em>fun</em> — the best kind, the one that doesn’t require justification and leaves you slightly out of breath and grinning at the ground.</p><p>We stopped again at the same flat area from DIY day, and the ponchos came out — not for rain, but for sliding on a broad patch well clear of any trail. This was, technically, allowed. We took the opportunity and accelerated through it with zero regret. The snow fight resumed, this time with even more intent than before. Someone had a score to settle. I’m not saying it was me. I’m not saying it wasn’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bhr6fOL7m1AoCraCbHQ4vw.jpeg" /></figure><p>Back at Khujai camp by afternoon, we did a cooldown, handed in gear, and gathered in the community tent while our trek lead shared stories from his years in the mountains — fires lit with an igniter and a small gas cylinder, the kind of practical knowledge that sounds simple and isn’t. He ran through the technique while we watched, the way you watch someone demonstrate something that makes total sense and that you will absolutely forget to practice. We played games. Nobody wanted to sleep. An evening where the right call is clearly to just stay in it.</p><h3>The Silent Walk</h3><p>The final descent day to Kotgaon was different, and deliberately so.</p><p>Trek lead asked us to maintain silence on the trail and go slowly — and specifically requested that the fast walkers move to the back. This request was an attack at me. Everyone knew it. There was an informal consensus that I should be at the rear, and the usual front-runners of our group formed a gentle, cheerful human barrier behind which they attempted to contain me. They tried sincerely. I kept finding gaps. By a certain point it had stopped being a descent and become a simple proof: that for every human barrier, there is, if you look carefully enough, a gap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BfbmYEPfr-9AC2doLQt5Uw.jpeg" /></figure><p>In the quiet, the forest revealed what the noise had been covering. The trail here is dense oak — old, thick-trunked, the tree has been absorbing monsoons and winters for decades. We used the Merlin app to identify birds by their calls, which remains one of the more quietly remarkable pieces of software I’ve encountered: you hit record, it listens, and within seconds it gives you a species match. Acoustic machine learning running on your phone in the middle of a mountain forest. It still feels improbable every time it works.</p><p>The trouble was that every time I opened the app to record, the bird would stop chirping. This happened with a reliability that felt personal. At some point, we just stopped walking entirely, stood still, and waited. Trek lead’s voice came through the trees: <em>“Krutika, come fast.”</em> She noted, correctly: he had never called her name except in the exact moments she was trying to do something small and good. The universe has a sense of timing and it is terrible.</p><p>Then a call came, very close, just to our left. We looked. A Rufous Sibia — rust-and-grey, with a slightly imperious expression, rare for the area — sat on a branch maybe five metres away, seemed to register us with mild interest, and flew off. We didn’t capture it on camera. It didn’t matter. Some things are better as memory than as content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZKh1Hfw3-tLCsddxtF-dgg.jpeg" /></figure><p>Walking in silence through a mountain forest for an hour is an underrated activity that I’ll be recommending for the rest of my life. The city gives you noise as default and silence as exception. Up here it’s reversed. Your brain does something different when it isn’t being <em>constantly</em> fed. It starts noticing things. The colour of bark. The specific creak of a branch. The fact that you are breathing, and that breathing is enough.</p><p>I found a maple leaf along the way — the deep-cut, symmetrical that you’d expect on a Canadian flag — and it has been on the back cover of my phone. Small souvenir. Zero weight. Maximum meaning-to-mass ratio of anything I carried on the entire trek.</p><p>Before the forest ended and the snow thinned, our guides had one last ambush waiting. They had positioned themselves at the last major snow patch, stocked and ready, the way you are when you have been waiting patiently for exactly the right moment. Everyone got pelted. There was running, there was screaming, there was snow down the back of jackets. We arrived at Kotgaon breathless and grinning, wondering if we had really walked this far on Day 1, because the path felt entirely different going back — the way all good things do.</p><h3>Siddu, Shuttlecocks, and a Ghost Story Gone Wrong</h3><p>The basecamp welcomed us back with actual applause, which after four days felt like a standing ovation. We accepted it humbly and with full knowledge that we had done nothing that hundreds of people don’t do every season, and it still felt wonderful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDMesDPiQXoWKSkNr6Et9w.png" /></figure><p>There was gear to return, bags to repack, the particular satisfaction of shedding layers you no longer needed. The weight on your back gets lighter, and then you realise the weight in your legs has also, somehow, shifted into something that just feels like tiredness rather than effort. The tiredness you can be proud of.</p><p>We went to Urjino cafe for sandwiches and siddu — a local steamed bread that deserves considerably more fame than it currently has, something you eat once and then spend the drive home trying to describe to people who weren’t there — and then played volleyball and badminton at 9,000 feet, where the ball moves just slightly strangely and you feel every rally in your lungs before your legs. Badminton at altitude has a specific comedy to it: the shuttle drifts in ways that suggest the wind has opinions, and your footwork, already compromised by four days of trekking, becomes aspirational at best.</p><p>We then gathered as a group to answer two questions on slips of paper: what was the best part of the trek, and who did you most admire? Papers were collected and read aloud at random. The answers were unexpectedly earnest — people wrote about summit silence, about a moment on a specific morning, about watching someone else push through something hard. The answers you wouldn’t give in a meeting room but will give, apparently, on a slip of paper at 9,000 feet with tired legs and nowhere else to be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*n7WuQLVdK9WATmia" /></figure><p>The evening ended with our trek lead narrating ghost stories as the cafe darkened around us. I had ordered cappuccino — good cappuccino, the one that requires your full attention and a steady hand. He reached the jumpscare right as I lifted the cup to my lips.</p><p>I spilled it everywhere.</p><p>I have watched horror films at midnight without incident. I have read ghost stories alone without blinking. One well-timed shout in a mountain cafe and I was completely undone, cappuccino on the floor, on my jacket, possibly on my dignity. The group found this extremely funny. They were right to. I rejoined them, got another cup, and we spent the rest of the evening trading stories — what people had felt on the climb, what they were taking back, what had surprised them.</p><h3>The People You Carry Down</h3><p>There is a running joke that develops on every trek, the way inside jokes do — suddenly and completely, so that by Day 3 it requires no setup. Ours was simple: whenever someone did something mildly chaotic, someone else would say, deadpan, <em>“please descend.”</em> As if the mountain itself had issued a formal request. It started as a joke about IndiaHikes’ rules. It became the group’s way of saying: you are too much, we love you, stop it.</p><p>Then we actually started descending, and the joke updated itself — <em>“please ascend and then descend”</em> — which is both funnier and significantly less useful as a warning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cqm4CTSYs0J7kN5V-zdFiQ.jpeg" /></figure><p>That’s the thing that only happens when a group of strangers spends four days in close quarters with no Wi-Fi, shared discomfort, and a common goal. You arrive as individuals. You leave as something else — not exactly friends yet, but something warmer than acquaintances, something that doesn’t have a clean word.</p><p>Priyam, who I’ve known for years but somehow know better now. Manas, quietly competent in a way that only becomes obvious when things get uncertain. Jitesh and Uttami, who will have a proposal story that outlasts most things. Krutika, with whom the entire descent became a conversation— the kind of conversation that covers everything and feels like it covered nothing. Devarsh, who cycles for fun in ways that make you quietly reassess your own lifestyle.</p><p>Isha, freshly back from the US — accent intact, heart still clearly on the trail, specifically wherever the dogs were. Anish, whose cup by Day 3 had absorbed so many beverages — tea, aam panna, soup, probably snow — that every sip was a lucky draw, and who had an extraordinary gift for finding exactly the right thing to say to irritate Isha, which he deployed with the consistency of someone who had found his calling. Rushi, peak Gujarati energy, who finished a Himalayan summit and then went skydiving — because some people have a fundamentally different relationship with the concept of enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfjmKhqhC7ty_nDhSLVf8g.jpeg" /></figure><p>Rahul, who arrived last to every single gathering point with the reliability of a man who has made peace with his relationship with punctuality; nobody even reacted anymore — we just looked at the empty spot where he would eventually appear, and smiled. Amrutha, who struggled at times on the trail and kept going anyway — which is, if you think about it, the only thing the mountain ever actually asks of you. Siddhi, who on the bus back gripped my bag and fell into a sleep so deep and so committed that it functioned as its own form of motion sickness prevention — not a strategy most people would recommend, but it appeared to work.</p><p>Jignesh uncle, a doctor who trekked better than people half his age and didn’t make a thing of it, with his daughter Neeva alongside — together the most quietly reassuring presence on any trail. Oh, and Nandan — who at the post-trek party, several drinks in, began volunteering information about himself that even his friends were hearing for the first time. The mountains, it seems, loosen something. Sometimes it’s your shoulders. Sometimes it’s considerably more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPgUGylLqQryIxAQCJSyJw.jpeg" /></figure><p>Then Vaibhav, our trek lead — and the guides, Akshay, Kuldeep and Nishant — and the IndiaHikes team, who made sure the whole thing worked without ever making it feel like it was being managed. The locals who know the mountain well enough to be casual about it, which is the most reassuring kind of expertise there is.</p><h3>Back to Misery (Otherwise Known As Gurgaon)</h3><p>The ride back was long — same construction, same dust, same NCR air quality greeting us like an old friend you have complicated feelings about. Someone put on a playlist and for a while nobody talked, which was the right call. We’d had network for a few hours by then but nobody was particularly rushing to use it. The notifications could wait. They had waited this long.</p><p>The strange thing was the phone itself. I’d left it on the seat, walked out of the bus at traffic, and come back to find myself mildly confused about where I’d put it. This had happened twice already — once at basecamp, once at the cafe. Four days of not reflexively reaching for it had apparently been enough to break the muscle memory entirely. It felt less like forgetting a phone and more like evidence of something.</p><p>A few of us went to Mussoorie the next day — Mall Road, cafe-hopping, the usual tourist orbit. It was nice. It was normal. It was fine.</p><p>That’s the thing about coming back from a trek. The city is objectively fine. Nothing is technically wrong with it. But something in your calibration has shifted, and for a few days, fine just doesn’t feel like enough. The stars don’t show up over Gurgaon. The noise is back. The notifications resume. Your inbox has not, in your absence, resolved itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wIjbiv-FpXRBgmfgGOC6g.jpeg" /></figure><p>The maple leaf is still on the back of my phone. And somewhere in the Garhwal Himalayas, Dogeshwar and Kukurswamini — our two unofficial trek mascots — are probably walking some other group’s trail, trotting through someone else’s legs, utterly unbothered by the fact that they are the reason half of us stopped mid-trail to coo at them like we’d never seen a dog before.</p><p>The mountains don’t remember us. But we remember the mountains — and more than that, we remember who we were on them, and who we happened to be there with.</p><p>Which is more than enough.</p><p><em>If you made it this far: go book a trek. Any trek. The mountains are patient — they’ve been waiting longer than you have.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8142254b1ca1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kedarkantha: The City Brain Goes to the Mountains]]></title>
            <link>https://medium.com/@mayankkumar1205/kedarkantha-the-city-brain-goes-to-the-mountains-80bc14eef3b0?source=rss-c2b21340bc24------2</link>
            <guid isPermaLink="false">https://medium.com/p/80bc14eef3b0</guid>
            <category><![CDATA[snow]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[adventure]]></category>
            <category><![CDATA[kedarkantha-trek]]></category>
            <category><![CDATA[trekking]]></category>
            <dc:creator><![CDATA[Mayank Kumar]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 18:20:07 GMT</pubDate>
            <atom:updated>2026-04-09T02:23:55.397Z</atom:updated>
            <content:encoded><![CDATA[<p>Franz Kafka once wrote, <em>“You do not need to leave your room. Remain sitting at your table and listen. Do not even listen, simply wait, be quiet, still and solitary. The world will freely offer itself to you to be unmasked, it has no choice, it will roll in ecstasy at your feet.”</em></p><p>I think Kafka might have been wrong. Or perhaps he just never saw the Himalayas.</p><p>Because sitting at my table in the city, the world didn’t feel like it was rolling in ecstasy; it felt like it was buffering. The <em>unmasking</em> I needed wasn’t going to happen in a room with stable Wi-Fi. It required a physical disruption. It required the Kedarkantha trek.</p><p>The spark for this disruption came from a friend, Prajwal, who had recently returned from the summit with the kind of clarity that makes you question your own life choices. Two conversations later, he convinced four of us to swap our screens for snowscapes, helped coordinate everything — and then Anoushka Shankar announced dates that clashed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1qEaPeP6500u9POz20_XRw.avif" /></figure><p>Prajwal chose the sitar. Without visible guilt. I couldn’t really blame him; the chance to see a virtuoso like Anoushka Shankar — whose command over the sitar is so transcendent it borders on the divine — is one of the few things that can compete with the pull of the mountains.</p><p>So it was three of us: Manas, Priyam, and me. First Himalayan trek for all of us. A few hikes between us, and the kind of confidence that comes from not yet knowing what you don’t know. Kedarkantha on IndiaHikes seemed right — beginner-friendly, properly snowy in winter, and described as “the finest summit climb for beginners,” which we read as a personal invitation.</p><h3>The City That Never Sleeps (and the Friend Who Always Does)</h3><p>The overnight bus from ISBT Delhi was supposed to drop us at Mall Road, Dehradun at a reasonable 6 AM. Instead, it arrived at 5 — a full hour early, in the kind of darkness where even the street dogs look suspicious. The conductor gave us a heads-up that our stop was approaching. I nudged Manas. We grabbed our bags. We stepped off.</p><p>And then the bus just… stood there.</p><p>We stood outside, watching it, when I suddenly noticed something critical: Priyam was still on it.</p><p>You know how there’s always that one person whose relationship with sleep is less “habit” and more “terminal condition”? Priyam had peacefully transcended consciousness somewhere around mountains and had no intention of rejoining the waking world. We called. No answer. Classic. The bus began to move. Manas and I looked at each other with an expression that needed no words, or maybe a few, <em>“f*** bhai, apna banda chhut gaya”</em></p><p>We tried calling. No answer. Classic. The bus was now a shrinking pair of tail lights. A minute passed. Then another. Then — miracle of miracles — Priyam called back, groggy and indignant, having successfully argued with the conductor a kilometre down the road. He emerged from the dark like a man who had no idea what the fuss was about, which, knowing Priyam, was entirely accurate.</p><p>The three of us reunited in the dark on a Dehradun street with no plan, no autos, and the quiet dignity of people who had very nearly lost a team member before the trip even started. We took the first e-rickshaw we could find, checked into Live Free Hostel, and promptly collapsed.</p><h3><strong>AMA Cafe and the Hot Chocolate That Broke Me</strong></h3><p>After some restorative sleep and a spirited ping-pong session, we decided to explore. Dehradun, if you’ve never been, is the kind of city that doesn’t try too hard — and that’s precisely its charm. We walked to AMA Cafe, which, unlike the perpetually impossible-to-book MKT, welcomed us without a reservation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5qeAuAkQpaFtL-Glx-63JQ.jpeg" /></figure><p>I want to talk about their hot chocolate for a moment.</p><p>In machine learning, there’s a concept called <em>catastrophic forgetting</em> — where a neural network, upon learning new information, completely overwrites its older memory. AMA Cafe’s hot chocolate did that to every hot chocolate I’ve ever had. Rich, dark, and unreasonably satisfying, it deleted my benchmarks and set a new one I’m not sure anything will ever hit again. Manas practically forced me to order it. I had been performing the ritual of the Wannabe Fitness Person — hesitating over sugar, calculating macros in my head. He overruled me. He was right.</p><p>We spent the rest of the afternoon at the Dehradun zoo nearby — which I’ll be honest, I have complicated feelings about. There’s something philosophically uncomfortable about watching a tiger pace the edges of his enclosure. The animal is spectacular, the kind of creature that in the wild would be navigating hundreds of kilometres of territory. Here, he walked the perimeter of his cage like he was running a loop. He wasn’t depressed exactly — more like he had found a kind of resigned acceptance. I have seen the same species more alive in the forest, and I couldn’t shake the contrast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*vNZ6HHTc2PL5fhIhIRg7cA.gif" /></figure><p>We headed back to the common area at the hostel, where our earlier ping-pong session evolved into a full-blown tournament. When the paddles were finally put away, we moved on to Jenga — a game that feels significantly higher-stakes when you’re using it to test the hand-eye coordination you’ll need for a mountain ridge. Between the clatter of falling blocks and the shared excitement of the trek ahead, we made a pact that the first person awake would wake the others.</p><p>Predictably, nobody woke up first.</p><h3>Kotgaon: Where the Network Died and the Mountains Began</h3><p>The next morning, a Tempo Traveller carried us ten hours through increasingly dramatic terrain toward Kotgaon — the basecamp, perched at around 6,000 feet. En route, we drove through stretches under active construction, the air thick with dust. I am a Gurgaon resident. I own a mask. It came out.</p><p>As we climbed higher, the signal bars on our phones counted down like a rocket launch in reverse — 4G, 3G, E, nothing. In their place: the Himalayan peaks sliding into view, enormous and unhurried, looking at our Tempo Traveller the way planets look at satellites. There’s a certain psychological recalibration that happens when you first see mountains at scale. The city brain, which thinks a 45-minute meeting delay is a crisis, starts to quietly shut down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7VGvHlnzzF9sycfauO4poQ.jpeg" /></figure><p>Kotgaon is a small Uttarkashi village where wooden-carved temples share the skyline with snow peaks, and where the terraced fields in the late afternoon light look like something a painter would be accused of exaggerating. We met our trek lead, who gave us the briefing — what to expect, how to pace ourselves, how to pack using the ABC technique (heaviest items close to your back, then medium, then light on the outside — a centre-of-mass optimisation that your spine will thank you for).</p><p>The team assembled around us was varied and instantly likeable. We’d know each other’s sleep sounds before we knew each other’s last names — two legendary <em>tigers</em> occupied our room on the first night. You simply factor it in, like weather.</p><h3>Day 1: Into the Pines, Toward the Snow</h3><p>The first morning of an actual trek has a specific quality that I’d never experienced before — a kind of electric ordinariness. You eat black tea and <em>daliya</em>, you do warm-up stretches in a circle like sensible people, and then you start walking into a pine forest that seems completely indifferent to the fact that you’ve been in an office for the past hundred days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0M2vnyhnUd7JR4CuKXDlw.jpeg" /></figure><p>The trail from Kotgaon to Khujai camp (roughly 6 km, gaining about 3,000 feet of altitude) starts gently before working up through oak and rhododendron forests. We paused for a midway breakfast where the shop had local Rhododendron juice — <em>Rhodo juice</em>, as the mountain community calls it. Rhododendrons are everywhere in the Himalayas, and their juice, made from the bright-red flowers, has a tartness that’s legitimately wonderful and that no cold-pressed urban juice trend has managed to approximate.</p><p>We walked onto snow after lunch. Just like that — one moment dirt trail, next moment white. This is the kind of state change that physicists call a <em>phase transition</em>, and emotionally, it functions exactly the same way. The world looked different. The group got quieter. We were in it now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekc6rEiNvLzBFVdc97zPIQ.jpeg" /></figure><p>By 4 PM we were at Khujai camp: tents pitched on snow, a 360° ring of mountains, and a silence so complete it had texture. We did our cooldown exercises, collected our snacks, and just sat with it for a while. It is genuinely difficult to describe what it feels like to drink tea surrounded by white peaks at dusk — the closest analogy I have is being inside a painting that hasn’t decided what it is yet.</p><p>Dinner that night was carb-forward and perfect — the mountains demand caloric fuel the way a long algorithm demands computational power, and the IndiaHikes team delivers accordingly. We ate communally in large tents, tiffin boxes in hand, and immediately began the great dinner-time negotiations that would define the rest of the trek: <em>“Give me your gulab jamun and I’ll carry your bag for ten minutes tomorrow.”</em> These barter economies emerge organically in the mountains. No one plans them. They just happen.</p><p>Then the night sky came out.</p><p>I’ve seen stars before, but Khujai was a different league. In the city, you see a few scattered points of light; here, the blackness was almost crowded. It made every night sky I’d ever seen before feel like a low-resolution simulation — pixelated and washed out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_192OezSr5tY7t1gUuPNA.jpeg" /></figure><p>While the rest of the group retreated to their tents, I stayed out. The silence of the pine forest is absolute, and in that quiet, the sky didn’t just look “pretty” — it felt heavy, like a physical presence. Manas had already found a stable patch of frozen ground to set up his tripod, his camera clicking away at 30-second intervals to capture a time-lapse of the heavens rotating around Polaris. I sat a few feet away, watching the “Winter Triangle” — Sirius, Betelgeuse, and Procyon — sharpen into focus as my eyes adjusted. It was just me, the rhythmic click of the shutter, and a ceiling of light so bright it cast faint shadows on the snow. I sat there for a long time, unwilling to trade that clarity for the sleeping bag’s warmth.</p><h3>DIY Day: Everything Is Alive Up Here</h3><p>Day 2 was labelled DIY — <em>Do It Yourself</em> — which meant our team navigated the route with guidance tools rather than being shepherded step-by-step. This is IndiaHikes’ philosophy in action: the goal isn’t just to get people to a summit but to build some genuine mountain sense along the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-To1zspscM0d9KMj0y_Mmg.jpeg" /></figure><p>With Gaia GPS synced, the walkie-talkie prepped, and the sling-and-shades combo perfectly synchronized, the aesthetic was nothing short of elite. This isn’t just gear; it’s a high-level visual statement. I look undeniably cool. No, I’m not entertaining any counter-arguments.</p><p>Being at the front meant I had to calibrate a habit I’d built in gym training — <em>go fast, stay fast</em> — against the responsibility of not leaving people behind. The compromise was: sprint to a comfortable lead, find a boulder, sit down, rest while everyone caught up. Efficient and sociable. Win-win.</p><p>The trail was dazzling in a counterintuitive way. Snow everywhere, yes, but also: sunlight at high altitude is a different animal entirely. At sea level, atmosphere absorbs and scatters UV radiation into something manageable. At 10,000+ feet, less atmosphere means more raw light — the mountains were brilliant, almost aggressive in their brightness. The snow amplified everything. Even the shadows had contrast.</p><p>We stopped at a large flat area mid-trail where our trek lead gave a quiet, excellent lesson in forest biology. Trees, it turns out, are not the isolated organisms they appear to be. They communicate chemically through the soil — specifically through mycorrhizal fungal networks that connect root systems across large distances. Suzanne Simard, the forest ecologist, called these networks the <em>Wood Wide Web</em>. A mother tree can send nutrients to its seedlings through these connections. I’d read about this before, but standing in a snow-covered Himalayan forest while someone explains it in real-time hits differently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EouUmyf4RyaJlrDdUdXsdg.jpeg" /></figure><p>We also saw white langurs nearby — pale, elegant, and far less alarmed by us than we were excited by them. HC Verma’s physics textbooks had apparently given me false expectations about monkey physics, but it turned out he wasn’t wrong — one of them swung from branch to branch with the casual biomechanics of something that has never once worried about its grip strength.</p><p>We reached Dhoka camp — our second night’s stop — by early afternoon. The transition from movement to rest immediately sparked a burst of creative energy. We started by building a snowman — a stoic, frozen guardian of the camp. We used a jagged icicle for the nose; it was a definite texture upgrade over the traditional carrot, giving him a much more formidable, high-altitude aesthetic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_vyEjJ88XdP74WYa1iaTkQ.jpeg" /></figure><p>But the peace didn’t last. The mere presence of the snowman seemed to trigger a collective instinct for combat. What followed was a snowball fight that requires no scientific framing. There is simply no universe in which many people in their twenties, presented with unlimited snow, don’t start throwing it at each other within five minutes. It was total chaos. Someone got Manas in the ear. I got hit twice from directions I still can’t account for, a localized storm of white-out conditions and questionable aim.</p><p>Once the “war” subsided and we were sufficiently breathless, we turned our attention to the day’s main event: Madhuri’s birthday. We <em>baked</em> her a snow cake, meticulously packing the powder into a tiered structure that looked surprisingly professional. The absurdity of celebrating a birthday at 11,000 feet wasn’t lost on us, especially when our trek lead, in a moment of genuine mountain magic, produced an actual cake. How? Where had it come from? These are questions the mountains don’t answer.</p><p>That night, Dhoka’s skies outdid Khujai’s. Fewer trees. Higher altitude. The sky was less a backdrop and more an event. Hunter’s belt (Orion’s Belt) was unmistakable. Ursa Major and Minor swung lazily overhead. And there were shooting stars — or possibly satellites, which would be unfortunate, since I’d made wishes. The Starlink constellation has done some complicated things to amateur astronomy, and I prefer not to know.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgEd0faAzQSgkwpoIkQbiA.jpeg" /></figure><p>The highlight, however, was Rahul’s binoculars. It wasn’t heavy, but looking through the glass, the Jupiter transformed from a single point into a tiny, brilliant disc. The real magic was what sat next to it: four microscopic, perfect beads of light strung out in a straight line. They were the Galilean moons — Io, Europa, Ganymede, and Callisto. Seeing another world’s satellites with my own eyes, while standing on a frozen ridge in the Himalayas, hit me with a sudden, sharp sense of scale.</p><p>I spent the rest of the hour stargazing, letting the cold seep into my jacket. It felt amazing — the kind of clarity you only get when you’re a few thousand meters above your problems, looking at things that make those problems feel infinitesimal.</p><p><em>Summit day. The temperatures dropped to -10°C. The headlamps came on before sunrise. And somewhere near the top, the path disappeared — but that’s a story for </em><a href="https://medium.com/@mayankkumar1205/kedarkantha-fine-doesnt-feel-like-enough-8142254b1ca1"><em>Part 2</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80bc14eef3b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing your bits and bytes]]></title>
            <link>https://medium.com/@mayankkumar1205/managing-your-bits-and-bytes-344d92107a4a?source=rss-c2b21340bc24------2</link>
            <guid isPermaLink="false">https://medium.com/p/344d92107a4a</guid>
            <category><![CDATA[distributed-storage]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Mayank Kumar]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 17:10:49 GMT</pubDate>
            <atom:updated>2023-04-17T10:01:51.270Z</atom:updated>
            <content:encoded><![CDATA[<h3>Caribou: Intelligent Distributed Storage</h3><p>Data management can be a challenging task, especially when dealing with large amounts of data. Distributed in-memory database systems are a popular solution for storing and processing large amounts of data. However, data movement inefficiency can be a significant drawback for these systems. This is where Caribou comes in, offering a solution that reduces data movement by using smart distributed storage with replication and near-data processing, providing high throughput, low latency, and efficient scan operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzbdGT0PjkGw6_FpeZXZSQ.jpeg" /></figure><h4>But, what is Caribou exactly?</h4><p>Caribou is a distributed key-value store that provides various operations such as insert, read, conditional read, delete, update, and scan queries, and can support transactional processing. It uses a shared-data model to store relations in the key-value data structure and can handle variable-sized keys and values. Caribou also has fault tolerance through transparent replication and has a simple interface over traditional TCP/IP connectivity. All of this is achieved by using DRAM for storage and field programmable gate arrays (FPGAs) to create a prototype for near-data processing in database engines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*T5AiZSoxdDuHGfipSOj-Zg.png" /><figcaption>Modules in Caribou and their connections</figcaption></figure><p>The architecture of a single Caribou node includes a Cuckoo hash table, a module for near-memory processing, and a networking component that supports up to thousands of connections at once. Data replication is achieved using Zookeeper’s atomic broadcast, and an external commit manager or coordinator should be used to ensure that nodes are not reading from stale data.</p><h4>Key-Value Store: The Foundation of Caribou</h4><p>It’s not just any old key-value store; it’s a store that can handle update workloads efficiently and make better use of memory even with changing value sizes. Caribou uses a cuckoo hash table with slab-based memory allocation, which allows for the allocation and deallocation of memory in constant time. This avoids any background processing that can slow down operations. The allocation logic is tailored to predefined classes of value sizes, with pointer lists encoding free space as pointers to pages and bitmaps used to track allocated and reclaimable memory. It’s like having a personal assistant that knows exactly what you need and when you need it!</p><p>The following table shows the memory usage of each management data structure, with the largest portion being taken up by the hash table. Xilinx VC709 Evaluation boards are used to build Caribou equipped with two 4 GB DDR3 SODIMMs. The hash table and the data area (value storage) are collocated on one of the SODIMMs, while the TCP buffers, bitmaps, pointers, and replication log overflow reside on the other one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*IsWw9ziXIOWuNe2m3VXqEg.png" /><figcaption>The overhead for engine data structures is small</figcaption></figure><h4>Processing: Selection Offload</h4><p>One of the unique features of Caribou is its ability to support selection predicates on data before sending it to processing nodes. The system adapts quickly to different queries and allows client requests to parametrize underlying circuits at runtime. Specialized hardware can execute operations in parallel without performance degradation. This means that you can sit back and let Caribou do the heavy lifting of processing complex queries, while you focus on more important things, like catching up on the poor man’s el-Clasico PBKS vs RR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_Mj5mLvuKpZKvH-RS3VTg.jpeg" /></figure><p>The system provides three operators: a simple selection predicate, a compute-intensive selection predicate involving substring matching, and a decompression of values before executing a selection predicate. The simple selection predicate allows multiple conditions to be combined, and up to 8 conditions on the same value can be combined into a single boolean value by ANDing them together. The selection predicate involving substring matching uses a series of comparators with small register memories, and the circuit is provisioned with 20 characters. The decompression module enables the evaluation of selections on compressed data stored in memory using the LZ77 compression algorithm.</p><h4>Conclusion</h4><p>Caribou’s design is focused on achieving network line-rate performance through the use of data structures that complement this goal. The ability to add functionality without reducing throughput also offers promising possibilities for future development, including the addition of partial aggregation, statistics, and complex event detection to the circuit. Overall, Caribou is a promising prototype that offers a glimpse into the future of distributed in-memory database systems and near-data processing.</p><h3>Stardust: Tracking Activity in a Distributed Storage System</h3><p>Assume you’ve gone and built yourself a super cool distributed system! And everything’s good to go for deployment, but you wanna keep an eye on how the system’s holding up when it’s really put to the test. Here’s where Stardust comes into play.</p><p>Stardust is a monitoring infrastructure that replaces traditional performance counters with end-to-end traces of requests and allows for efficient querying of performance metrics. Such traces better inform key administrative performance challenges by enabling, for example, extraction of per-workload, per-resource demand information, and per-workload latency graphs.</p><h4>Stardust’s Design</h4><p>Stardust is made of two components: the <strong>activity tracking infrastructure (ATI)</strong> and the <strong>querying infrastructure</strong>. The ATI is responsible for tracking every client request along its execution path. It retains activity records, such as buffer cache reference records, I/O records and network transmit/receive records. The sequence of records allows tracking of a request as it moves in the system from one computer, through the network, to another computer, and back.</p><p>An activity record is a sequence of values related to a record type. The figure below shows an example activity record. Activity records are posted at strategic locations in the code so that the demand for a resource is captured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*_ZDINwYlsJUGdvhm" /></figure><h4><strong>Resource Usage Accounting</strong></h4><p>Stardust measures four common storage system resources: CPU, buffer cache, network and disk. When requests enter the system, they are tagged with the user’s ID, and are assigned an initial breadcrumb passed between components as the request is serviced.</p><ol><li><strong>CPU: </strong>To measure per-client CPU demand, a component must post activity records related to thread context switching. By monitoring the thread run time, Stardust charges a request the exact amount of CPU time it used.</li><li><strong>Buffer Cache Usage: </strong>Measured by posting activity records each time the buffer cache is accessed.</li><li><strong>Network Demand</strong>: Measured by posting a NetworkTransmit activity record each time a request is transmitted between components.</li><li><strong>Disk Demand</strong>: Measured by posting a DiskOp activity record each time a request initiates a disk request.</li></ol><h4><strong>Request latency accounting</strong></h4><p>Stardust provides per-client request latency information that shows where a request spends its time as it is processed in the system. Each instrumentation point can be considered as a node in a latency graph, with links between nodes denoting causal relationships. These links also capture latency information between the instrumentation points.</p><p>Requests often generate multiple activity records at different components in a distributed system. It is important to causally link, or stitch, activity records together so that the path of the original request can be reconstructed in such environments. To show that all records on the first machine happened before any records on the second machine a “stitch” record of the form (breadcrumb 1, breadcrumb 2) is posted just before the request leaves the first machine to mark that breadcrumb 1 in the first machine occurred before breadcrumb 2 in the second one.</p><h4><strong>Reducing Data Overhead</strong></h4><p>There is overhead associated with ATItraces. However, the overhead can be made negligible in most cases by transforming the raw traces into per-workload, per-resource demand numbers, as well as per-workload graphs rather than storing them in the raw form.</p><h4><strong>Performance</strong></h4><p>Are you blown away by the cool features? It’s essential to note that the monitoring feature can consume a significant amount of CPU resources. However, let’s delve into the results of experiments conducted on different workbenches to alleviate any doubts you may have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w7ddENb4RnxfNqjb" /></figure><h3><strong>Orion: A Distributed File System for Non-Volatile Main Memory and RDMA-Capable Networks</strong></h3><p>During the recent introduction of high-performance, byte-addressable non-volatile main memories (NVMM), has forced system designers to rethink their strategies regarding distributed storage systems.</p><h4><strong>What is Orion?</strong></h4><p>Orion is a distributed file system designed for non-volatile main memory and remote direct memory access (RDMA)-capable networks.</p><p>The main motivation behind Orion is to take advantage of emerging non-volatile main memory (NVMM) technologies and RDMA-capable networks to build a high-performance, low-latency distributed file system. Orion is the first distributed file system to systematically optimize for NVMMs throughout its design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*Jhfa5aGpPp-lnbJcuLVCYw.png" /></figure><h4><strong>Why do we need NVMM?</strong></h4><p>NVMM stands for non-volatile main memory, which is a type of computer memory that combines the advantages of traditional volatile memory (such as DRAM) with non-volatile storage (such as flash memory or hard disk drives). NVMM is designed to provide low-latency and high-throughput access to data while retaining the ability to preserve data even in the event of a power loss.</p><p>NVMM offers the benefits of both DRAM and flash memory, such as low access latency and high endurance, and is increasingly becoming available in modern servers. RDMA, on the other hand, allows for low-latency, high-bandwidth data transfer between servers without CPU involvement.</p><h4><strong>Let&#39;s come back to Orion again!</strong></h4><p>Orion is designed to be highly scalable, fault-tolerant, and provide strong consistency guarantees. It achieves this through several novel techniques, including:</p><p>Efficient storage: Orion stores data in NVMM to achieve low-latency and high-throughput access. It employs a novel data layout that allows for efficient garbage collection and space reclamation.</p><p>Fast data replication: To ensure fault tolerance, Orion replicates data across multiple servers. It uses a fast, RDMA-based replication protocol that minimizes data transfer overhead and achieves high throughput.</p><p>Strong consistency: Orion provides strong consistency guarantees, ensuring that all clients see the same version of data. It achieves this through a novel protocol called Distributed Lock Management, which provides a lock-free, distributed, and highly available metadata service.</p><p>Efficient caching: Orion employs a distributed cache that leverages both NVMM and DRAM to achieve high hit rates and low access latency. It also uses a novel eviction policy that balances the trade-off between cache hit rates and NVMM space utilization.</p><h4><strong>Working Policy of Orion</strong></h4><p>Orion works by using a distributed metadata service to coordinate access to files across the cluster. The metadata service is responsible for maintaining the directory structure, file attributes, and file locations for the files stored in Orion. It uses a distributed consensus protocol, similar to Raft, to ensure that the metadata is consistent across all nodes in the cluster.</p><p>When a client wants to read or write a file, it first contacts the metadata service to get the location of the file. The metadata service responds with the location of the file’s data and the version of the metadata. The client then contacts the appropriate Orion storage node directly over the RDMA network to read or write the data.</p><p>To ensure data consistency, Orion uses a distributed data replication scheme based on erasure coding. Data is broken up into chunks, and each chunk is encoded and replicated across multiple nodes in the cluster. This allows for high fault tolerance and recovery from node failures.</p><p>Orion also uses several optimizations to minimize data movement and latency. For example, it uses inline data compression to reduce the amount of data that needs to be transferred over the network, and it caches frequently accessed data in memory to reduce disk access times.</p><p>It&#39;s all good on paper but…</p><h4><strong>What about the results?</strong></h4><p>The Orion has been evaluated using a range of micro-benchmarks and macro-benchmarks on a 32-node cluster. They showed that Orion achieves high throughput, low latency, and strong consistency while scaling well with the number of servers. Compared to existing distributed file systems like HDFS and Ceph, Orion achieves much higher throughput and lower tail latency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*-2DUl0kjz3-OcZlT5Wo1iA.png" /><figcaption><strong>Application performance on Orion</strong></figcaption></figure><p>In summary Orion by combining file system functions and network operations into a single layer, Orion provides low-latency metadata accesses and allows clients to access their local NVMMs directly while accepting remote accesses. We can easily see that Orion outperforms existing NVMM file systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*z6EAgwNSWOp2nZK_nEAlCA.png" /></figure><h4>References</h4><ol><li><em>Istvan, Z., Sider, D. &amp; Alonso, G. (2017). Caribou: Intelligent Distributed Storage. In proceedings of the VLDB Endowment, Volume 10, Issue 11 (pp 1202–1213).</em></li><li><em>Thereska, E., Salmon, B., Strunk, J., Wachs, M., Abd-El-Malek, M., Lopez, J. &amp; Ganger, G. (2006). Stardust: Tracking Activity in a Distributed Storage System. In ACM SIGMETRICS Performance Evaluation Review, Volume 34, Issue 1 (pp 3–14).</em></li><li><em>Yang, J., Izraelevitz, J. &amp; Swanson, S. (2019). Orion: A Distributed File System for Non-Volatile Main Memory and RDMA-Capable Networks. FAST’19: Proceedings of the 17th USENIX Conference on File and Storage Technologies.</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=344d92107a4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can We All Just Get Along? Cracking the Code of Distributed Consistency]]></title>
            <link>https://medium.com/@mayankkumar1205/can-we-all-just-get-along-cracking-the-code-of-distributed-consistency-18a70d916b9f?source=rss-c2b21340bc24------2</link>
            <guid isPermaLink="false">https://medium.com/p/18a70d916b9f</guid>
            <category><![CDATA[consensus]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Mayank Kumar]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 18:06:19 GMT</pubDate>
            <atom:updated>2023-03-10T18:07:22.881Z</atom:updated>
            <content:encoded><![CDATA[<h3>HotStuff: The Scalable and Robust Consensus Algorithm</h3><h4>Reaching Agreement in a World of Chaos</h4><p>In a computing system, components can fail, just like your ex’s promises. Sometimes the failures are straightforward, like a broken hard drive. Other times, the failures are much more complex and hard to detect. Consensus protocols have always been one of the critical components that ensures all participants in the system reach a consistent decision on a proposed value, even in the presence of faults or malicious behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*NTVCnJ4Igw4JbCft3ibvhA.jpeg" /></figure><p>Byzantine fault tolerance is a system’s ability to tolerate arbitrary failures of its components while taking actions critical to its operation. So basically, it’s like when your car still runs even though the engine is making a weird noise and the AC is broken. Except, you know, with computers.</p><h4>The Quest for Consensus: Why We Need a New Protocol</h4><p>State Machine Replication (SMR) is the general method that implements a fault tolerance service by replicating servers and coordinating client interactions with server replicas. This process is prone to errors and can be disrupted by faulty replicas.</p><p>Traditional BFT protocols have been built around a two-phase paradigm, which has led to complications in the view-change algorithm, bugs, and significant communication penalties for even moderate system sizes. This establishes the need for a much simpler leader regime and a protocol that can pipeline frequently rotated leaders. That’s where HotStuff comes in.</p><h4>HotStuff: The Sizzling New Protocol</h4><p>No, it’s not a new coffee blend from CCD, but a three-phase BFT protocol that simplifies the leader replacement protocol and makes scaling easier. With HotStuff, even systems with thousands of replicas can achieve linear view change and optimistic responsiveness. This promising protocol has already been adopted by several blockchain projects and is expected to find more use cases in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VoWEMNYiOqKGQgVZ4tknIw.jpeg" /></figure><p>Now, let’s get into the nitty-gritty of HotStuff. It’s designed for systems with a fixed set of <em>n</em> replicas, some of which may be Byzantine faulty (<em>f</em>). The protocol relies on threshold signatures, which means that each replica holds a unique private key, and a single public key is shared. This ensures that only the authorized replicas can sign off on commands. The protocol guarantees safety always and progress within a bounded duration after the Global Stabilization Time (GST), assuming partial synchrony.</p><p>And to make things more interesting, the authenticator complexity is used as a measure of communication complexity, as it hides unnecessary details about the transmission topology, and is better suited for capturing costs in protocols. It is sum of number of authenticators received by all replicas to reach a consensus decision after GST. Here, an authenticator is either a partial signature or a signature.</p><h4>Building Blocks of HotStuff: Basic and Chained Protocol</h4><p>Let’s first talk about the Basic HotStuff solution. The protocol works in a succession of views numbered with monotonically increasing view numbers. Each view has a unique dedicated leader known to all, and each replica stores a tree of pending commands as its local data structure. During the protocol, a monotonically growing branch becomes committed by the leader collecting votes from a quorum of <em>(n − f)</em> replicas in three phases: prepare, pre-commit, and commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOYI6bKK7YGPuPdSAVLLSg.png" /><figcaption>Phases in Basic HotStuff</figcaption></figure><p>A key ingredient in the protocol is a collection of <em>(n − f)</em> votes over a leader proposal, referred to as a quorum certificate (QC). The protocol waits for a message at each view for a timeout period determined by an auxiliary nextView utility, and if it interrupts waiting, the protocol increments the view number and starts the next view.</p><p>So far so good, but there’s one problem: it takes three phases for a Basic HotStuff leader to commit a proposal. These phases are not doing anything useful except collecting votes from replicas, and they’re all very similar. That’s where Chained HotStuff comes in. The idea is to collect the votes over a prepare phase in a view by the leader into a genericQC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*AsWV3NoKxhOExscfriQyVQ.png" /><figcaption>Chained HotStuff: A pipelined Basic HotStuff where a QC can serve in different phases simultaneously</figcaption></figure><p>The genericQC is relayed to the leader of the next view, delegating responsibility for the next phase to the next leader. The next leader initiates a new prepare phase and adds its proposal, and the prepare phase for view <em>v+1</em> simultaneously serves as the pre-commit phase for view <em>v</em>. The prepare phase for view <em>v+2</em> simultaneously serves as the pre-commit phase for view <em>v+1</em> and as the commit phase for view <em>v</em>. This is possible because all the phases have identical structure. This reduces the number of message types and allows for pipelining of decisions.</p><h4>From Theory to Practice: Implementing HotStuff for Efficient SMR Systems</h4><p>HotStuff protocol is not just hot stuff, it’s also flexible stuff! With its simple and event-driven-style specification, it’s easy to turn the algorithm into a prototype implementation. And if that’s not enough, it even has a Pacemaker module that keeps the beat going after GST.</p><p>To demonstrate the flexibility of HotStuff, a two-phase variant is also presented, which loses optimistic responsiveness but gains the benefit of fewer phases. It outperforms state-of-the-art implementations like BFT-SMaRt in throughput and scalability, and achieves similar latency despite using digital signatures universally.</p><p>Who knew consensus algorithms could be so much fun? Let’s raise a cup of HotStuff (the protocol, not the coffee) to efficient SMR systems and distributed consensus!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*LBKK5zCdeZIeeO5Byxt_HQ.jpeg" /></figure><h3>Keeping CALM</h3><p>Distributed Systems are tricky. Multiple unreliable machines are running in parallel, sending messages to each other across network links with arbitrary delays. How can we be confident these systems do what we want despite this chaos? Can we let these components run independently without coordinating in order to achieve better efficiency?<br>Distributed systems deserve a computability theory: When is coordination required for consistency, and when can it be avoided? The CALM theorem fills this gap in distributed systems theory.</p><h4>The High Cost of Coordination</h4><p>One traditional answer to the challenge of building correct distributed systems has been to reduce this complexity with memory consistency guarantees using coordination protocols. But these are often criticized as barriers to high performance, scale, and availability. The expense of coordination protocols can make them a “forbidden fruit”. Hence coordination needs to be avoided whenever possible. And the question of when it can be avoided is answered by the CALM Theorem.</p><h4><strong>Confluence as a metric for Progam Consistency</strong></h4><p>Before we jump to the CALM theorem, we need a metric for program consistency. Traditionally, it has been memory consistency. But a practical consistency question is this: “Does my program produce deterministic outcomes despite non-determinism in the runtime system?”. This is a question of program confluence.</p><p><em>In the context of nondeterministic message delivery, an operation on a single machine is confluent if it produces the same set of output responses for any non-deterministic ordering and batching of a set of input requests.</em></p><p>Note that, unlike traditional memory consistency properties such as linearizability, confluence makes no requirements or promises regarding notions of recency or order of operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/0*Fl6vQfK5wXp0cc3c" /></figure><h4><strong>Monotonicity and The CALM Theorem</strong></h4><p><em>A problem P is monotonic if for any input sets S, T where S ⊆ T, P(S) ⊆ P(T).<br></em>Intuitively, this means that the output of a monotonic program will always increase such that a new input will not invalidate a previous output.</p><p><em>Consistency As Logical Monotonicity (CALM) THEOREM: A problem has a consistent, coordination-free distributed implementation if and only if it is monotonic.</em></p><p>Intuitively, monotonic problems are “safe” in the face of missing information and can proceed without coordination. Non-monotonic problems, by contrast, must be concerned that the truth of a property could change in the face of new information. As they “change their mind,” these problems are order-sensitive.</p><h4><strong>Creative application-level use of CALM Theorem</strong></h4><p>The CALM theorem does not advocate pure monotonic programming as the only way to build efficient distributed systems. Monotonicity has utility as an analysis framework for identifying nondeterminism so that programmers can address it creatively.</p><p>Let’s see this with an interesting example of an Amazon shopping cart where the web browser requests items to be added or deleted from an online shopping cart implemented in a distributed system. The addition operations are monotonic so they can be handled in parallel. But what about deletion operation? This will make the system non-monotonic. Will we have to conform to coordination protocols then?</p><p>No! We can handle deletes separately from adds via two separate monotonically growing sets: Added items and Deleted items. Both being monotonic can be handled concurrently without the need for coordination!</p><p>This design evolution illustrates the technical focus we seek to clarify. Rather than micro-optimize protocols like Paxos or 2PC to protect race conditions in procedural code, modern distributed systems creativity often involves minimizing the use of such protocols. A good strategy is to keep coordination off the critical path.</p><h4><strong>Focussing on the positive</strong></h4><p>CAP Theorem informally states that a system can exhibit only two out of the three following properties: Consistency, Availability, and Partition tolerance. CAP is a negative result. CALM is a positive result in this arena: it circumscribes the class of problems for which all three of the CAP properties can indeed be achieved simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*NaIeca0LgoiQYS2K" /></figure><h4><strong>Better Programming Paradigms for Better Distributed System Design</strong></h4><p>Traditional programming languages model the world as a collection of named variables whose values change over time. A bare assignment is a nonmonotonic programming construct.</p><p>One way to encourage well-distributed design patterns is to use a language specifically centered around those patterns. Bloom is a programming language designed in that vein. The CALM conjecture and Bloom language were developed together. Bloom programs are written in a relational-style query language so that monotonicity is easy to spot and exploit.</p><h3><strong>Reaching Consensus for Asynchronous Distributed Key Generation</strong></h3><p>Let us explore consensus in the field of distributed system cryptography. In the case of multi-party key distribution, for setup to work, we need a central authority to verify and work for us. But now we are in the realm of distributed systems; we can’t trust a single node to for work. A Distributed Key Generation protocol is needed, hence, establishing the need to achieve consensus in an environment where some nodes are faulty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*dXG0BChUyZ3b8LMQS6Fv4Q.png" /></figure><p>We discuss a protocol for Asynchronous Distributed Key Generation that can withstand up to 𝑓 &lt; 𝑛/3 faulty parties while having a constant expected number of rounds and an expected communication complexity of 𝑂˜(𝑛³). This protocol assumes only the existence of public key infrastructure (PKI). Before this new protocol, the best A-DKG protocols required Ω(𝑛) expected number and Ω(𝑛⁴) as the expected communication complexity.</p><h4>Let’s dive into what’s in the protocol</h4><p>The A-DKG protocol consists of three main components:</p><ol><li>Proposal Election (PE) protocol which helps parties to agree on a valid proposal after receiving enough proposals from different parties.</li><li>Verifiable Gather protocol which allows parties to communicate which proposals they have seen and haven’t seen in a verifiable manner.</li><li>Validated Asynchronous Byzantine Agreement (VABA) protocol which ensures the validity of proposals by using PE and Verifiable Gather protocols, and can be applied in situations where threshold signatures are not feasible.</li></ol><p>The best part of this protocol is we don’t need to assume anything except PKI, as in existing consensus protocols, often the PKI is not enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*dlnTvzKo-7rO9Dee" /></figure><h4>How to achieve it</h4><p>Natural solution that could be thought of as</p><ol><li>every node sending every other node their DKG keys os size O(n)</li><li>Aggregate these keys for efficiency</li><li>Reach consensus</li></ol><p>Sounds easy, right? But wait a minute! <em>(Note: We can only use PKI)<br></em>This above algorithm needs an Asynchronous Byzantine Agreement (ABA) protocol.</p><p>So, a protocol is proposed, that involves every node sending their DKG keys to each other and aggregating them for efficiency. It requires a Validated Asynchronous Byzantine Agreement protocol (VABA) and a Weak Verifiable proposal election protocol to reach consensus without relying on leaders.</p><p>The VABA protocol can reach agreement on inputs of size 𝑚 words, in 𝑂(1) expected rounds, using just 𝑂˜(𝑚𝑛² +𝑛³ ) expected words, and is resilient to an adversary controlling at most 𝑓 &lt; 𝑛/3 parties. The proposal election protocol has a probability of succeeding around ⅓, is completed in one round, and has an expected communication complexity of 𝑂˜(𝑛³).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*jEXdOElHX7G-Z50cMyhl9w.png" /></figure><h4>Now what about the consensus</h4><p>These whole steps to achieve DKG now just need a last piece of reaching consensus. Here the authors have used <strong><em>No Waitin’ HotStuff</em></strong>:<strong> </strong>a view-based protocol in which each view has a virtual leader. All parties input their proposals into the weak verifiable proposal election.</p><p>Using this proposal, election protocol parties send output to each other with proof. The difference here is invalid messages or equivocation are reported to all parties with proof.</p><h4><strong>Final Thoughts</strong></h4><p>Let&#39;s have a look at Safety and Liveness, as the most important benchmark for our Distributed Algorithms is based on these two parameters.</p><ol><li>Safety: Using the Key lock mechanism of Hotstuff ensures that no other view <em>v’</em> receives enough support from non-faulty parties, in case a non-faulty party has committed with a view <em>v</em>. In case of conflicts, the HotStuff protocol is used to resolve them.</li><li>Liveness: The proposal election always provides a value. If the proposal is correct, the algorithm terminates. Otherwise, parties can go for equivocation and faulty proposals to make progress.</li></ol><h4><strong>References</strong></h4><ol><li><em>Yin, M., Malkhi, D., Reiter, M., Gueta, G. and Abraham, I. (2019) HotStuff: BFT Consensus with Linearity and Responsiveness. In 2019 ACM Symposium on Principles of Distributed Computing (PODC ’19), July 29-August 2, 2019, Toronto, ON, Canada.</em></li><li><em>Hellerstein, J. and Alvaro, P. (2020) Keeping CALM: when distributed consistency is easy. Communications of the ACM, Volume 63, Issue 9, September 2020, pp 72–81.</em></li><li><em>Abraham, I., Jovanovic, P., Maller, M., Meiklejohn, S., Stern, G. and Tomescu, A. (2021) Reaching Consensus for Asynchronous Distributed Key Generation. In Proceedings of the 2021 ACM Symposium on Principles of Distributed Computing (PODC ’21), July 26–30, 2021, Virtual Event, Italy. ACM, New York, NY, USA.</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18a70d916b9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Low Latency: The High-Speed Adventure in Distributed Systems]]></title>
            <link>https://medium.com/@mayankkumar1205/low-latency-the-high-speed-adventure-in-distributed-systems-bd2d6a1f2c8d?source=rss-c2b21340bc24------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd2d6a1f2c8d</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[latency]]></category>
            <category><![CDATA[replication]]></category>
            <dc:creator><![CDATA[Mayank Kumar]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 10:39:18 GMT</pubDate>
            <atom:updated>2023-02-07T18:08:36.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Latency, or the time it takes for data to travel between nodes in a distributed system, is a critical factor in system performance. High latency can lead to slow response times and decreased system throughput, negatively impacting the user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/0*eoaU9T45amgYZUnx.jpeg" /></figure><p>Imagine that you are playing a multiplayer game with players located all over the world. Your actions and movements in the game must be transmitted to the game server and then communicated to all other players in real-time. If the latency is high, there will be a noticeable delay between the time you perform an action and the time it is reflected in the game for other players. This delay can negatively impact the gaming experience, causing players to miss shots or allowing opponents to get an advantage.</p><p>To mitigate the effects of latency, various techniques have been employed, and in this blog, we would discuss a few of them.</p><h3>Replication with cancellation mechanism</h3><h4>What is replication?</h4><p>Replication in distributed systems refers to the duplication of data across multiple servers to ensure reliability and availability. This practice helps prevent data loss in the event of a server failure and also enhances performance by distributing the load among multiple servers. It also ensures that data remains accessible and that the system can continue to operate even if one node is unavailable. This is particularly useful in large-scale systems where the load on a single node can be extremely high.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*_42TxPPcCoGRGx1O" /></figure><p><strong>But hold on!</strong> This surefire way is not without its hiccups as it increases the overhead to the system, as data needs to be copied and synchronized across multiple servers. It may also increase complexity as implementing and maintaining replication can be complex, especially for large and dynamic systems.</p><h4>So what do we do now?</h4><p>Let us consider server farm computing nodes that process incoming requests. The nodes are composed of independent and identical processing servers that can have distributed or centralized queues. As extra replicas are adopted for each request, the central scheduler assigns jobs to the nodes in a round-robin or random fashion. The system replies with the first completed replica of a job and cancels all outstanding replicas to reduce workload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*NTFthADLDl2eXVk_" /></figure><p>This approach is viable due to the underutilization of most clusters, the cost-effective use of idle resources, and the ability to handle unpredictable failures with concurrent replication. It also has the potential to reduce both the mean and tail of the response-time distribution, as the overall latency is the minimum of the delays across all replicas.</p><h4>Okay, but what’s the response time?</h4><p>To determine the response time distribution of a single computing node, the waiting time and service time distributions are computed, both of which have <a href="https://en.wikipedia.org/wiki/Phase-type_distribution">PH representations</a>.</p><p>The waiting-time distribution in a system with multiple queues, with dependencies introduced by the mechanisms, is represented by PH representation (s_wait, S_wait) found through the stationary distribution (π(x)) of a bivariate Markov process {X(t), J(t) | t≥0}. The age X(t) is the total time in the system of the youngest job in service, and the phase J(t) holds the joint state of the arrival process A(t) and the service process D(t). A(t) is modeled as a <a href="https://en.wikipedia.org/wiki/Markovian_arrival_process">MAP</a> with ma phases and parameters (D0, D1). The service process is modeled by differences between consecutive queue lengths in ascending order.</p><p>The job service-time distribution in the system is represented as a phase-type distribution with parameters (s_ser, S_ser) that depend on the overall system state. The service state of a tagged job at time t is represented by the tuple (R(t), D(t)), where R(t) is the number of alive replicas of the tagged job and D(t) is the difference in queue lengths in front of the tagged replicas.</p><p>The analysis of a single computing node can be extended to the multi-node case to evaluate the overall performance of the server farm. If the overall arrival process is a MAP(D0, D1), the arrival process to each node is also a MAP under round-robin or random allocation.</p><p>The parameters for the arrival process under round-robin allocation are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/0*FU0GpDC1P0YtrYrs" /></figure><p>These matrices are of size n*ma, where n is the number of computing nodes in the group.</p><p>Under random allocation, the arrival process has parameters:<br>C0 = D0 + (1 — p)D1 and C1 = pD1, where p = 1/n.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*5bNgvzdNmXwUyFYL7GjLnw.jpeg" /></figure><h3>Redundant Requests: When do they Really Help?</h3><p>The prospect of reducing latency by means of redundant requests has garnered significant attention among practitioners. Such a mechanism trades off the possibility of faster execution of the request with the increase in the load on the system.</p><p>Due to the popularity of the above approach, it is necessary to deep dive and perform an analytical study of the latency performance of redundant requests, with the primary goal of characterizing under what scenarios sending redundant requests, will help (and under what scenarios it will not), and of designing optimal redundant-requesting policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*e0LE4kyNCwlWarfT.jpg" /></figure><h4><strong>Analysis Approach</strong></h4><p>To analyze the distributed systems, the authors use two approaches. Firstly they introduce novel “stochastic coupling” proofs for arbitrary arrival sequences to compare two redundant request strategies. These proofs have been described in the extended version of the paper. Also, they provide extensive simulation results to obtain further insights into the problem which I will describe later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*OU2TJUi9IvVOODkf.jpg" /></figure><h4><strong>The System Model</strong></h4><p>To understand the paper, we will first understand the system model they use to describe the distributed system which is associated with 3 parameters:</p><ol><li><strong>N:</strong> The number of servers in the distributed system.</li><li><strong>K: </strong>A request can be served by k out of n servers. If k=1, the request can be performed by any single server. If k&gt;1, multiple servers are required to complete the task, such as when the task requires data input from multiple servers or a machine learning computation with k out of n data blocks.</li><li><strong>R</strong>: R is the “request degree”. Each request is sent to R servers and it is deemed complete when any k (A1, A2 from the figure) of the servers, completes the job. An overhead known as “removal cost” is incurred when we remove the rest of the redundant tasks (A3).</li></ol><p>Here is an image describing how a job will be run when n=4, k=2 and r=3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Tmv8FUs1Z3JKfuww" /><figcaption>Illustration of the system for n=4, k=2 and r=3</figcaption></figure><p>During the simulations of the system, the authors use a <strong>first come first serve policy. </strong>Two cases are considered, one with a central buffer for requests and the other with a distributed buffer. The results are the same for both of these cases.</p><h4><strong>Service Time Probability Distributions</strong></h4><p>The authors talk about 3 varieties of service time probability distributions:</p><ol><li><strong>Memory Less Distribution:</strong> This idea from probability and statistics states that the distribution of waiting time for an event is independent of the elapsed time.</li><li><strong>Heavy Everywhere Distribution:</strong> This states that waiting time increases the likelihood of a negative event, leading to the possibility of a longer wait than normal.</li><li><strong>Light Everywhere Distribution</strong>: This is when waiting for some time brings you closer to completion, resulting in a smaller additional waiting time. The authors argue that a typical Disk IO service has a light everywhere service time distribution.</li></ol><h4><strong>Simulation-Based Analytical Results</strong></h4><p>Here is a set of graphs of the simulations for various r for different distribution scenarios and removal costs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*9T-mNacpTM3iKKEn.png" /><figcaption>Graphs for various system simulations of average latency vs arrival rate. (a) Memory Less Distribution (b) Heavy Everywhere © Light Everywhere (d) Non-Zero Removal Cost</figcaption></figure><p>From the graphs, we can see that for memoryless distribution (a) the arrival time is the least when r=n=10. Similarly for heavy everywhere distribution (b). For the light everywhere distribution © the latency is least for r=k=5. For the distribution with non-zero removal cost (d), the latency is least for r=n=10 for low arrival rate and r=k=5 for heavy load scenarios.</p><p>Here is a table summarizing the results from these and other simulations performed by the authors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*xl0IS0RSStNe1c-n" /><figcaption>Detailed results of the simulations. Theorems refer to theorem numbers from the paper</figcaption></figure><h3>Optimizing Network Performance with PRISM</h3><p>In the past few years, we have seen a continual increase in the network bandwidth and as we know by Moore’s law currently the CPU’s speeds have begun to stagnate, therefore it has become critical to reduce the involvement of the CPU when it comes to networking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/0*46dInRutRUxALWap.jpg" /></figure><p>In the current scenario, RDMA comes to rescue. Remote Direct Memory Access is a technology used in high-performance distributed systems for efficient data transfer between networked computers. It enables direct memory access between computers, bypassing the operating system, resulting in reduced overhead and improved performance. The current RDMA interface, widely used in high-performance distributed systems, has limitations and most of the distributed protocols cannot be easily expressed as simple memory READs and WRITEs.</p><h4>PRISM: An extension to RDMA</h4><p>PRISM (Programmable Remote Direct Memory Access Interface for Scalable Multicore Systems) is a programmable interface alternative to the existing RDMA interface. The design separates communication and memory management, simplifies management and optimization, and introduces a new buffer management approach to reduce complexity and improve performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*yOoTthrbvOMUdan-ZF3ilQ.png" /><figcaption>PRISM Primitives</figcaption></figure><p>The potential benefits can be seen in case studies of representative distributed applications:</p><p><strong>PRISM-KV:</strong> A key-value store that implements both read and write operations over RDMA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*ERrOBPsNYdEobbuh" /></figure><p><strong>PRISM-RS:</strong> A replicated storage system that implements the ABD quorum replication protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*QqqJ7WJxARGcHMKe" /></figure><p><strong>PRISM-TX:</strong> A transactional storage system that implements a timestamp-based optimistic concurrency control protocol using PRISM’s primitives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*bAeZxYDC_viJVgIl" /></figure><p>The technology provides significant performance improvements over the current RDMA interface, with an average of 2.3x lower latency and 1.7x higher throughput in benchmarking tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*NhwiZf27_biclwKn" /></figure><h4>How does PRISM achieve these improvements?</h4><p>PRISM is a communication model that separates communication and memory management to simplify the interface and improve performance. It has improved buffer management based on a combination of persistent and non-persistent memory regions, which can be dynamically created and managed by applications. This allows for more efficient and flexible use of memory resources, reducing the amount of time spent in memory-related operations.</p><p>Additionally, it provides efficient memory access, reducing the overhead associated with traditional communication methods and allowing for faster communication. The technology is designed to be programmable, allowing applications to access and manipulate remote memory directly. This enables custom communication protocols for specific use cases, reducing latency and increasing throughput of communication operations.</p><h3>References</h3><ol><li><em>Qiu, Z., Pérez, J., &amp; Harrison, P. (2016). Tackling Latency via Replication in Distributed Systems. In Proceedings of the 7th ACM/SPEC on International Conference on Performance Engineering (pp. 197–208). Association for Computing Machinery.</em></li><li><em>Shah, N., Lee, K., &amp; Ramchandran, K. (2016). When Do Redundant Requests Reduce Latency? IEEE Transactions on Communications, 64(2), 715–722.</em></li><li><em>Burke, M., Dharanipragada, S., Joyner, S., Szekeres, A., Zhang, I. , Nelson, J., &amp; Dan, R. (2021). PRISM: Rethinking the RDMA Interface for Distributed Systems</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd2d6a1f2c8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>