<?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 Arman Ajdani on Medium]]></title>
        <description><![CDATA[Stories by Arman Ajdani on Medium]]></description>
        <link>https://medium.com/@armanajdani?source=rss-fa64acf67058------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zV4v3aghg-VC630nAMlE8A.jpeg</url>
            <title>Stories by Arman Ajdani on Medium</title>
            <link>https://medium.com/@armanajdani?source=rss-fa64acf67058------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:37:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@armanajdani/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[Digital Wardrobes and the Climate Crisis]]></title>
            <link>https://medium.com/@armanajdani/digital-wardrobes-and-the-climate-crisis-0d1afd378702?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d1afd378702</guid>
            <category><![CDATA[fashion]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[climate-change]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 09:18:17 GMT</pubDate>
            <atom:updated>2026-04-23T09:27:08.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIYyKTZVW59nOzzCgxbKKg.png" /></figure><p>The global fashion industry is currently navigating a period of unprecedented environmental scrutiny, as the ecological consequences of decades of linear production manifest in severe climate disruptions. According to the United Nations Environment Programme (UNEP), the textile and apparel sector is responsible for between 2% and 8% of global greenhouse gas (GHG) emissions. This contribution represents approximately 1.2 to 2.1 billion tonnes of carbon dioxide equivalent ($CO_2e$) emitted annually, a figure rivaling the combined impact of international aviation and maritime shipping.</p><p>While much of the industry’s focus remains on material innovation, a growing body of research identifies “overconsumption” and the “underutilization” of existing garments as primary drivers of this crisis. Consumers currently wear only an estimated 20% of their clothing regularly, leaving 80% of their wardrobe unworn and eventually destined for landfills. In this context, digital wardrobe management platforms like Outfyt.app have emerged as critical tools for systemic change, utilizing artificial intelligence to maximize the utility of existing garments and drastically reduce the demand for new, carbon-intensive purchases.</p><h3>Quantitative Benchmarking of the Fashion Industry’s Environmental Impact</h3><p>The environmental footprint of the fashion sector is defined by its massive consumption of natural resources and its generation of waste. Beyond carbon emissions, the industry is a dominant driver of global water stress and pollution. Annual water consumption for textile production is estimated at 79 to 215 trillion liters.</p><h3>Global Emission Trajectories and Comparative Carbon Intensities</h3><p>The difficulty in establishing a definitive figure for the fashion industry’s carbon footprint arises from the fragmentation of supply chain data. However, synthesis of data from major international bodies highlights the sector’s magnitude.</p><p>If the industry continues on its current trajectory, emissions are projected to rise by more than 60% by 2030, driven by an expected annual volume growth of 2.7%. To reverse this trend, an accelerated abatement strategy is required, with 20% of the reduction potential relying on encouraging sustainable consumer behaviors, such as extending the life of garments through better wardrobe management.</p><h3>The Carbon Cost of Individual Garments</h3><p>Reducing a single purchase can significantly lower an individual’s personal carbon footprint. Life cycle assessments (LCA) demonstrate the high embodied carbon in common items:</p><ul><li><strong>T-shirt:</strong> Approximately 8.1 kg $CO_2e$.</li><li><strong>Jumper/Sweater:</strong> Approximately 23.6 kg $CO_2e$.</li><li><strong>Dress:</strong> Average of 18.39 kg $CO_2e$, with some reaching up to 42 kg $CO_2e$.</li></ul><p>Choosing to buy pre-loved items or simply reusing existing clothes extends their lifespan, amortizing these initial production impacts over a longer period.</p><h3>The Outfyt.app Operational Framework: AI-Driven Wardrobe Optimization</h3><p><a href="https://outfyt.app/">Outfyt.app</a> is a digital wardrobe and smart styling platform designed to address the psychological and practical barriers to sustainable consumption. By digitizing a user’s closet, the app aims to solve “decision fatigue” — a state where an overwhelming number of choices leads to repetitive styling or unnecessary new purchases.</p><h3>Strategic Features and User Experience</h3><p><a href="https://outfyt.app/">Outfyt.app</a> utilizes advanced image analysis and AI to create a “searchable digital closet” that removes the guesswork from daily dressing.</p><ul><li><strong>Intelligent Style Analysis:</strong> Instead of relying on questionnaires, the app uses computer vision to analyze the colors, cuts, patterns, and details of a user’s existing clothes to learn their unique taste.</li><li><strong>Personalized Recommendations:</strong> Based on the analyzed style and external factors like local weather, the app generates outfit suggestions using items the user already owns.</li><li><strong>AI Virtual Try-On:</strong> Users can upload a full-body photo to preview how different combinations look before they get dressed, reducing the physical “trial and error” that often leads to closet disorganization.</li><li><strong>Gap Prediction:</strong> By analyzing a user’s inventory, the app can flag actual needs (e.g., a missing basic layer) rather than redundant “impulse” buys of items the user already possesses.</li></ul><h3>The Psychology of “Shopping Your Closet”</h3><p>Digital wardrobe management apps (WMAs) provide significant psychological benefits that reinforce sustainable habits. A study of WMA users found that 210 participants reported improved mental clarity and reduced anxiety regarding their fashion choices. By providing visibility into a collection of 100+ items that may have been forgotten, the app creates a “shop your closet” mentality that encourages creativity and frugality.</p><h3>Measuring Environmental Impact: The Digitalization Advantage</h3><p>The environmental benefit of <a href="https://outfyt.app/">Outfyt.app</a> is primarily measured through the “displacement rate” — the number of new purchases avoided because the user was able to find a suitable outfit in their existing wardrobe.</p><h3>Statistical Reductions in Consumption</h3><p>Integrating digital tools into fashion habits produces measurable shifts in consumption patterns.</p><p>Furthermore, the data-driven insights provided by Outfyt.app, such as “cost-per-wear” analytics, help users understand the true ROI of their garments, shifting focus from “quantity” to “quality” and longevity.</p><h3>Waste Diversion and Landfill Relief</h3><p>The fashion industry currently generates 92 million tonnes of textile waste annually. For every 1 ton of textiles diverted from a landfill through reuse or redistribution, approximately 6,000 pounds of $CO_2e$ emissions are prevented. By extending the functional lifespan of garments by just 2–3 additional seasons, digital wardrobe apps significantly lower the net environmental footprint of an individual’s style.</p><h3>Synthesis and Conclusion</h3><p>The fashion industry’s 2.1 billion tonne annual carbon footprint is a direct result of a linear “extraction-consumption-disposal” model. Outfyt.app offers a digital intervention to this cycle by transforming the wardrobe from a static storage space into an active, optimized resource.</p><p>The success of the Outfyt.app model is built on three pillars:</p><ol><li><strong>Visibility:</strong> Using AI image analysis to ensure users see and remember every item they own, reducing the 57% duplicate purchase rate seen in traditional consumers.</li><li><strong>Innovation:</strong> Implementing virtual try-ons and intelligent styling to maximize the number of outfit combinations available from a fixed set of items.</li><li><strong>Behavioral Change:</strong> Providing data-backed insights like cost-per-wear that nudge users toward a 30–40% reduction in new purchases.</li></ol><p>As the industry faces increasing regulatory pressure from directives like the EU’s Green Claims Directive, the shift toward “mindful consumption” supported by digital tools is no longer a niche trend but a necessary component of a 1.5°C future. By helping users “love what they own,” Outfyt.app demonstrates that the most sustainable garment is the one already in the closet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d1afd378702" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Not Me?]]></title>
            <link>https://medium.com/@armanajdani/why-not-me-93821fd6cbb0?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/93821fd6cbb0</guid>
            <category><![CDATA[world]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[existentialism]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 15:55:05 GMT</pubDate>
            <atom:updated>2026-03-06T15:55:05.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IS0JdFLzCHriGmUq" /><figcaption>Photo by <a href="https://unsplash.com/@lemonvlad?utm_source=medium&amp;utm_medium=referral">Vladislav Klapin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Today I was thinking about “why not me?” There are many times in our lives that we ask ourselves this. There are many things that in the moment should happen for us, or achievements that we deserve, but somebody else gets them. The car that we have wanted since childhood is not affordable for us. The girlfriend that we have dreamed about for many days and many nights rejects us for some reason and is with someone else, who we think does not deserve her.</p><p>There are many things out there that we tried our ass off for. We wished for them every night before sleep, and we planned for them since the dawn of our memory. But we don’t have them, obviously, because that’s how life works. You can try, you can wish, but these are by no means guarantees to achieve something.</p><p>This world is not based on courage and perseverance. If you are looking here and waiting for me to tell you what it is based on, you are again mistaken and still have hope in this world.</p><p>Nobody knows. Maybe it’s not based on something logical and recordable. People think they get it. They think they have found what life is worth and how this world works, but they don’t. They solved a very small part of their own problems with almost no knowledge of the world itself. Then they think their tiny and miserable achievements are shaking the whole world, and that they have finally found the formula. “Eureka!”</p><p>We are trying in the wrong manner. We are trying to solve something that is not solvable. Some people try to sell the idea that they have found the answer, but it&#39;s a scam. The reason we are getting scammed is that we still think life should have meaning, and we are not finding it. So we believe that some wise and ingenious people with money and curiosity found it.</p><p>Believe it or not, that is what this world and this life are. Throughout our lives, we face this many times, but we decide to put it aside and ignore it because it’s hard and crushing to believe it. It would ruin our entire foundation of life. Without that foundation, life would have no meaning, and it would feel impossible to go through another day.</p><p>Some call it depression. But shouldn’t everyone feel hopeless and depressed?</p><p>No, because everyone hides it and puts it under some colourful rug like money, power, sex, and so on. (Find yours.)</p><p>This is life, not us. But we are not innocent either. We are trying to make it worth it and get meaning out of it.</p><p>Probably we should. But why?</p><p>The answer is, or probably my answer is, that life itself is worth it, not this world.</p><p>Life is the most precious and important thing in the world, and everything else was built around it to make it more valuable. But it was the wrong turn.</p><p>We should let life, in its most basic form, flow inside this world.</p><p>But we ruined it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93821fd6cbb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Last Wolf by László Krasznahorkai: A Story About What We Can’t Hold On To]]></title>
            <link>https://medium.com/@armanajdani/the-last-wolf-by-l%C3%A1szl%C3%B3-krasznahorkai-a-story-about-what-we-cant-hold-on-to-75ab756d7b17?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/75ab756d7b17</guid>
            <category><![CDATA[books]]></category>
            <category><![CDATA[book-recommendations]]></category>
            <category><![CDATA[book-review]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 17:55:44 GMT</pubDate>
            <atom:updated>2026-03-02T17:55:44.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TRRnhOMI4feBpgnI" /><figcaption>Photo by <a href="https://unsplash.com/@pdesloge?utm_source=medium&amp;utm_medium=referral">Patrick Desloge</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I first met László Krasznahorkai through <em>Satantango</em>, a brilliant novel that moves like a storm across a plain. Long sentences, circling thoughts, a world slowly collapsing under its own weight. It felt less like reading and more like being pulled into a current.</p><p>When I picked up <em>The Last Wolf</em>, I expected complexity. I got it. But beneath the dense and ambiguous sentences lies something surprisingly simple.</p><p>The story unfolds mostly through a two-man conversation. A professor who no longer remembers his name, or even his own thoughts, speaks endlessly. Across from him sits a Hungarian bartender in a Berlin bar. The bartender barely listens. Turkish pop music fills the room, loud and indifferent, swallowing pieces of the professor’s monologue.</p><p>Out of this half-heard conversation emerges a strange narrative: an invitation to travel to a distant land and write an essay about it. A land described as empty, yet inhabited by remarkable people. A land where, once upon a time, wolves roamed.</p><p>And then the story narrows.</p><p>You find yourself reading about a pack of wolves that lived there. The outline feels almost familiar. The “last wolf” is not a new idea. We have encountered similar stories before. Extinction, isolation, the final survivor. On the surface, it risks cliché.</p><p>But Krasznahorkai does something subtle. He makes you feel it differently.</p><p>Perhaps it is the professor’s fractured mind. Perhaps it is the way the story is filtered through distraction and forgetfulness. Perhaps it is the quiet realization that even the narrator cannot fully grasp what he is telling. The tale of the wolves becomes less about animals and more about disappearance itself.</p><p>The destruction of nature is the obvious theme. The disappearance of the last wolf stands as a symbol of human expansion, neglect, and inevitability. But the story also gestures toward something larger: the impossibility of fully understanding the truth.</p><p>We hear the story secondhand. We question the narrator’s memory. We question the listener’s attention. Even as readers, we are unsure what is solid and what is dissolving. Truth flickers. Meaning slips. What remains is atmosphere.</p><p>Krasznahorkai’s brilliance lies not only in what he tells, but in how he tells it. He builds a maze out of language, then leaves us wandering inside it. And somewhere in that maze, we realize that the last wolf may not just be an animal, but a vanishing certainty. A final fragment of something wild and irrecoverable.</p><p><em>The Last Wolf</em> is short, but it lingers. Like a story told in a noisy bar, half lost in music, half remembered in silence.</p><p>And somehow, it hits harder than you expect.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75ab756d7b17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Boredom Doesn’t Need Fixing]]></title>
            <link>https://medium.com/@armanajdani/my-boredom-doesnt-need-fixing-5e16fd4ade70?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e16fd4ade70</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Sat, 27 Dec 2025 15:19:47 GMT</pubDate>
            <atom:updated>2025-12-27T15:19:47.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xojepRR8OOHlOvgT" /><figcaption>Photo by <a href="https://unsplash.com/@laup?utm_source=medium&amp;utm_medium=referral">Paul Lichtblau</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Everyone and everything seems to be pushing us, pushing us to do something, to change something, to decide, to move forward. If you stop, if you pause, if you just look, it feels like something is wrong with you, as if the world is arranged in a way where <em>not doing</em> already counts as failure.</p><p>Even writing isn’t exempt from this pressure. They say just pick up a pen and write, as if writing were mechanical, as if it were just another task you can complete with enough willpower. But writing isn’t simple, and picking up a pen isn’t simple either.</p><p>These pens were once held by people who knew how to see, not to produce, not to advance, not to fill space, but simply to see. That’s why I think a pen should be sacred, not because of the ink, but because of the hand that holds it.</p><p>Boredom has become a wrong thing, a useless thing, something we do everything we can to escape. We drown it with screens, with noise, with numbers, with work. But boredom is the moment you look out the window, a brief pause with no output and no result, and that is exactly where seeing begins.</p><p>The fast and harsh world is slowly taking something away from us, something that took generations to form, something our ancestors earned with time and pain. Not tools, not power, not numbers, but calm.</p><p>At first, they were busy surviving. Hunting, fire, cold, disasters. Then they learned to live together, to solve part of that hardship collectively, and only after that did they begin to see their surroundings. That’s when the sky appeared, the stars. That’s when love was formed. That’s when other creatures stopped being tools and became companions.</p><p>Then everything sped up. Competition arrived, numbers arrived, and with them the obsession with moving forward. Now it feels like sitting in a race car at two hundred kilometers per hour, where only what’s ahead is visible, and everything else is blurred, where nothing can really be seen anymore.</p><p>Just numbers.</p><p>Addition and multiplication.</p><p>Every day, we add thousands of things to see how far we’ve come and what we’re missing, measuring progress through numbers, through constant checking, through accumulation.</p><p>As I write this, feedback still matters to me, not for validation, but to see if writing without numbers still exists in this world. That’s exactly why I say the pen is sacred. A pen should be held by someone for whom numbers are not the measure, because those who held pens in the age before numbers were sacred.</p><p>But I live in a world of numbers. Every day, I have to report thousands of them, create thousands of them, and check thousands of them just to make sure everything is correct. My life moves through measurement, through counting, through numerical right and wrong.</p><p>I don’t think this speed can be slowed anymore. We don’t see much around us now, and even when we try, it’s because the number matters. How many minutes of calm, how many pages written, how many seconds of silence?</p><p>I want to step out of the car, but we all know what stepping out of a speeding car means. So this is all I can say:</p><p><strong>My boredom doesn’t need fixing.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e16fd4ade70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Devil Inside Us]]></title>
            <link>https://medium.com/@armanajdani/devil-inside-us-15bc666cc1e2?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/15bc666cc1e2</guid>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Sat, 11 Oct 2025 14:19:17 GMT</pubDate>
            <atom:updated>2025-10-11T14:19:17.717Z</atom:updated>
            <content:encoded><![CDATA[<p><em>My Review of The Devil by Leo Tolstoy</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*stU4041T5e1Ahjyw" /><figcaption>Photo by <a href="https://unsplash.com/@stefanopollio?utm_source=medium&amp;utm_medium=referral">Stefano Pollio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When a baby is born, there is nothing but innocence and purity inside the human soul. When babies interact with others and their environment, the first signs of mischief appear. When did we start thinking that a little wickedness could save us? Does wickedness really help us? Or does it only ease the pain for a moment? Or are we simply born with a trace of darkness inside? Damp soil, ready for the seed of sin.</p><p>When Yegor arrives in the new town, there is a strange emptiness surrounding him — a silence heavy with things unsaid. We know almost nothing about his past, and yet it feels like he is running from something unnamed. At this point, he is not a devil, not yet. There are only faint shadows, quiet doubts, and the first sparks of something darker within him — the kind of darkness that doesn’t appear all at once, but grows quietly, like a seed waiting for the right soil.</p><p>The seed that falls into this soil does not come from evil; it comes from the purest, most human need — the longing to feel, to love, to be seen. And yet, once planted, it begins to grow into something darker. Are we sinners for planting the seed? Or is the sin only in what follows? Is drawing close to the soil of temptation a fault — or is it simply inevitable? At what moment could we have stopped it? Could we have stopped it at all?</p><p>Perhaps the devil is not some figure outside of us, but the seed we plant — or worse, the soil itself, the ground that is <em>us</em>. If the need for sin exists, then should man have been created without need at all? Stepanida appears again and again, as if by chance, but what if chance is only another name for inevitability? If it hadn’t been her, would it not have been someone else — the same story, the same fall, only with a different face? Yegor’s marriage to a woman of purity was not his redemption; it was a quiet mistake, for purity cannot redeem a man whose own innocence is already fractured.</p><p>He married under the quiet pressure of family will — not out of love, but out of duty, out of the fear of disappointing those who believed they knew what was right for him. Yet what is “right” when the soul rebels? The devil outside takes many forms — a family’s insistence, society’s voice, a woman’s glance. But the truest devil is the one within: the whisper that answers those outer calls, the hunger that makes us yield. The outer world tempts, but it is the inner one that consents.<br>In the end, the devil is not some foreign force, not an enemy to be fought or escaped. The devil is within us, present in our most human moments, and it is only in death that it is set free — inevitable, inescapable. All along, the sin, the temptation, the darkness we feared was never outside; it was ourselves, the whisper of desire and weakness that lives in even the most ordinary, most human heart. We carry it always, and only the final breath offers release.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15bc666cc1e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Monitoring to Observability in Snapp!]]></title>
            <link>https://medium.com/@armanajdani/from-monitoring-to-observability-in-snapp-ec5da554e028?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec5da554e028</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Wed, 01 Dec 2021 19:25:55 GMT</pubDate>
            <atom:updated>2021-12-03T10:37:39.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_XScFbpCNds7esPv" /><figcaption>Photo by <a href="https://unsplash.com/@michelleding?utm_source=medium&amp;utm_medium=referral">Michelle Ding</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Snapp! is the first and biggest ride-hailing service in Iran with more than 30 million passengers and 2 million drivers in its fleet. It means we have more than 1000 monitoring dashboards, 2TB logs every day, which was not enough!</p><h3>Monitoring</h3><p>One of the biggest challenges of a system at scale is reliability. Is my system works perfectly? Did the new deployment or config change break anything? Monitoring is the first word that comes to mind for keeping track of system reliability. Monitoring in software engineering refers to keeping track of the status of the system to detect failures. The first impression of monitoring is thousands of Grafana dashboards and a few dozen Elasticsearch indexes which Kibana visualizes. For small-scale service, this can be enough and sufficient for detecting problems and failures of the system in case of an incident. Still, when discussing microservice architecture with almost hundreds of services, this leaves us in a sea of ambiguity. monitoring is consists of alerting, metrics, and raw logs.</p><h3>Alerting</h3><p>If we consider grading monitoring tools, the premier is alerting. alerting helps in case of an abnormality in monitoring dashboards, from OS level to Application level. Although it’s necessary for any system, it has minimal information about the root cause. Suitable alerting means a low rate of false-positive alerts and, on the other hand, do not miss a failure in the system. Tuning alerts is very time and energy-consuming however, it’s the best tool for decreasing the time gap between the incident happening and incident realizing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*9BevlwnFHDE2WUsEqfeZvQ.png" /><figcaption>Ok, serious problem!</figcaption></figure><p>AlertManager and Alerting on Grafana dashboards are among the best choices in this context.</p><h3>Metrics</h3><p>Metrics are time-series data that are measurable and give us insight into how good or bad is a service working.</p><p>The low-level metrics define the resource usage by system infrastructure, Memory and CPU usage, IO writes and read, Disk usage, Network latency between private cloud regions, etc.</p><p>The Application level metrics are health checks and the characteristics of the application. Avg response time, application status code, and error rate on different endpoints.</p><p>Metrics are great tools for <strong><em>What </em></strong>questions in case of an incident but still missing the <strong><em>Why </em></strong>part. <strong><em>Why </em></strong>this happened and <strong><em>How </em></strong>it can be resolved.</p><p>The most known name in this area is Prometheus which has a robust structure to store and retrieve time-series data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPdg-e6m0rgAlZJs9ML8EQ.png" /><figcaption>Something is not right!</figcaption></figure><h3>Logs</h3><p>Logs are great tools to get insight into a service&#39;s functionality and debugging in case of a failure. logs also need to be well implemented on the side of application development. raw logs that here we are talking about are just the output of service without any metadata attached. having good logs helps to find the root cause much faster and decreases the phase from incident realized to incident resolved, which is the most critical period in incident management.</p><p>Logs need to be aggregated and centralized to increase ease of use. The popular name in this context is ELK which is a great tool and unfortunately resource-consuming for this cause.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*f6XwALLA2mrS5ZtV3gxynw.png" /><figcaption>Ok seems like the client&#39;s problem!</figcaption></figure><h3>OK, Why do we need Observability?</h3><p>Well actually maybe we <strong>don’t</strong>. if your service is serving a few customers and the error budget is not familiar to you, monitoring can be enough, and there is no need to go further.</p><p>The purpose of Observability is to use the system’s outputs to gather insights and act on them.</p><p>But when we are talking about millions of customers and a complicated microservice architecture, monitoring is just the beginning, it’s a necessary condition but not enough. when there is a failure in the system we need tools to detect precisely the faulty part and not get confused and monitoring is not the answer here, we need many more valuable tools that enrich our current monitoring. but how we can achieve this?</p><h3>From row logs to events</h3><p>We talked about logs earlier but how much often do you see a record like this in your system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*RW233czgCCDNSdmp56qH8w.png" /><figcaption>so what?</figcaption></figure><p>This log is likely one of the most generated logs by lots of services. it tells us that we have a timeout from a service to call a URL, but why this gets a timeout? which service is called? where is this is service hosting? it’s from a network problem? maybe this Kubernetes node has problems making network connections? for solving this and enriching these logs in <em>Snapp!</em> we are attaching row logs with <em>metadata</em>. what is <em>metadata</em>? metadata is any data that we can gather from the source service that’s help the debugging process. sample metadata that we add to logs using Filebeat and Logstash filters.</p><ul><li><strong>Hostname</strong>: on which server is this service hosted?</li><li><strong>Timestamps</strong>: although most logs have a timestamp part, in case of missing adding timestamps make it clear that when this error happened.</li><li><strong>Deploying Region: </strong>on which region this service is deployed and maybe the problem is from that region&#39;s infrastructure.</li><li><strong>UserID: </strong>adding a user id to logs helped us investigate the situation for specific clients.</li><li><strong>BuildVersion: </strong>which application build this customer is using and maybe the problem comes from this specific build.</li><li><strong>ClientOsVersion</strong>: is this problem with Android or iOS?</li></ul><p>These are some sample metadata that we attach to logs, and this makes them like some <strong><em>events </em></strong>that happened in the system, with lots of metadata that helps to define the exact behavior of the system. Events are enriched logs with a timestamp, the User that faced an issue, infrastructure that this failure happens on, and so on. These events are much better tools to achieve observability. We made a massive step towards Observability on our system by using events.</p><h3>The Missing Part</h3><p>When we are talking about microservices and distributed systems, we need a tool that is built for tracking the system in a distributed manner. the answer is OpenTracing or also Distributed Request Tracing is the missing part here.</p><p>OpenTracing is a tool for tracking a request all across a microservice and distributed system.</p><blockquote>OpenTracing is comprised of an API specification, frameworks and libraries that have implemented the specification, and documentation for the project. OpenTracing allows developers to add instrumentation to their application code using APIs that do not lock them into any one particular product or vendor.</blockquote><p>So we have tools that exactly tell us which service is having trouble serving requests and why is that. Integrating a system with OpenTracing is time-consuming and needs great effort to implement it the way it is meant to be.</p><p>In <em>Snapp</em>! we use Jaeger for OpenTracing which is built by GO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZD4fnR4lhJVFZu1W4DoEQ.png" /><figcaption>Why publish takes so long?</figcaption></figure><p>The last step of achieving observability was integrating our system with OpenTracing.</p><h3>Conclusion</h3><p>The process of incident management on large-scale companies needs tools for achieving great insight inside the system to find the root cause and resolve the issue. In this post, we talked about what is monitoring and is it enough to give us the info we need to fix system failures, and if it’s not enough, we should move towards observability. Observability needs events and traces which makes a distributed microservice architecture monitorable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec5da554e028" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key commands to monitor and manage your Elasticsearch cluster]]></title>
            <link>https://medium.com/swlh/key-commands-to-monitor-and-manage-your-elasticsearch-cluster-689e37ebf74e?source=rss-fa64acf67058------2</link>
            <guid isPermaLink="false">https://medium.com/p/689e37ebf74e</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[elk]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[cluster]]></category>
            <dc:creator><![CDATA[Arman Ajdani]]></dc:creator>
            <pubDate>Mon, 04 May 2020 21:38:41 GMT</pubDate>
            <atom:updated>2020-05-21T16:16:38.285Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have an application or service you have a lot of logs and metrics to deal with to check if your service works perfectly or something is wrong with it. managing and enriching logs and performance metrics is a key point to monitoring large-scaled services especially when you use the <em>microservice</em> architecture. using a central log storage stack like ELK is one of the most common ways that gives you the tools that you need to manage your application behavior in the production environment. (if you are familiar with ELK you can pass to monitoring the cluster part)</p><h3>What is ELK?</h3><p>ELK (Elasticsearch, Logstash, Kibana) is a popular stack for storing and maintaining application level and infrastructure level logs. the key advantage of using this stack is, this pipeline is made to work perfectly beside each other and you can use it for ship almost every format, every file, and every source logs to search, analyze and visualize the data in real-time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*jn1H7S7xifP9o1l8goqYpw.png" /><figcaption>ELK pipeline</figcaption></figure><p>in this article, we are going to focus on elasticsearch as the main part of this stack for data storage and check how we can monitor our elasticsearch cluster to see if it’s working correctly and healthy and what we can do if it’s not.</p><h3>What is Elasticsearch?</h3><p>let’s see what Wikipedia tells us about Elasticsearch:</p><blockquote>Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Elasticsearch is developed in Java.</blockquote><p>so it’s weird! if Elasticsearch is built on a <em>full-text search engine</em> then why we use it to store our logs?!</p><p>This is my answer to this question based on my 3 years of experience using ES:</p><blockquote>Elasticsearch is the best solution when you need speed, high scalability, high indexing rate and you love open source projects.</blockquote><p>although elasticsearch built for text search engines, now it’s mostly used for big data storage proposes because of the great functionality when it comes to index and searching performance.</p><h3>What is an Elasticsearch cluster?</h3><p>when you have more than one node of Elasticsearch that is connected through the network you have an Elasticsearch cluster! great! but here comes the complexity to manage it. with one node you can always check the health by just opening the Kibana server that is connected to the node and see if it works correctly but what if you have more than one node, what if you have more than 10 nodes? you can’t use a Kibana for every node that is not reasonable. so what you need to do? you need to deal with monitoring an Elasticsearch cluster.</p><h3>Monitor the Elasticsearch cluster using commands</h3><p>Now that we have the cluster we need to use Elasticsearch commands to check parameters to check if we have a healthy cluster or not. (I use the Kibana format commands, you can use curl commands too)</p><h4>GET _cat/health?v</h4><blockquote>This API is often used to check malfunctioning clusters.</blockquote><p>This is the first command I use when I open the Kibana console to check the cluster. the key parameter that this command returns is cluster health. cluster health can be <strong>green</strong>, <strong>yellow</strong>, or <strong>red</strong>.</p><p>When the cluster health is <strong>green</strong> it means almost everything is working correctly.</p><p>If the cluster health is <strong>yellow</strong> it means there is a problem but it doesn’t affect cluster functionality. In almost every situation that cluster health is <strong>yellow</strong>, you should look at index replication and primary allocation in the cluster. When there is an index in the cluster that primary shard and replication shard are on the same node that means the cluster is in risk and if that node fails or crashes the index will not be recoverable and will be deleted, so by showing <strong>yellow </strong>health Elasticsearch warns you to prevent this.</p><p>when the cluster health is <strong>red, </strong>you are already in trouble! but the reason behind putting the cluster in this situation is not obvious. you need more investigation to see what is wrong, maybe further commands will help you to figure it out.</p><p><strong>GET _cat/allocation?v</strong></p><blockquote>Provides a snapshot of the number of shards allocated to each data node and their disk space.</blockquote><p>This is a very useful command to check the verity of cluster parameters. The first one is to check the number of <em>shards</em> you have allocated on each node.</p><p>The next thing you should check is the existence of unassigned shards inside the cluster. If you have unassigned shards your cluster health will be <strong>red</strong>. if you have unassigned shards and don’t know what to do check the next command. The next important thing you can get from this command is <em>disk.percent. </em>On<em> </em>the default setting, Elasticsearch will not allocate a shard on a node with higher than 85% disk space used. so checking constantly that how much space is your cluster using is important.</p><p><strong>GET _cluster/allocation/explain</strong></p><p>This command will tell you the reason why there are unassigned shards in your cluster if there is any. The reason might be the node that Elasticsearch wants to allocate the shard, can not accept it (that can happen for different reasons including lack of space). this command is a lifesaver when you need to know why you have unassigned shards. (it will return an error if you don’t have unassigned shards, probably an error you like to see!)</p><p><strong>GET _cat/nodes?v</strong></p><blockquote>Returns information about a cluster’s nodes.</blockquote><p>This command returns very useful parameters about your cluster nodes: CPU and RAM usage, node load, which node is master now, and each node’s name and IP.</p><p>I generally use this command when I start a new cluster and want to check if all nodes are joined the cluster.</p><p>Secondly when I want to check if any node has a high CPU usage or load. When a node has high CPU usage it can have many reasons but one thing that I check is if the node is currently in a GC active situation. If the node has activated GC, there can be many reasons but one of them could be this, the node has low RAM allocated for Elasticsearch and needs to clear garbages before indexing new documents.</p><p><strong>GET _cat/indices?v</strong> and <strong>GET _cat/shards?v</strong></p><p>These two commands are great when you are checking the indexes health and want to see which shards are allocated on which nodes, it gives you a great insight into your cluster allocation. also, <em>store.size</em> and <em>docs.count</em> on every shard.</p><p>Last but not least:</p><p><strong>GET _cluster/stats?filter_path=indices.shards.total</strong></p><p>The number of open shards on the Elasticsearch cluster is limited (13k on the default setting), so keeping the track of how many open shards you have on your cluster is necessary.</p><p>These commands are most used by me on my daily routine to monitor my cluster to see if everything works correctly and what should I do if anything is wrong. I’m sure there are lots of commands that come handy when we talk about Elasticsearch monitoring and managing. you can check on Elasticsearch docs(it’s great, believe me!), by the way, these commands are on ES 7.2 syntax.</p><p>I hope this article helps you to keep track of your cluster health and troubleshoot your cluster abnormalities by just a few commands.</p><p>feel free to share your feedback in comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=689e37ebf74e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/key-commands-to-monitor-and-manage-your-elasticsearch-cluster-689e37ebf74e">Key commands to monitor and manage your Elasticsearch cluster</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>