<?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 Mousevale on Medium]]></title>
        <description><![CDATA[Stories by Mousevale on Medium]]></description>
        <link>https://medium.com/@stormouse?source=rss-86708cba17da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tp9GhNbICsG0zABL.</url>
            <title>Stories by Mousevale on Medium</title>
            <link>https://medium.com/@stormouse?source=rss-86708cba17da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:01:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stormouse/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[Building Resilient Systems: Learning from Failure and Partial Success]]></title>
            <link>https://medium.com/@stormouse/building-resilient-systems-learning-from-failure-and-partial-success-2cb7c052a148?source=rss-86708cba17da------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cb7c052a148</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[high-performance]]></category>
            <dc:creator><![CDATA[Mousevale]]></dc:creator>
            <pubDate>Sat, 15 Apr 2023 08:41:47 GMT</pubDate>
            <atom:updated>2023-04-15T09:07:09.154Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-paced technological landscape, it is essential to create resilient systems capable of handling failures and still delivering value. In this post, my thought process is grounded in an industry where high performance and real-time service are crucial, while a slight degradation in service quality is tolerable. I am going to discuss “failing properly” and designing components that can partially work, exploring these ideas with examples, and addressing potential concerns for a comprehensive understanding.</p><h4>Embracing Failure and Designing for Failure Modes</h4><p>In a latency-sensitive project, I implemented a 10-millisecond timeout for an external service call using .NET Core HttpClient’s timeout mechanism. When the timeout occurred, HttpClient closed the underlying connection, causing overhead for subsequent requests when the service is already most busy. To address this, I modified my strategy, canceling the request after 1 second but waiting only 10 milliseconds on my thread, thus maintaining the connection.</p><p>This experience led me to consider the concept of “failing properly.” If we can predict that a downstream service will be slow or busy, it may be more beneficial to fail early, either by terminating the request, proceeding without the service output, or providing an approximate result. Embracing failure can result in more robust systems that can adapt to various scenarios and improve handling of temporary network failures or slow-responding services.</p><h4>Creating Components that Can Partially Work</h4><p>Designing components that can partially work under constraints, such as time budget, can lead to more flexible systems. Numeric optimization algorithms are well-known for their ability to trade iterations for precision, providing a better-than-nothing approximation. In web application development, Progressive Rendering and Graceful Degradation are techniques used to maintain user experience and core functionality even under suboptimal conditions.</p><h4>Composing Partially-Working Subsystems</h4><p>Building workflows that use these components effectively requires designing smart way to composite the partial models. In my scenario — a recommender system who takes numeric optout (relevant scores) from multiple recommendation subsystems like user-based and item-based approaches, a weighted additive model would solve my problem.</p><p>Such composition is well adopted in Machine Learning territory too: Ensemble Learning, used in machine learning models such as Random Forests and Gradient Boosting Machines, combines the output of multiple weak learners to produce more accurate and robust predictions.</p><h4>Monitoring Service Quality through Observability</h4><p>The composition model we proposed help systems adapt within time budget, which frees developers from putting out fires like a complete outage. However, this gives a path for small and gradual degradation to sneak into production system.</p><p>Embracing failure and designing for partial functionality requires addressing the tradeoff of service quality. Establishing clear service level objectives (SLOs) and implementing quality measurement strategies are crucial for effectively monitoring and maintaining service quality. By building observability around service quality, teams can proactively address gradual degradation of system performance or accuracy and prioritize improving service quality and optimization.</p><h4>Considerations</h4><p>While designing for failure and partially working components offers benefits, it is vital to consider potential concerns. Balancing complexity and resilience, evaluating performance implications, avoiding over-engineering solutions, and managing uncertainty and human factors are essential aspects to weigh against the benefits of increased resilience.</p><h4>Conclusion</h4><p>By actively designing for failure modes, creating components that work under suboptimal conditions, and combining partially working models using weighted additive models, we can build more resilient and adaptable systems. Embracing these principles while being mindful of potential concerns will help us create robust and adaptable systems that thrive in an ever-changing technological landscape. Let’s learn from our experiences and use these insights to build systems that not only endure challenges but also continue to provide value even in the face of failure.</p><p><em>(Note: This post was created with the assistance of OpenAI’s GPT-4 language model, which provided valuable insights, examples, and revisions throughout the writing process. The “Considerations” section is mostly based on GPT-4’s response when asked for counterarguments.)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cb7c052a148" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>