<?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 Secure Edge Ops on Medium]]></title>
        <description><![CDATA[Stories by Secure Edge Ops on Medium]]></description>
        <link>https://medium.com/@y3kdmdrbaunib?source=rss-824da098e1fb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cjNfryfhCYlOBTGO3EdImg.jpeg</url>
            <title>Stories by Secure Edge Ops on Medium</title>
            <link>https://medium.com/@y3kdmdrbaunib?source=rss-824da098e1fb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:59:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@y3kdmdrbaunib/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[18. What Remote Monitoring Really Changes in Medical Device After-Sales Support]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/18-what-remote-monitoring-really-changes-in-medical-device-after-sales-support-646c9013a9a3?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/646c9013a9a3</guid>
            <category><![CDATA[remote-monitoring]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[customer-experience]]></category>
            <category><![CDATA[medical-devices]]></category>
            <category><![CDATA[customer-support]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 00:23:14 GMT</pubDate>
            <atom:updated>2026-10-25T00:23:14.667Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The real value isn’t just remote access. It’s helping support teams make better decisions, faster, with the right information.</em></p><h3>Introduction</h3><p>When we think about Remote Monitoring and Remote Connection for medical devices, one of their most important benefits is the ability to <strong>improve both the speed and quality of troubleshooting, from the moment an issue occurs until the case is closed.</strong></p><p>Many factors affect how quickly and effectively a technical issue can be resolved.</p><p>Some depend heavily on people, organizational structures, or local circumstances. Others are relatively easier to control and can benefit everyone involved in the support process.</p><p>In this article, I want to explore one particular area where Remote Connection can make a meaningful difference:</p><p><strong>How accurate, well-organized information can improve the entire after-sales support process.</strong></p><h3>1. What Determines the Speed and Quality of Troubleshooting?</h3><p>Imagine a medical device installed in another country.</p><p>When a technical issue occurs, the support process might involve several organizations:</p><p><strong>Customer / Hospital</strong><br>↓<br><strong>Field Service Engineer (Local Distributor)</strong><br>↓<br><strong>Distributor Technical Support</strong><br>↓<br><strong>Local Sales Subsidiary</strong><br>↓<br><strong>Headquarters Technical Support</strong></p><p>Of course, not every issue reaches headquarters.</p><p>Some problems can be resolved directly by a local Field Service Engineer. Others may require assistance from the distributor or local subsidiary.</p><p>In this kind of support structure, there are several ways to improve response time and service quality.</p><p>For example:</p><ul><li>Improve how technical information is transferred between support teams.</li><li>Develop the skills of support engineers through training and recruitment.</li><li>Allocate more time and resources to troubleshooting.</li><li>Strengthen relationships between distributors and local subsidiaries to improve support responsiveness.</li><li>Accelerate the supply of replacement parts and software required for recovery.</li><li>Provide backup equipment to reduce the impact of downtime while repairs are in progress.</li></ul><p>All of these approaches are important.</p><p>However, they differ significantly in cost, complexity, and how much control a manufacturer actually has over them.</p><p>Training highly skilled Field Service Engineers takes time.</p><p>Improving response priority at a local distributor may depend on its business situation and commitments to other customers.</p><p>Keeping spare parts in multiple countries can shorten repair times, but it also increases inventory costs.</p><p>There is, however, another improvement opportunity that is slightly different from these approaches.</p><p><strong>Making accurate, well-organized information available throughout the entire support organization.</strong></p><p>At first glance, this may seem like a relatively minor improvement.</p><p>Its benefits can also be difficult to measure.</p><p>But I believe this is one of the areas with the greatest potential to improve after-sales support.</p><h3>2. Why Information Matters So Much</h3><p>Troubleshooting begins with understanding what actually happened.</p><p>If the information is inaccurate, engineers may make incorrect decisions.</p><p>For example, if a diagnosis is based on information that does not reflect the actual device condition, the support team might replace an unnecessary component or perform a software update that does not address the problem.</p><p>If the available information is incomplete, the investigation may not progress at all.</p><p>A headquarters support engineer may request additional logs.</p><p>That request then travels back through the local subsidiary, the distributor, and finally the Field Service Engineer.</p><p>If the information is poorly organized, the next person in the support chain must spend time understanding the situation before conducting any meaningful analysis.</p><p>Even communicating the current status can require several exchanges.</p><p>The process may look like this:</p><p><strong>Incomplete information</strong><br>↓<br><strong>Request for additional information</strong><br>↓<br><strong>Reconfirmation at the customer site</strong><br>↓<br><strong>Additional reporting</strong><br>↓<br><strong>Restarting the technical investigation</strong></p><p>The real problem is that this cycle can occur at multiple levels of the support organization.</p><p>One round of communication between the Field Service Engineer and the distributor.</p><p>Another between the distributor and the local subsidiary.</p><p>And another between the local subsidiary and headquarters.</p><p>Each delay may seem small.</p><p>But when these delays accumulate across multiple organizations, the total time can become significant.</p><p>There is also another cost.</p><p>Every person involved must spend time collecting, interpreting, organizing, and explaining information.</p><p>That time could otherwise be spent investigating the root cause or planning the next recovery action.</p><p>This is why I believe an important objective should be:</p><p><strong>Reducing both the operational workload of information sharing and the cognitive effort required to understand a technical issue.</strong></p><p>If everyone can access accurate and well-structured information from the beginning, there is less need to repeatedly ask the same questions.</p><p>Engineers can spend less time trying to understand what happened and more time deciding what to do next.</p><h3>3. A Practical Example: A Medical Device in a Remote City</h3><p>Let’s consider a more specific scenario.</p><p>A medical device experiences a technical failure in a regional city in another country.</p><p>A Field Service Engineer from the local distributor is assigned to visit the hospital.</p><p>Depending on the location, transportation, and availability of engineers, it may take several days before someone can arrive on-site.</p><p>At this point, one question becomes particularly important:</p><p><strong>How much accurate information can be collected during the first visit?</strong></p><p>Suppose the engineer records an error code but does not collect detailed logs or the device conditions at the time of the failure.</p><p>Unable to resolve the issue independently, the engineer escalates it to the distributor’s technical support team.</p><p>However, the available information is insufficient to identify the cause.</p><p>The distributor then escalates the issue to the local sales subsidiary.</p><p>After reviewing the report, the subsidiary requests additional information.</p><p>That request goes back through the distributor to the Field Service Engineer.</p><p>Depending on the situation, another site visit may be necessary.</p><p>If the local subsidiary still cannot resolve the issue, the case is escalated to headquarters.</p><p>The headquarters engineering team begins its investigation but discovers that another specific log or device status record is required.</p><p>Once again, the request travels through the same support chain.</p><p>In some situations, these repeated exchanges can extend the investigation over several weeks, or even one to several months.</p><p>Of course, information gaps are not the only reason technical cases take a long time to resolve.</p><p>Technical complexity, spare-part availability, and organizational priorities also play important roles.</p><p>But I think there is a question worth asking:</p><p><strong>How many of these exchanges could have been avoided if sufficient first-hand technical information had been available from the beginning?</strong></p><p>That is where I see a major opportunity for Remote Connection.</p><h3>4. What Changes With Remote Connection?</h3><p>Now imagine that the medical device supports secure remote access to the information required for troubleshooting.</p><p>For example:</p><ul><li>Error codes and event logs</li><li>Current device status</li><li>Software and firmware versions</li><li>Device configuration</li><li>Timestamps of technical failures</li><li>Relevant diagnostic data</li></ul><p>Traditionally, a Field Service Engineer might need to collect this information on-site and pass it through several organizations.</p><p>With Remote Connection, authorized support personnel can access the same technical information according to their roles and permissions.</p><p>This does not eliminate the need for local engineers or communication between support teams.</p><p>Instead, it changes how information is obtained and shared.</p><p>For example, a headquarters support engineer could review device logs directly without repeatedly asking the distributor or Field Service Engineer to retrieve them.</p><p>Engineers at different levels could reference the same event timestamps and device conditions, reducing misunderstandings caused by secondhand reporting.</p><p>If diagnostic information is securely collected and uploaded to the cloud, the headquarters team may even be able to begin its investigation before a local engineer arrives at the customer site.</p><p>Remote Monitoring can help identify that something has happened.</p><p>Remote Connection can help engineers investigate what happened.</p><p>Of course, such systems must be designed with appropriate cybersecurity, access control, and data protection measures, especially in medical environments.</p><p>And Remote Connection alone cannot resolve every technical problem.</p><p>Physical repairs, component replacement, and on-site inspections will still be necessary in many situations.</p><p>Nevertheless, improving the way technical information is collected and shared can make a meaningful difference in both response time and service quality.</p><h3>Supporting the People Who Support Customers</h3><p>There is another aspect of Remote Connection that I consider especially important.</p><p><strong>It makes the daily work of after-sales support professionals easier.</strong></p><p>Field Service Engineers, distributor support teams, local subsidiaries, and headquarters engineers all share responsibility for helping customers resolve problems.</p><p>But they often work under significant constraints.</p><p>They may have limited time, insufficient information, competing priorities, or difficulties coordinating with other organizations.</p><p>A well-designed Remote Connection system can reduce some of these burdens.</p><p>Instead of spending hours requesting logs, reorganizing reports, or confirming information that has already been collected, support engineers can focus more directly on technical investigation and customer communication.</p><p>I also believe there is a human side to this improvement.</p><p>When an organization provides practical tools that genuinely help its frontline teams, those employees may feel that their work is understood, valued, and supported.</p><p>In other words:</p><p><strong>“Our organization recognizes the work we do for customers and is investing in the tools we need to do it well.”</strong></p><p>I believe this sense of organizational support can strengthen employee commitment and improve performance.</p><p>And when frontline teams are better supported, they are in a stronger position to provide better service to customers.</p><p>For me, this is an important part of the value of Remote Connection.</p><p>It is not only about technology or operational efficiency.</p><p>It is also about creating an environment where the people responsible for customer support can do their jobs effectively.</p><h3>5. Troubleshooting Starts With Collecting the Facts</h3><p>When I look at the overall troubleshooting process, I tend to break it down into six stages.</p><p><strong>1. Can we collect the necessary facts?</strong></p><p>Do we have accurate, objective information about what happened?</p><p>↓</p><p><strong>2. Can we organize and communicate those facts correctly?</strong></p><p>Can the next support team understand the situation without unnecessary clarification?</p><p>↓</p><p><strong>3. Do we have the organizational capability to analyze the information and determine the next action?</strong></p><p>Can the responsible team interpret the evidence and develop an appropriate technical response?</p><p>↓</p><p><strong>4. Can we communicate and implement the action plan effectively?</strong></p><p>Can the technical instructions be translated into clear, practical steps for the people working on-site?</p><p>↓</p><p><strong>5. Can the actions actually be executed in the field?</strong></p><p>Do local teams have the required skills, tools, parts, and resources?</p><p>↓</p><p><strong>6. Can we verify the results and efficiently determine the next step?</strong></p><p>Can we confirm whether the action worked and use the findings to guide further investigation if necessary?</p><p>All six stages matter.</p><p>Even if one stage works perfectly, that alone does not guarantee high-quality after-sales support.</p><p>However, I believe the first stage has a particularly strong influence on everything that follows.</p><p>If the initial facts are incomplete or inaccurate, subsequent analysis and decision-making become much more difficult.</p><p>That is why I see the first challenge in troubleshooting as:</p><p><strong>How quickly and accurately can we collect the factual information required to understand the problem?</strong></p><p>By reducing the time and effort spent collecting and transferring information, Remote Connection allows support teams to direct more of their resources toward technical analysis and recovery actions.</p><h3>Conclusion: Better Support for Engineers Ultimately Means Better Support for Customers</h3><p>Throughout this article, I have mainly discussed Remote Monitoring and Remote Connection from the perspective of support organizations, including distributors, local subsidiaries, and headquarters.</p><p>But the ultimate beneficiary should be the customer.</p><p>I see the value chain as follows:</p><p><strong>More efficient information collection and sharing</strong><br>↓<br><strong>Lower operational workload and cognitive burden for support teams</strong><br>↓<br><strong>More resources available for technical investigation and recovery</strong><br>↓<br><strong>Faster and higher-quality troubleshooting</strong><br>↓<br><strong>Less customer downtime and greater confidence in the manufacturer</strong></p><p>There is also something important to remember.</p><p>For customers, good after-sales support is not simply about getting a device running again.</p><p>They also want to understand:</p><p><strong>What happened?</strong></p><p><strong>Why did it happen?</strong></p><p><strong>What will be done to prevent it from happening again?</strong></p><p>These explanations are part of service quality.</p><p>In fact, I have received feedback from many customers who made it clear that they would not consider a technical case closed until the direct cause had been identified and appropriate corrective actions had been provided.</p><p>This has reinforced my belief that after-sales support is not only about recovery speed.</p><p>It is also about the quality of the investigation, communication, and follow-through.</p><p>Remote Connection cannot replace the expertise, judgment, and commitment of support professionals.</p><p>But it can provide those professionals with better information and a more effective environment in which to work.</p><p>When the efforts of frontline engineers are combined with well-designed organizational support systems, the quality of service can improve over time.</p><p>And eventually, customers may come to feel:</p><p><strong>“Even when something goes wrong, we can trust this manufacturer to support us properly.”</strong></p><p>I believe that kind of trust is one of the most valuable outcomes of after-sales support.</p><p>And ultimately, it contributes to the long-term value of the company itself.</p><h3>A Final Note</h3><p>This article is a little different from the technical articles I have published so far.</p><p>Rather than focusing on system configuration or implementation, I wanted to share my perspective on why Remote Connection matters in after-sales support, based on the challenges I have considered in real-world operations.</p><p>Thank you for taking the time to read it.</p><p><em>— Secure Edge Ops</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=646c9013a9a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[17. Start With Customer Value, Not the Cloud — A Practical Approach to IoT and Edge System Design]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/17-start-with-customer-value-not-the-cloud-a-practical-approach-to-iot-and-edge-system-design-b31a193d7981?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b31a193d7981</guid>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[remote-monitoring]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[medical-devices]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 01:01:27 GMT</pubDate>
            <atom:updated>2026-10-10T01:01:27.979Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why choosing the right technology starts with understanding the problems we actually need to solve.</em></p><h3>Introduction</h3><p>In my previous article, I discussed how technical improvements such as reliability, security, monitoring, and remote support ultimately contribute to customer value.</p><p>These improvements can lead to:</p><ul><li>Reduced equipment downtime</li><li>Lower support and maintenance effort</li><li>Easier system deployment</li><li>Better product quality</li></ul><p>Looking at these benefits from a broader perspective raises an important question:</p><p><strong>Where should we actually start when designing a new IoT or Edge system?</strong></p><p>When planning a new system, it is tempting to begin with technology decisions.</p><p>Should we use Azure? Do we need an Edge PC? Should we use LTE connectivity? Would Azure IoT Hub be the right platform?</p><p>These are all valid questions.</p><p>But I believe they come too early in the design process.</p><p>Before selecting a technology, we should understand what we are trying to achieve.</p><p>In this article, I want to share an approach to IoT and Edge system design that starts with customer value and works backward toward technical requirements.</p><h3>1. The First Decision Is Not Which Edge PC to Use</h3><p>Imagine we are planning a new remote monitoring system for medical equipment.</p><p>A typical technical discussion might begin with questions such as:</p><ul><li>Which CPU should we use?</li><li>How much RAM is required?</li><li>Should the Edge PC run Windows or Linux?</li><li>Which cloud platform should we select?</li></ul><p>These decisions matter, but they should not be our starting point.</p><p>First, we need to ask:</p><p><strong>Who are we trying to help, and what value do we want to provide?</strong></p><p>For example, customers may want to detect equipment failures earlier, minimize downtime, or reduce the need for on-site service visits.</p><p>A technical support team may want to perform initial troubleshooting remotely instead of sending an engineer to the site.</p><p>A product development team may want to understand what types of failures are occurring in the field and under what conditions.</p><p>All three objectives may involve connecting equipment to the cloud.</p><p>However, the data, communication frequency, system architecture, and operational requirements could be completely different.</p><p>The technology should follow the purpose, not the other way around.</p><h3>2. Focus on What Is Needed, Not What Is Possible</h3><p>Modern IoT platforms provide a wide range of capabilities.</p><p>We can collect real-time telemetry, store large volumes of data, perform AI-based analysis, and remotely manage or update devices.</p><p>These capabilities are useful.</p><p>But having the ability to implement something does not necessarily mean we should.</p><p>I have found that one of the challenges in system design is avoiding unnecessary complexity.</p><p>Once a technology becomes available, it is easy to start thinking about how to use it.</p><p>A better question is whether it solves an actual problem.</p><p>For example, suppose a customer simply wants to know when a medical device stops operating.</p><p>Do we really need a sophisticated cloud analytics platform?</p><p>Possibly not.</p><p>A relatively simple system that collects equipment status and sends alerts might be enough.</p><p>Of course, the required detection time, reliability, and clinical implications would need to be evaluated.</p><p>The point is that the solution should be proportional to the requirement.</p><p><strong>A system does not become better simply because it has more features.</strong></p><h3>3. Work Backward From Customer Value to Required Data</h3><p>Once we understand the value we want to deliver, the next question becomes:</p><p><strong>What information do we actually need to provide that value?</strong></p><p>Consider three possible objectives.</p><h3>Early fault detection</h3><p>If the goal is to detect equipment failures quickly, we might need:</p><ul><li>Device operating status</li><li>Error codes and fault information</li><li>Network connectivity status</li></ul><h3>More efficient maintenance</h3><p>If the objective is to improve maintenance efficiency, useful information might include:</p><ul><li>Total operating hours</li><li>Number of operating cycles</li><li>Component replacement history</li><li>Consumable usage</li></ul><h3>Product quality improvement</h3><p>If the objective is to improve product quality, we may need:</p><ul><li>Fault history</li><li>Software versions</li><li>Operating conditions when faults occurred</li><li>Relevant diagnostic information</li></ul><p>Although these examples all involve data collection, they serve different purposes.</p><p>The important design sequence is:</p><p><strong>Customer Value → Required Information → System Requirements</strong></p><p>Starting with this sequence helps us avoid collecting data without a clear purpose.</p><h3>4. More Data Is Not Always Better</h3><p>Cloud platforms make it relatively easy to collect and store large volumes of data.</p><p>This creates a tempting approach:</p><p>“Let’s collect everything now. We might need it later.”</p><p>But every additional piece of data has a cost.</p><p>More data can mean higher network traffic, increased storage requirements, additional cloud expenses, greater security responsibilities, and more complex analysis.</p><p>In medical environments, data collection may also introduce additional privacy and regulatory considerations.</p><p>For that reason, we should carefully consider the purpose of each data item.</p><p>For example, do we need to collect an operating parameter every second?</p><p>Would once per minute be sufficient?</p><p>Or would collecting the value only when an abnormal event occurs provide the information we need?</p><p>There is no single correct answer.</p><p>It depends on what the system is expected to accomplish.</p><p>For detecting a rapidly developing critical fault, frequent monitoring may be essential.</p><p>For tracking accumulated operating hours, collecting data once per day might be sufficient.</p><p><strong>The required data resolution should come from the use case, not from the technical capability of the platform.</strong></p><h3>5. Not Everything Needs Real-Time Connectivity</h3><p>When people think about IoT, they often imagine devices continuously connected to the cloud, sending telemetry in real time.</p><p>But continuous communication is not always necessary.</p><p>Consider the following information from a medical device.</p><p>A critical fault may need to be reported immediately.</p><p>A software version might only need to be checked periodically.</p><p>Total operating hours or consumable information may be collected at longer intervals.</p><p>This suggests that we should distinguish between different communication patterns.</p><p><strong>Continuous monitoring:</strong> For information that must be observed frequently or within a defined detection window.</p><p><strong>Periodic reporting:</strong> For information such as operating hours, software versions, or maintenance records.</p><p><strong>Event-driven reporting:</strong> For information that only needs to be transmitted when a particular condition occurs.</p><p>Separating these requirements can simplify the system and reduce unnecessary communication.</p><p>It can also help us determine whether constant cloud connectivity is truly necessary.</p><p>For medical equipment, however, one distinction is especially important: remote monitoring should not automatically become a dependency for safety-critical local operation.</p><p>If immediate protective action is required, that requirement must be addressed independently of the availability of a remote cloud connection.</p><h3>6. Data Requirements Should Drive Network and Security Design</h3><p>Once we know what data to collect and how frequently it must be transmitted, we can begin defining the network requirements.</p><p>A system that continuously transfers large volumes of diagnostic data will have very different requirements from one that sends a few status messages each day.</p><p>Before choosing a network technology, we should understand:</p><ul><li>What information needs to be transmitted?</li><li>How much data will be generated?</li><li>How frequently must it be sent?</li><li>What delivery latency is acceptable?</li><li>What should happen when communication fails?</li></ul><p>Only then should we compare the available connectivity options.</p><p>The same requirement-driven thinking applies to security.</p><p>Security should not be treated as a simple choice between a “high” or “low” security level.</p><p>Instead, we need to evaluate the information being handled, potential threats, access paths, system environment, and operational responsibilities.</p><p>Appropriate security controls are essential, especially for connected medical equipment.</p><p>At the same time, the architecture needs to remain maintainable.</p><p>Adding more security components does not automatically make a system safer if those components introduce configuration errors, operational complexity, or maintenance difficulties.</p><p>The objective is to satisfy the necessary security requirements while balancing reliability, cost, deployment effort, and long-term operation.</p><h3>7. Only Then Should We Define the Edge Device</h3><p>After establishing the requirements, we can finally begin evaluating the Edge device itself.</p><p>Suppose our system needs to:</p><ul><li>Convert communication protocols</li><li>Store data locally</li><li>Retain messages during network outages</li><li>Connect to multiple medical devices</li><li>Perform local processing</li></ul><p>In that case, an Edge PC with sufficient processing power, memory, and storage may be appropriate.</p><p>However, consider a different product that only needs to send a small amount of telemetry periodically.</p><p>Does it require the same Edge PC?</p><p>Not necessarily.</p><p>A simpler gateway or another embedded connectivity solution might satisfy the requirements.</p><p>This is why I believe hardware specifications should be derived from system requirements.</p><p>The same applies to the operating system.</p><p>Rather than choosing Windows or Linux first, we should evaluate factors such as hardware compatibility, software dependencies, security updates, remote maintenance, and long-term operational stability.</p><p>The hardware and operating system become part of the solution after we understand the problem.</p><h3>8. Cloud Architecture Should Follow the Same Principle</h3><p>The cloud side should be designed in the same way.</p><p>Suppose the only requirement is to monitor whether connected devices are operating normally.</p><p>A relatively simple architecture may be sufficient.</p><p>But if the system must also support historical data analysis, automated alerts, remote device management, or software deployment, additional services may be necessary.</p><p>We should not assume that every available cloud feature needs to be implemented from the beginning.</p><p>Instead, the architecture should reflect the services we actually intend to provide.</p><p>This approach has another advantage.</p><p>By starting with a smaller, clearly defined set of requirements, we can evaluate the system’s operational value before expanding its scope.</p><h3>9. Different Products May Need Different Architectures</h3><p>This is particularly important when working with multiple types of medical equipment.</p><p>It may seem efficient to standardize every product on the same Edge PC, communication method, and cloud configuration.</p><p>Standardization certainly has benefits.</p><p>It can simplify development, deployment, support, and maintenance.</p><p>However, different products may have very different requirements.</p><p>For example:</p><p><strong>A large medical imaging system</strong> may benefit from detailed diagnostic information and remote troubleshooting capabilities.</p><p><strong>A dialysis system</strong> may require different monitoring priorities related to equipment condition, maintenance, and operational continuity.</p><p><strong>A laboratory analyzer</strong> may primarily benefit from fault reporting, consumable monitoring, and maintenance information.</p><p>Some products may need frequent communication.</p><p>Others may only need periodic data uploads or event-driven reporting.</p><p>Using the exact same architecture for every product could result in unnecessary cost or insufficient functionality.</p><p>A more practical approach is to standardize common components where it makes sense while allowing product-specific requirements to influence the final configuration.</p><p><strong>Standardization is valuable, but it should not override the actual needs of the product.</strong></p><h3>10. More Features Do Not Necessarily Mean a Better System</h3><p>System development often moves toward adding capabilities.</p><p>More data collection.</p><p>More frequent communication.</p><p>More powerful hardware.</p><p>More cloud services.</p><p>But each additional component introduces costs and responsibilities.</p><p>It must be configured, secured, monitored, maintained, and updated.</p><p>It may also become another potential point of failure.</p><p>For systems expected to operate continuously in hospitals or other demanding environments, this matters.</p><p>A technically sophisticated solution that requires constant intervention may be less valuable than a simpler system that can operate reliably for years.</p><p>The goal should be to build a system that is:</p><ul><li>Capable of meeting its requirements</li><li>Reliable in its actual operating environment</li><li>Practical to maintain</li><li>Reasonable in cost</li><li>Scalable across deployment sites</li></ul><p>In other words, we should aim for an architecture that is sufficient for the purpose, rather than maximizing technical capabilities.</p><h3>11. A Working Prototype Is Not Enough</h3><p>Once an architecture has been selected, the next step is usually to build a prototype.</p><p>Technical testing is essential.</p><p>We need to confirm that the system can communicate with devices, collect data, transmit information to the cloud, and recover from communication failures.</p><p>But technical feasibility is only part of the evaluation.</p><p>We should also ask:</p><p>Does this system actually reduce the workload of the support team?</p><p>Are we collecting the information needed for troubleshooting?</p><p>Can the solution be deployed and maintained in the target environment?</p><p>Is the installation process too complicated?</p><p>Does the system deliver enough operational value to justify its cost?</p><p>For example, a remote monitoring prototype might successfully collect hundreds of operating parameters from a medical device.</p><p>Technically, that is an achievement.</p><p>But if the support team still cannot determine the likely cause of a failure without visiting the site, have we really achieved our objective?</p><p>Perhaps the system is collecting a large amount of data but missing the information that matters.</p><p>This is why I believe prototypes should evaluate two things:</p><p><strong>Technical Feasibility and Operational Value.</strong></p><p>A successful connection to the cloud does not, by itself, prove that the system is useful.</p><h3>12. Choose Technology as a Response to Requirements</h3><p>Take Azure IoT Edge as an example.</p><p>It would be easy to approach the project by saying:</p><p>“We can use Azure IoT Edge, so let’s build the system around it.”</p><p>But that reverses the decision process.</p><p>A better starting point would be to identify requirements such as:</p><ul><li>Retaining data during network outages</li><li>Converting communication protocols</li><li>Performing local processing</li><li>Managing Edge workloads remotely</li></ul><p>If Azure IoT Edge is a suitable solution for those requirements, then we have a clear reason to select it.</p><p>The same applies to LTE connectivity.</p><p>Instead of choosing LTE simply because it is available, we might begin with a requirement to reduce dependence on hospital networks.</p><p>We could then evaluate whether an independent cellular connection would be appropriate, taking into account coverage, operating cost, security, and deployment conditions.</p><p>In both examples, the technology is selected to solve a defined problem.</p><p>It is not the starting point of the design.</p><h3>13. Looking Back at My Previous Edge and Cloud Work</h3><p>Over the course of this series, I have written about a number of technical topics, including:</p><ul><li>Edge PC freeze prevention</li><li>Driver and operating system management</li><li>Firewall configuration</li><li>AMQP over WebSocket</li><li>Store-and-forward mechanisms</li><li>Migration from Windows to Linux</li><li>Azure IoT Edge version management</li><li>Communication monitoring</li><li>Data retransmission between medical equipment and Edge PCs</li></ul><p>At first glance, these may appear to be separate engineering problems.</p><p>However, they share a common purpose.</p><p>We want equipment to operate reliably in the field.</p><p>We want to avoid losing important data.</p><p>We want systems to work across different hospital network environments.</p><p>We want to reduce troubleshooting effort and make remote support more effective.</p><p>And we want to maintain security without making the system unnecessarily difficult to operate.</p><p>For example, I did not investigate AMQP over WebSocket simply because it was a different communication protocol.</p><p>The underlying problem was that some hospital networks restricted the ports required by the original communication method.</p><p>Similarly, the purpose of store-and-forward was not simply to add a local storage feature.</p><p>It was to retain data when the cloud connection was unavailable and transmit it after connectivity was restored.</p><p>These examples helped reinforce an important lesson for me:</p><p><strong>The objective was never to add technology. It was to solve operational problems using the appropriate technology.</strong></p><h3>14. Changing the Starting Point of System Design</h3><p>A technology-first approach often follows this sequence:</p><p><strong>Technology → Possible Applications → System Design</strong></p><p>We select a platform and then look for ways to use it.</p><p>The approach I have discussed in this article works in the opposite direction:</p><p><strong>Field Problems → Customer Value → Required Data → System Requirements → Technology</strong></p><p>The difference may look small on paper.</p><p>But it changes the discussions we have during system development.</p><p>Instead of asking, “Which cloud service should we use?” we first ask, “What information would help the support team solve problems faster?”</p><p>Instead of asking, “What specifications should the Edge PC have?” we first ask, “What processing and storage functions are actually required at the installation site?”</p><p>And instead of asking, “How much data can we collect?” we ask, “Which data will help us make better decisions?”</p><p>These questions are much more closely connected to the purpose of the system.</p><h3>15. Final Thoughts</h3><p>When designing an IoT or Edge system, we do not have to begin by selecting an Edge PC, cloud platform, network technology, or communication protocol.</p><p>We can begin with a much simpler question:</p><p><strong>Whose problem are we trying to solve, and what value do we want to deliver?</strong></p><p>From there, we can determine the necessary information, communication requirements, security controls, hardware capabilities, and cloud services.</p><p>We can then use prototypes to evaluate not only whether the system works, but whether it actually provides the intended value.</p><p>Throughout this series, I have focused on detailed technical measures for improving the reliability and security of medical Edge and cloud environments.</p><p>But stepping back from those individual topics, I believe the most important principle is this:</p><p><strong>Technology is not the goal. Solving real problems in the field is the goal.</strong></p><p>Customer Value → System Design → Technology</p><p>Following this sequence may help us avoid unnecessary complexity and build systems that are easier to deploy, support, and maintain over the long term.</p><p>For medical equipment expected to operate reliably across different countries, hospitals, and network environments, I think this perspective is especially important.</p><h3>Going Further: A Practical Framework for Remote Monitoring Design</h3><p>In this article, I introduced the basic approach of designing IoT and Edge systems by starting with customer value rather than technology.</p><p>However, applying this approach in real projects requires more detailed consideration.</p><p>Different types of medical equipment have different requirements and priorities. System architectures also need to be evaluated in terms of security, cost, reliability, and operational complexity.</p><p>I am currently organizing my experience with medical device connectivity into a more structured framework for remote monitoring system design.</p><p>The goal is to connect customer value with practical system requirements and architectural decisions, using real-world experience and medical equipment examples.</p><p>I hope to share more about this framework in future articles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b31a193d7981" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#16. Edge / Cloud Reliability Ultimately Comes Back to Customer Value]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/16-edge-cloud-reliability-ultimately-comes-back-to-customer-value-ba9a814b1641?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba9a814b1641</guid>
            <category><![CDATA[remote-monitoring]]></category>
            <category><![CDATA[medical-devices]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 00:05:43 GMT</pubDate>
            <atom:updated>2026-10-06T00:06:06.112Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>I have been working on improving <strong>security and reliability in edge / cloud environments for medical devices</strong>.</p><p>In previous articles, I have covered topics such as:</p><ul><li>Preventing Edge PC freezes</li><li>Reviewing driver and software configurations</li><li>Firewall design</li><li>Moving to AMQP over WebSocket</li><li>Store-and-Forward during cloud outages</li><li>Migrating from Windows to Linux</li><li>Pinning Azure IoT Edge versions</li><li>Distributing maintenance tasks</li><li>Monitoring communication failures</li><li>Retry design between the Modality and Edge PC</li></ul><p>So far, most of the discussion has focused on an engineering question:</p><blockquote><strong><em>How can we keep systems running reliably in the field?</em></strong></blockquote><p>But if we take one step back, concepts such as:</p><pre>Reliability<br>Security<br>Monitoring<br>Remote Support</pre><p>are not merely technical features.</p><p>Ultimately, they lead to outcomes such as:</p><pre>Reducing downtime</pre><pre>Reducing onsite support</pre><pre>Reducing support workload</pre><pre>Helping customers use the product with confidence</pre><pre>Improving product quality</pre><p>In this article, I want to look back at the technical measures discussed so far from another perspective:</p><p><strong>customer value and service.</strong></p><h3>1. Technology Itself Is Not Customer Value</h3><p>Suppose the connection to the cloud is interrupted and we design a system that works like this:</p><pre>Detect communication failure<br>↓<br>Store data on the Edge<br>↓<br>Connection recovers<br>↓<br>Resend the data<br>↓<br>Confirm that the backlog is cleared</pre><p>From an engineering perspective, this is:</p><blockquote><strong><em>a reliability mechanism designed to prevent data loss.</em></strong></blockquote><p>But from the customer’s perspective, the experience is different:</p><pre>A network failure occurs<br>↓<br>Data temporarily cannot be sent to the Cloud<br>↓<br>The data is not lost<br>↓<br>It is transmitted automatically after recovery</pre><p>For the customer, the important point is not the technical phrase:</p><pre>Store-and-Forward is implemented</pre><p>What matters more is:</p><blockquote><strong><em>Even when a communication failure occurs, the impact on their operation can be minimized.</em></strong></blockquote><h3>2. Reducing Freezes Also Improves Service Quality</h3><p>To address Edge PC freezes, I have worked on measures such as:</p><pre>Reducing unnecessary drivers</pre><pre>Isolating GPU driver issues</pre><pre>Disabling unnecessary devices</pre><pre>Changing the operating system</pre><pre>Managing software versions</pre><pre>Distributing maintenance tasks</pre><p>If we look only at the PC itself, these are:</p><blockquote><strong><em>technical improvements intended to increase system stability.</em></strong></blockquote><p>But in the field, when an Edge PC stops, the impact can extend much further:</p><pre>Edge PC stops<br>↓<br>Data transmission stops<br>↓<br>Customer notices an abnormal condition<br>↓<br>Support inquiry<br>↓<br>Status confirmation<br>↓<br>Root-cause investigation<br>↓<br>Onsite support if necessary</pre><p>A single failure may involve many people:</p><pre>Customer</pre><pre>Distributor</pre><pre>Sales organization</pre><pre>Support team</pre><pre>Engineering team</pre><p>Therefore, reducing freezes can also lead to:</p><pre>Less downtime</pre><pre>Fewer support inquiries</pre><pre>Less troubleshooting time</pre><pre>Fewer onsite visits</pre><pre>Lower support costs</pre><p>In other words:</p><blockquote><strong><em>Stable operation itself is part of service quality.</em></strong></blockquote><h3>3. “It Can Connect” Is Not Enough</h3><p>When designing cloud connectivity, it is easy to focus first on a simple question:</p><pre>Can the device connect to the Cloud?</pre><p>In real-world operation, however, that is not enough.</p><p>For example:</p><pre>Network policies differ between facilities</pre><pre>Specific ports may be blocked</pre><pre>Internet connection methods differ</pre><pre>Network changes may require significant time and coordination</pre><p>In a previous article, I changed the communication method from:</p><pre>AMQP<br>↓<br>AMQP over WebSocket</pre><p>The purpose was not simply to change the protocol.</p><p>The real goal was:</p><blockquote><strong><em>to absorb as much variation as possible between different facility network environments.</em></strong></blockquote><p>Technically, this is a protocol-level change.</p><p>From a business perspective, however, it can create value by:</p><pre>Reducing network coordination during installation</pre><pre>Reducing differences between customer environments</pre><pre>Making deployment easier</pre><h3>4. Network Design Also Requires Balance</h3><p>There is more than one way to connect a device to the cloud.</p><p>For example:</p><pre>Use the facility network</pre><pre>Use an independent mobile network</pre><pre>Combine connectivity with VPN technologies</pre><p>The answer is not always:</p><blockquote><strong><em>maximize the security level at any cost.</em></strong></blockquote><p>If we increase security by introducing a highly complex architecture, we may also increase:</p><pre>Deployment cost</pre><pre>Network construction effort</pre><pre>Maintenance</pre><pre>Coordination with the customer facility</pre><pre>Operational overhead</pre><p>On the other hand, if cost is minimized too aggressively, the system may fail to meet the required levels of security or reliability.</p><p>In practice, we therefore need to consider several factors together:</p><pre>Security</pre><pre>Reliability</pre><pre>Cost</pre><pre>Ease of deployment</pre><pre>Operability</pre><p>The important principle is:</p><blockquote><strong><em>The goal is not to choose the most advanced architecture. The goal is to choose the architecture that is appropriate for the value we need to deliver.</em></strong></blockquote><h3>5. Remote Monitoring Can Change the Support Model</h3><p>One of the major benefits of cloud connectivity is the ability to:</p><p><strong>understand the state of a device without physically visiting the site.</strong></p><p>For example, if we can remotely check:</p><pre>Operating status</pre><pre>Communication status</pre><pre>Error / Fault information</pre><pre>Software version</pre><p>we may be able to change the traditional support flow:</p><pre>Failure occurs<br>↓<br>Customer notices the problem<br>↓<br>Customer contacts support<br>↓<br>Support investigates the situation</pre><p>into something closer to:</p><pre>Abnormal condition is detected<br>↓<br>Status is checked remotely<br>↓<br>Action is taken if necessary</pre><p>This represents a shift from:</p><blockquote><strong><em>Reactive Support to Proactive Support.</em></strong></blockquote><h3>6. Avoiding an Onsite Visit Can Create Significant Value</h3><p>If a device can be inspected remotely, not every problem needs to result in an onsite visit.</p><p>For example, remote monitoring may allow us to determine whether:</p><pre>The network connection is down</pre><pre>The application is still running normally</pre><pre>The device itself has stopped</pre><pre>Only the Cloud connection is failing</pre><p>This makes it possible to decide in advance whether an onsite visit is actually necessary.</p><p>As the number of deployed devices grows, even:</p><pre>30 minutes saved per device</pre><p>can become a significant operational improvement across the entire installed base.</p><p>Therefore:</p><blockquote><strong><em>Remote Monitoring is not only a technical capability. It is also a mechanism for improving support efficiency.</em></strong></blockquote><h3>7. Collected Data Can Be Used for More Than Troubleshooting</h3><p>The data sent to the cloud is not useful only for determining whether:</p><pre>The device is currently healthy</pre><p>For example, continuously collecting information such as:</p><pre>Operating hours</pre><pre>Fault information</pre><pre>Software version</pre><pre>Communication status</pre><pre>Consumable status</pre><p>can eventually support:</p><pre>Failure trend analysis</pre><pre>Maintenance timing decisions</pre><pre>Comparisons between software versions</pre><pre>Product improvement</pre><p>In other words, the data collected through:</p><pre>Remote Monitoring</pre><p>does not have to stop at:</p><pre>Support</pre><p>It can also feed back into:</p><pre>Service</pre><pre>Product Development</pre><pre>Quality Improvement</pre><h3>8. Turning Field Data Into Product Improvement</h3><p>How a device is actually used in the field, and under what conditions problems occur, cannot always be understood from the development environment alone.</p><p>For example:</p><pre>Faults increase under certain conditions</pre><pre>A particular software version causes more incidents</pre><pre>A certain component requires replacement more frequently after a specific period of use</pre><p>If this information can be collected continuously, we can create a feedback loop:</p><pre>Field Data<br>↓<br>Analysis<br>↓<br>Root-cause investigation<br>↓<br>Improvement<br>↓<br>Feedback into the next product</pre><p>Cloud connectivity is therefore:</p><blockquote><strong><em>not simply a way to connect a device to the Internet.</em></strong></blockquote><p>It can also become a mechanism for bringing what happens in the field back into:</p><p><strong>future product improvement.</strong></p><h3>9. Converting Technical Measures Into Customer Value</h3><p>The measures discussed throughout this series can be summarized as follows:</p><p>Technical MeasureEngineering PurposeCustomer ValueFreeze preventionImprove device stabilityReduce downtimeDriver minimizationReduce potential failure factorsImprove long-term stabilityVersion managementReduce change riskPrevent unexpected failuresStore-and-ForwardPrevent data lossPreserve data during connectivity outagesCommunication monitoringDetect failuresIdentify problems earlierFirewall designReduce unnecessary communicationImprove securitySecure communicationsProtect dataEnable safer remote connectivityNetwork architecture reviewImprove connectivityReduce deployment coordinationModality-side retryImprove end-to-end reliabilityReduce missing dataRemote MonitoringUnderstand device statusImprove support efficiency</p><p>Each item is a different technical topic.</p><p>But ultimately, they all contribute to customer-facing outcomes:</p><pre>The system keeps running</pre><pre>Data is not lost</pre><pre>Problems are detected earlier</pre><pre>Onsite work is reduced</pre><pre>Connectivity remains secure</pre><h3>10. It Is No Longer Only About Selling a Device</h3><p>Once Remote Monitoring and cloud connectivity become available, the way a product is delivered can also change.</p><p>A traditional model may look like this:</p><pre>Sell a Device<br>↓<br>Provide Support when a problem occurs</pre><p>With cloud connectivity, however, it becomes possible to build an ongoing relationship around:</p><pre>Device<br>+<br>Remote Monitoring<br>+<br>Maintenance<br>+<br>Support</pre><p>This means:</p><blockquote><strong><em>The value is not in introducing the Cloud itself. The important question is what kind of service becomes possible because of the Cloud.</em></strong></blockquote><h3>11. Engineering and Marketing Are Not Completely Separate</h3><p>In engineering, we think about topics such as:</p><pre>Kernel</pre><pre>Driver</pre><pre>Protocol</pre><pre>Firewall</pre><pre>TLS</pre><pre>IoT Hub</pre><pre>Store-and-Forward</pre><p>Customers, however, are usually thinking about different questions:</p><pre>Will it keep running?</pre><pre>Will my data be preserved?</pre><pre>Is it secure?</pre><pre>If something goes wrong, can it be resolved quickly?</pre><p>So we need to translate technology through several layers:</p><pre>Technology<br>↓<br>Function<br>↓<br>Benefit<br>↓<br>Customer Value</pre><p>For example, consider:</p><pre>Store-and-Forward</pre><p>That technology provides the function:</p><pre>Data can be retained during a communication outage</pre><p>which creates the benefit:</p><pre>Data is not lost when the network temporarily fails</pre><p>and ultimately creates customer value:</p><pre>The operational impact of communication failures can be reduced</pre><h3>Conclusion</h3><p>Throughout this series, I have looked individually at:</p><pre>Edge PC</pre><pre>OS</pre><pre>Driver</pre><pre>Network</pre><pre>Cloud</pre><pre>Security</pre><pre>Monitoring</pre><p>But the ultimate goal is not:</p><blockquote><strong><em>to introduce technology for its own sake.</em></strong></blockquote><p>The purpose of technology is to create outcomes such as:</p><pre>Reliable operation</pre><pre>No unnecessary data loss</pre><pre>Faster response to failures</pre><pre>Fewer onsite interventions</pre><pre>Safer operation</pre><p>In that sense:</p><blockquote><strong><em>Reliability, Security, and Monitoring are not only engineering concerns. They are tools for creating customer value.</em></strong></blockquote><h3>Next: Designing Systems From Customer Value, Not From Technology</h3><p>So far, the system has been improved by asking how to make:</p><pre>Edge PC<br>Cloud<br>Network</pre><p>more stable and reliable.</p><p>But what if we were designing a completely new system from scratch?</p><p>Should we begin by deciding:</p><pre>Which Cloud should we use?</pre><pre>Which Edge PC should we use?</pre><pre>Which Network should we use?</pre><p>I do not think so.</p><p>Before making those decisions, I believe we first need to define:</p><blockquote><strong><em>Who are we creating value for, and what value are we trying to deliver?</em></strong></blockquote><p>In the next article, I will explore the idea of:</p><p><strong>designing an Edge / Cloud system backward from customer value, rather than starting with technology.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba9a814b1641" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#15. Designing for Modality-to-Edge Communication Failures: Retries, ACKs, and Data Integrity]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/15-designing-for-modality-to-edge-communication-failures-retries-acks-and-data-integrity-18a132f76f2f?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/18a132f76f2f</guid>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[medical-devices]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 23:13:29 GMT</pubDate>
            <atom:updated>2026-10-02T23:13:29.121Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>I have been working on improving <strong>security and reliability in medical edge/cloud environments</strong>.</p><p>Some of the main topics include:</p><ul><li>Recovery from power outages</li><li>Data retention during offline periods</li><li>Communication failure detection</li><li>Safe patch management</li><li>Long-term system stability</li></ul><p>In previous articles, I discussed <strong>Store-and-Forward</strong> for communication failures between the Edge PC and the cloud.</p><pre>Edge PC<br>↓<br>Cloud</pre><p>When the cloud connection is lost, the basic idea is:</p><pre>Store data locally on the Edge<br>↓<br>Wait for connectivity to recover<br>↓<br>Resend the data to the Cloud</pre><p>However, the actual system data flow starts one step earlier.</p><pre>Modality<br>↓<br>Edge PC<br>↓<br>Cloud</pre><p>This means:</p><blockquote><strong><em>Designing reliability only for Edge PC → Cloud is not enough if data can already be lost between the Modality and the Edge PC.</em></strong></blockquote><p>In this article, I will focus on the communication path that comes before the cloud:</p><p><strong>Modality → Edge PC</strong></p><h3>1. The Actual Data Flow</h3><p>At a high level, the system looks like this:</p><pre>Modality<br>↓<br>TCP<br>↓<br>Edge PC<br>  TCPServer<br>  ↓<br>  RelayConversion<br>  ↓<br>  SendAzure<br>  ↓<br>  edgeHub<br>↓<br>Azure IoT Hub</pre><p>Communication from the Modality to the Edge PC uses <strong>TCP port 57545</strong>.</p><p>Even if the cloud side is operating normally, data cannot enter the Edge PC if communication fails at this first entry point.</p><p>So reliability must be considered from the beginning of the data path, not only from the Edge PC onward.</p><h3>2. TCP Does Not Automatically Guarantee End-to-End Data Delivery</h3><p>TCP provides several reliability mechanisms, including:</p><ul><li>ACKs</li><li>Retransmission</li><li>Ordered delivery</li><li>Flow control</li></ul><p>Compared with UDP, TCP provides a much more reliable transport mechanism.</p><p>However:</p><blockquote><strong><em>Using TCP does not mean that the entire application-level data flow is automatically protected against loss.</em></strong></blockquote><p>For example:</p><pre>Modality<br>↓<br>Attempt to connect to Edge PC<br>↓<br>Network failure<br>↓<br>TCP connection cannot be established</pre><p>In this case, the application cannot send the data in the first place.</p><p>Another important point is that a <strong>TCP ACK and an application-level ACK are not the same thing</strong>.</p><p>A TCP ACK essentially confirms that TCP-level data was received.</p><p>It does not necessarily mean that:</p><pre>The application received the data successfully</pre><pre>The data was stored</pre><pre>The downstream processing completed successfully</pre><p>Therefore, depending on the system requirements, an application-level acknowledgment may also be necessary.</p><p>For example:</p><pre>Send data<br>↓<br>Receive application response / ACK<br>↓<br>Mark transmission as complete</pre><p>The key question is not only:</p><blockquote><em>Did the TCP packet arrive?</em></blockquote><p>but also:</p><blockquote><em>Did the receiving application successfully accept and process the data?</em></blockquote><h3>3. Sometimes the Packet Arrives, but the Connection Still Fails</h3><p>During one network troubleshooting case, packet capture showed that the following traffic successfully reached the Edge PC:</p><pre>Modality<br>↓<br>SYN<br>↓<br>Edge PC</pre><p>The Docker container on the Edge PC also generated:</p><pre>SYN / ACK</pre><p>At first glance, this looked correct.</p><p>However, there was a routing problem on the Edge PC.</p><p>The response traffic was being routed toward a different network interface instead of being sent back through the network connected to the Modality.</p><p>The result was effectively:</p><pre>Modality → Edge PC</pre><p>working correctly, while:</p><pre>Edge PC → Modality</pre><p>was not.</p><p>Because the return path was incorrect, the TCP connection could not be established.</p><p>This is an important distinction:</p><blockquote><strong><em>An application running correctly does not necessarily mean that the communication path is working correctly.</em></strong></blockquote><p>In an unattended edge environment, routing problems, interface issues, and temporary network failures must also be treated as expected failure scenarios.</p><h3>4. The Modality Also Needs Data Retention and Retry Logic</h3><p>The ideal design should not assume only the successful path:</p><pre>Modality<br>↓<br>Send data to Edge PC<br>↓<br>Receive successful response<br>↓<br>Transmission complete</pre><p>Instead, the system should also support failure scenarios.</p><p>For example:</p><pre>Modality<br>↓<br>Attempt to send data<br>↓<br>Connection failure / No response<br>↓<br>Retain the data locally<br>↓<br>Retry after a defined interval<br>↓<br>Connectivity recovers<br>↓<br>Transmission completes</pre><p>The important principle is:</p><blockquote><strong><em>Do not discard data simply because the first transmission attempt failed.</em></strong></blockquote><p>Even if the Edge PC implements perfect Store-and-Forward toward the cloud, it cannot recover data that never reached the Edge PC.</p><p>Therefore, reliability should start at the device that originally generates the data.</p><h3>5. “No Response” Should Not Immediately Stop the System</h3><p>In a 24/365 unattended environment, temporary network failures are inevitable.</p><p>If every temporary failure results in:</p><pre>No response<br>↓<br>ERROR<br>↓<br>Processing stops<br>↓<br>Operator intervention required</pre><p>then long-term unattended operation becomes difficult.</p><p>A more resilient design could look like this:</p><pre>Send data<br>↓<br>Wait for response<br>↓<br>Timeout<br>↓<br>Retain data<br>↓<br>Retry later</pre><p>The system should distinguish between a temporary communication failure and a persistent failure that actually requires operator intervention.</p><p>For example:</p><pre>Short communication failure<br>→ Automatic retry</pre><pre>Failure continues for a defined period<br>→ Warning / Notification</pre><pre>Failure continues for a long period<br>→ Notify the operator</pre><p>At the same time, retrying forever is also problematic.</p><p>Infinite retries can hide a serious failure and allow queued data to grow without control.</p><p>So retry behavior should normally include:</p><ul><li>Retry intervals</li><li>Retry limits or escalation thresholds</li><li>Queue capacity monitoring</li><li>Warning conditions</li><li>Operator notifications</li></ul><p>The goal is not to remove errors completely.</p><p>The goal is to prevent temporary errors from unnecessarily stopping the entire system.</p><h3>6. Retries Introduce Another Problem: Duplicates</h3><p>Once retries are implemented, another failure scenario appears.</p><p>Consider this case:</p><pre>Edge PC successfully receives the data<br>↓<br>The response to the Modality is lost<br>↓<br>Modality assumes transmission failed<br>↓<br>Modality sends the same data again</pre><p>Now the Edge PC may receive the same data twice.</p><p>This means that retry logic must be designed together with duplicate handling.</p><p>Possible identifiers include:</p><pre>Message ID</pre><pre>Sequence Number</pre><pre>Timestamp</pre><p>The important design principle is:</p><blockquote><strong><em>A retry should not cause the same logical data to be processed twice.</em></strong></blockquote><p>In distributed systems, this is closely related to the concept of <strong>idempotency</strong>.</p><p>Instead of trying to guarantee that a message can only ever be transmitted once, it is often more realistic to design the receiving side so that receiving the same message again does not cause incorrect processing.</p><p>For example:</p><pre>Message ID = 10025<br>↓<br>First reception<br>↓<br>Process and record Message ID<br>↓<br>Same Message ID arrives again<br>↓<br>Detect duplicate<br>↓<br>Do not process it again</pre><p>This becomes especially important when the system is designed to survive intermittent network failures automatically.</p><h3>7. Reliability Must Cover the Entire Data Path</h3><p>If we look only at cloud connectivity, Store-and-Forward on the Edge PC may appear sufficient.</p><pre>Edge PC<br>↓<br>Cloud</pre><p>But the actual system data path is:</p><pre>Modality<br>↓<br>Edge PC<br>↓<br>Cloud</pre><p>Every segment can fail.</p><p>Therefore, the overall design needs to consider things such as:</p><pre>Retain data on the Modality when transmission fails</pre><pre>Retry transmission after connectivity recovers</pre><pre>Use ACKs / responses appropriately</pre><pre>Do not stop processing because of temporary network failures</pre><pre>Escalate only persistent failures to the operator</pre><pre>Handle duplicate data caused by retries</pre><p>The objective is not to create a network that never fails.</p><p>That is unrealistic.</p><p>Instead:</p><blockquote><strong><em>Design the system so that communication failures do not cause data loss, and processing can continue automatically after connectivity is restored.</em></strong></blockquote><p>This principle should not begin at the Edge PC.</p><p>It should begin at the <strong>Modality that generates the data</strong>.</p><h3>Next: Looking at These Technical Measures from the Perspective of Customer Value</h3><p>So far in this series, I have mainly discussed technical mechanisms for reliable operation, including:</p><pre>Edge PC stability</pre><pre>Communication failure detection</pre><pre>Data retention and retransmission</pre><pre>Secure cloud connectivity</pre><pre>Reliability between Modality and Edge PC</pre><pre>Remote Monitoring</pre><p>Individually, these may look like engineering measures designed simply to reduce failures.</p><p>But when we look at actual operations, the impact goes further.</p><pre>Fewer failures<br>↓<br>Fewer on-site service visits<br>↓<br>Lower maintenance workload<br>↓<br>Less downtime<br>↓<br>Greater confidence for the customer</pre><p>Remote Monitoring can also provide information such as:</p><pre>Operating status</pre><pre>Fault information</pre><pre>Software information</pre><pre>Consumable status</pre><p>This can support not only troubleshooting, but also:</p><ul><li>Preventive maintenance</li><li>Remote support</li><li>Maintenance proposals</li><li>Product improvement</li></ul><p>In other words, the <strong>Reliability, Security, and Monitoring</strong> architecture discussed throughout this series is not only an engineering topic.</p><p>Ultimately, it affects:</p><pre>Customer value</pre><pre>Support cost</pre><pre>Service operations</pre><pre>Product quality</pre><p>In the next article, I will step back from the technical implementation and look at these Edge / Cloud design decisions from the perspectives of <strong>customer value, service, and business impact</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18a132f76f2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#14. How Long Can Your Edge System Survive a Cloud Outage?]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/14-how-long-can-your-edge-system-survive-a-cloud-outage-f9e08904204c?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9e08904204c</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[azure-iot-hub]]></category>
            <category><![CDATA[azure-iot-edge]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 10:40:34 GMT</pubDate>
            <atom:updated>2026-10-01T10:40:34.112Z</atom:updated>
            <content:encoded><![CDATA[<h3>Designing and Testing Store-and-Forward for 24/7/365 Edge Operations</h3><p>I work on improving the security and reliability of edge/cloud systems for medical environments.</p><p>Some of the main topics I focus on are:</p><ul><li>recovery from power failures</li><li>retaining data while offline</li><li>detecting communication failures</li><li>applying patches safely</li><li>maintaining stable long-term operation</li></ul><p>In an earlier article, I wrote about <strong>Store-and-Forward in Azure IoT Edge</strong>.</p><p>The basic idea was simple:</p><pre>Cloud Available<br>↓<br>Send data normally</pre><pre>Cloud Disconnected<br>↓<br>edgeHub stores unsent messages</pre><pre>Cloud Restored<br>↓<br>Stored messages are resent</pre><p>I also discussed several important elements:</p><pre>timeToLiveSecs</pre><pre>Disk Capacity</pre><pre>Persistent Storage</pre><pre>Restart</pre><p>But for a system expected to operate unattended <strong>24/7/365</strong>, simply enabling Store-and-Forward is not enough.</p><p>We need to answer questions such as:</p><pre>If cloud communication is unavailable for 6 hours,<br>can the Edge PC really retain 6 hours of data?</pre><p>And after communication returns:</p><pre>How long does it take<br>to resend all accumulated data?</pre><p>This article looks at Store-and-Forward from an operational perspective.</p><p>The key topics are:</p><pre>Storage capacity</pre><pre>Maximum retention time</pre><pre>Disk monitoring</pre><pre>Backlog</pre><pre>Recovery time</pre><pre>Missing-data detection</pre><pre>Duplicate detection</pre><pre>Restart and reboot testing</pre><p>The goal is not merely to confirm that:</p><blockquote><em>Store-and-Forward is enabled.</em></blockquote><p>The goal is to prove that:</p><blockquote><strong><em>The system can survive the expected outage duration without losing data, and can return to a normal state afterward.</em></strong></blockquote><h3>1. Do Not Treat Store-and-Forward as a Simple ON/OFF Feature</h3><p>Azure IoT Edge edgeHub can store Device-to-Cloud messages locally when they cannot be sent to IoT Hub.</p><p>After connectivity is restored, the stored messages can be forwarded to the cloud.</p><p>So we could describe the feature simply as:</p><pre>Store-and-Forward<br>=<br>ON</pre><p>But this does not mean:</p><pre>Any cloud outage<br>can be survived without data loss</pre><p>In production, we need to answer at least four questions:</p><pre>1. How long are messages allowed to remain stored?</pre><pre>2. Is there enough disk capacity for that duration?</pre><pre>3. Does the data survive a restart?</pre><pre>4. Can the system process the backlog after connectivity returns?</pre><p>That is where Store-and-Forward becomes an <strong>operational design problem</strong>, rather than just a configuration setting.</p><h3>2. Start With the Question: How Long Must the System Survive?</h3><p>The first design decision should not be disk size.</p><p>It should be:</p><blockquote><strong><em>How long should the system be able to continue retaining data during a cloud outage?</em></strong></blockquote><p>For example:</p><pre>5 minutes</pre><pre>30 minutes</pre><pre>2 hours</pre><pre>6 hours</pre><pre>24 hours</pre><pre>72 hours</pre><p>These requirements result in very different storage and recovery designs.</p><p>Suppose the operational requirement is:</p><pre>Retain all data<br>during a cloud outage of up to 24 hours</pre><p>Then the Edge PC must be able to retain at least:</p><pre>24 hours of data</pre><p>But designing for exactly 24 hours leaves very little margin.</p><p>A more practical approach is:</p><pre>Maximum Expected Outage</pre><pre>+</pre><pre>Safety Margin</pre><p>The required buffer should be based on an operational failure scenario, not on whatever free disk space happens to be available.</p><h3>3. Retention Time Depends on Data Volume and Disk Capacity</h3><p>The basic calculation is straightforward.</p><p>Suppose the system generates:</p><pre>50 MB / hour</pre><p>If cloud communication is unavailable for:</p><pre>10 hours</pre><p>then approximately:</p><pre>50 MB × 10 hours</pre><pre>=</pre><pre>500 MB</pre><p>must be stored.</p><p>For 24 hours:</p><pre>50 MB × 24 hours</pre><pre>=</pre><pre>1.2 GB</pre><p>So a simple first estimate is:</p><pre>Required Storage</pre><pre>=</pre><pre>Data Generated per Hour</pre><pre>×</pre><pre>Expected Cloud Outage Duration</pre><p>This is only a starting point, but it gives us a measurable design requirement.</p><h3>4. We Can Also Calculate “How Many Hours Are Left?”</h3><p>The same calculation can be reversed.</p><p>Suppose the storage area that can safely be used for Store-and-Forward is:</p><pre>5 GB</pre><p>and data grows at:</p><pre>50 MB / hour</pre><p>The theoretical retention time is:</p><pre>5000 MB<br>÷<br>50 MB/hour</pre><pre>=</pre><pre>100 hours</pre><p>So theoretically, the system could retain approximately:</p><pre>100 hours</pre><p>of data.</p><p>However, using 100% of available disk space is not a good operational design.</p><p>For example, if we decide that only:</p><pre>3.5 GB</pre><p>of the 5 GB should be considered safely usable:</p><pre>3500 MB<br>÷<br>50 MB/hour</pre><pre>=</pre><pre>approximately 70 hours</pre><p>This leads to a much more useful operational metric.</p><p>Instead of only asking:</p><pre>How many GB are free?</pre><p>we can ask:</p><blockquote><strong><em>At the current data growth rate, how many hours of buffering remain?</em></strong></blockquote><p>That is often much easier for operators to understand during an incident.</p><h3>5. Measure the Real Data Growth Rate</h3><p>The number used in the calculation should not be based only on assumptions.</p><p>For example:</p><pre>50 MB / hour</pre><p>should ideally come from actual measurements.</p><p>Run the real system and observe storage growth over periods such as:</p><pre>1 hour</pre><pre>3 hours</pre><pre>24 hours</pre><p>For example:</p><pre>Test Start<br>Disk Usage: 10.0 GB</pre><pre>1 Hour Later<br>Disk Usage: 10.12 GB</pre><p>The simple difference is approximately:</p><pre>120 MB / hour</pre><p>Of course, the same disk may also contain:</p><pre>OS Logs</pre><pre>Docker Logs</pre><pre>Application Logs</pre><pre>Temporary Files</pre><p>So for a more accurate calculation, it is better to monitor the storage area actually used by edgeHub.</p><h3>6. Monitor the edgeHub Storage Area, Not Only the Entire Disk</h3><p>The overall disk state can be checked with:</p><pre>df -h</pre><p>But this only tells us how much space is used on the filesystem.</p><p>It does not tell us:</p><pre>Which application<br>is consuming the space</pre><p>If edgeHub is configured with host-side persistent storage, the directory can also be monitored directly.</p><p>For example:</p><pre>sudo du -sh &lt;edgeHub-host-storage-path&gt;</pre><p>To check the mount configuration:</p><pre>docker inspect edgeHub</pre><p>This is important because production Store-and-Forward should not depend only on temporary storage inside a container.</p><p>If the container is recreated, persistent state needs to remain available.</p><h3>7. Disk Capacity Is Not the Only Limit — TTL Matters Too</h3><p>Another important parameter is:</p><pre>timeToLiveSecs</pre><p>In Azure IoT Edge Store-and-Forward, this controls how long messages are allowed to remain stored.</p><p>For example, if the TTL is:</p><pre>7200 seconds</pre><pre>=</pre><pre>2 hours</pre><p>then even if the disk has enough capacity for:</p><pre>100 hours of data</pre><p>the system is not designed to retain 100 hours.</p><p>The TTL would become the first limit.</p><h3>8. The Real Retention Limit Is the Smaller of TTL and Storage Capacity</h3><p>There are effectively two limits:</p><pre>Retention Time Allowed by TTL</pre><p>and:</p><pre>Retention Time Allowed by Disk Capacity</pre><p>The smaller value becomes the actual limit.</p><p>For example:</p><pre>TTL:<br>24 hours</pre><pre>Disk Capacity:<br>72 hours</pre><p>The practical retention limit is:</p><pre>24 hours</pre><p>because TTL is reached first.</p><p>On the other hand:</p><pre>TTL:<br>72 hours</pre><pre>Disk Capacity:<br>20 hours</pre><p>means that storage capacity becomes the limiting factor.</p><p>So we can think of the actual retention capability as:</p><pre>Actual Retention Time</pre><pre>=</pre><pre>min(<br>  TTL Limit,<br>  Storage Capacity Limit<br>)</pre><p>Both values must therefore be designed together.</p><h3>9. “Cloud Reconnected” Does Not Mean “System Recovered”</h3><p>Now consider what happens after the outage.</p><p>Suppose cloud communication is unavailable for six hours:</p><pre>02:00<br>Cloud Disconnected</pre><pre>08:00<br>Cloud Reconnected</pre><p>At 08:00, the connection to IoT Hub returns.</p><p>But the Edge PC may still contain:</p><pre>6 hours of unsent data</pre><p>So:</p><pre>Cloud Connected</pre><p>does not automatically mean:</p><pre>System Normal</pre><p>The connection may be restored while the system is still processing a large amount of stored data.</p><h3>10. After Recovery, There Is a Backlog</h3><p>I treat the data accumulated during the outage as a:</p><pre>Backlog</pre><p>Suppose the system normally generates:</p><pre>100 MB / hour</pre><p>and connectivity is unavailable for:</p><pre>6 hours</pre><p>Then:</p><pre>100 MB × 6 hours</pre><pre>=</pre><pre>600 MB</pre><p>of backlog has accumulated.</p><p>Once the cloud connection returns, those 600 MB must be sent.</p><p>But new data does not stop being generated.</p><p>The Edge PC now has to handle:</p><pre>Historical Data<br>600 MB</pre><pre>+</pre><pre>Newly Generated Data</pre><p>at the same time.</p><h3>11. If Transmission Capacity Equals the Normal Data Rate, the Queue Never Shrinks</h3><p>Assume the system generates:</p><pre>100 MB / hour</pre><p>during normal operation.</p><p>Now suppose that after cloud recovery, the maximum upload rate is also:</p><pre>100 MB / hour</pre><p>Then:</p><pre>New Data:<br>100 MB / hour</pre><pre>Upload Capacity:<br>100 MB / hour</pre><p>All available transmission capacity is consumed by newly generated data.</p><p>The existing:</p><pre>600 MB backlog</pre><p>does not decrease.</p><p>So during recovery, the system needs:</p><pre>Available Transmission Capacity</pre><pre>&gt;</pre><pre>New Data Generation Rate</pre><p>Otherwise, it can reconnect to the cloud without ever catching up.</p><h3>12. Calculate How Long It Takes to Catch Up</h3><p>Suppose:</p><pre>Normal Data Generation:<br>100 MB / hour</pre><p>and after reconnection the system can transmit:</p><pre>300 MB / hour</pre><p>Of that 300 MB/hour, approximately:</p><pre>100 MB / hour</pre><p>is needed for newly generated data.</p><p>That leaves:</p><pre>300</pre><pre>-</pre><pre>100</pre><pre>=</pre><pre>200 MB / hour</pre><p>for clearing the backlog.</p><p>If the six-hour outage created:</p><pre>600 MB</pre><p>of backlog:</p><pre>600 MB<br>÷<br>200 MB/hour</pre><pre>=</pre><pre>3 hours</pre><p>So the timeline becomes:</p><pre>08:00<br>Cloud Reconnected</pre><pre>↓</pre><pre>11:00<br>Backlog Cleared</pre><p>This is an important distinction:</p><blockquote><strong><em>“How long can the system remain offline?” and “How long does it take to catch up afterward?” are two different reliability metrics.</em></strong></blockquote><p>Both should be measured.</p><h3>13. Cloud Monitoring Should Have More Than One Recovery State</h3><p>In the previous article, I discussed detecting a communication failure from the cloud side.</p><p>A simplified failure flow could be:</p><pre>DeviceDisconnected<br>↓<br>Wait for a defined period<br>↓<br>Communication Failure</pre><p>Recovery can also be divided into multiple states.</p><p>Instead of:</p><pre>DeviceConnected<br>↓<br>Recovered</pre><p>we can think of the system like this:</p><pre>NORMAL<br>↓<br>CLOUD DISCONNECTED<br>↓<br>BUFFERING<br>↓<br>CLOUD RECONNECTED<br>↓<br>RESENDING<br>↓<br>BACKLOG CLEARED<br>↓<br>NORMAL</pre><p>For example:</p><pre>Cloud connection is restored</pre><pre>but</pre><pre>6 hours of data are still being resent</pre><p>In that situation, I would not yet consider the system fully normal.</p><p>This makes the operational state much more visible.</p><h3>14. Make It Possible to Verify Every Message</h3><p>During failure testing, one of the most important questions is:</p><pre>Did every message generated<br>during the outage eventually arrive?</pre><p>To answer that, messages should contain information that allows them to be compared later.</p><p>For example:</p><pre>Message ID</pre><pre>Sequence Number</pre><pre>Timestamp</pre><pre>Device ID</pre><p>Suppose data is generated with the following sequence:</p><pre>10001<br>10002<br>10003<br>10004<br>10005</pre><p>During the outage:</p><pre>10006<br>10007<br>10008<br>10009</pre><p>are generated.</p><p>After recovery, if the cloud contains:</p><pre>10001<br>10002<br>10003<br>10004<br>10005<br>10006<br>10007<br>10008<br>10009</pre><p>then there is no gap in the sequence.</p><p>This is much stronger evidence than simply confirming that “some data arrived after reconnecting.”</p><h3>15. Check for Duplicates as Well</h3><p>Missing data is not the only thing to test.</p><p>Duplicate messages must also be considered.</p><p>Azure IoT Edge message routing uses an <strong>at-least-once delivery model</strong>, so the system design should allow for the possibility of duplicates.</p><p>For example:</p><pre>10001<br>10002<br>10003<br>10003<br>10004</pre><p>contains a duplicate:</p><pre>10003</pre><p>The cloud side should therefore be able to use values such as:</p><pre>Message ID</pre><pre>Sequence Number</pre><p>to identify duplicates.</p><p>The important point is:</p><blockquote><strong><em>Do not test only whether data arrived. Test whether data is complete and whether duplicate messages exist.</em></strong></blockquote><h3>16. Test 1 — Short Cloud Disconnection</h3><p>Start with a simple scenario:</p><pre>Normal Communication<br>↓<br>Block Cloud Communication<br>↓<br>Generate Data for About 5 Minutes<br>↓<br>Restore Cloud Communication</pre><p>During the outage, confirm that:</p><pre>Application modules continue running</pre><pre>edgeHub continues running</pre><pre>Data is retained</pre><pre>Storage usage increases</pre><p>Then restore communication and verify that:</p><pre>Stored Data<br>↓<br>IoT Hub</pre><p>is successfully delivered.</p><p>This confirms the basic Store-and-Forward behavior.</p><h3>17. Test 2 — Longer Disconnections</h3><p>Next, gradually increase the outage duration.</p><p>For example:</p><pre>30 minutes</pre><pre>1 hour</pre><pre>3 hours</pre><pre>6 hours</pre><p>The goal is not simply to confirm that the system reconnects.</p><p>For every test, record:</p><pre>Disconnect Duration</pre><pre>Messages Generated</pre><pre>Storage Increase</pre><pre>Resend Time</pre><pre>Missing Messages</pre><pre>Duplicate Messages</pre><p>For example:</p><pre>Disconnect:<br>3 hours</pre><pre>Generated:<br>10,800 messages</pre><pre>Stored:<br>10,800 messages</pre><pre>Missing:<br>0</pre><pre>Duplicate:<br>0</pre><pre>Backlog Clear:<br>18 minutes</pre><p>This tells us far more than:</p><pre>Store-and-Forward works</pre><p>It gives us measurable evidence of how the system behaves during a real communication failure.</p><h3>18. Test 3 — Restart IoT Edge While the Cloud Is Still Disconnected</h3><p>Next, make the test more severe:</p><pre>Cloud Disconnected<br>↓<br>Data Accumulates<br>↓<br>Restart IoT Edge<br>↓<br>Cloud Still Disconnected<br>↓<br>Continue Generating Data<br>↓<br>Restore Cloud Communication</pre><p>The key question is:</p><blockquote><strong><em>Does the data stored before the restart still exist afterward?</em></strong></blockquote><p>If the design relies only on ephemeral storage inside a container, state may be lost when the container is recreated.</p><p>That is why persistent host-side storage becomes important in production.</p><p>Store-and-Forward should survive not only a network failure, but also realistic service restart scenarios.</p><h3>19. Test 4 — Reboot the Entire OS During the Outage</h3><p>The next test is closer to real operation:</p><pre>Cloud Disconnected<br>↓<br>Data Accumulates<br>↓<br>OS Reboot<br>↓<br>Ubuntu Starts<br>↓<br>IoT Edge Starts<br>↓<br>Cloud Still Disconnected<br>↓<br>Cloud Restored</pre><p>In my Edge PC design, OS and IoT Edge restarts are part of the operational strategy for unattended 24/7/365 environments.</p><p>Because of that, testing only:</p><pre>Communication Failure</pre><p>is not enough.</p><p>We should also test combinations such as:</p><pre>Communication Failure</pre><pre>+</pre><pre>Restart</pre><p>Failures rarely occur in perfectly isolated conditions.</p><h3>20. Test 5 — Observe the System Until It Fully Catches Up</h3><p>The final test is the recovery process itself.</p><p>Do not stop observing when:</p><pre>Cloud Restored</pre><p>appears.</p><p>Continue until:</p><pre>Cloud Restored<br>↓<br>Backlog Transmission Starts<br>↓<br>Queue Decreases<br>↓<br>Backlog Cleared<br>↓<br>Only Normal Traffic Remains</pre><p>Record at least:</p><pre>Reconnect Time</pre><pre>Backlog Clear Time</pre><p>The speed of recovery may depend on factors such as network performance and cloud-side latency.</p><p>So the recovery time should be measured under real or realistically simulated conditions.</p><h3>21. Monitor edgeHub Logs During the Test</h3><p>During the test, edgeHub logs are useful for understanding what is happening.</p><p>For example:</p><pre>iotedge logs edgeHub --since 30m</pre><p>To focus on communication and message-related events:</p><pre>iotedge logs edgeHub --since 30m 2&gt;&amp;1 | \<br>grep -Ei &#39;cloud|connect|disconnect|message|store|queue&#39;</pre><p>The overall module state can be checked with:</p><pre>iotedge list</pre><p>Disk status can be checked with:</p><pre>df -h</pre><p>During one failure test, I want visibility into all of the following:</p><pre>Network</pre><pre>edgeHub</pre><pre>Application</pre><pre>Messages</pre><pre>Storage</pre><pre>Cloud</pre><p>Looking at only one layer can hide important failure behavior.</p><h3>22. “20 Hours Remaining” Is More Useful Than “Disk Usage: 75%”</h3><p>Disk monitoring commonly uses thresholds such as:</p><pre>70%</pre><pre>80%</pre><pre>90%</pre><p>These thresholds are still useful.</p><p>But for Store-and-Forward, another metric can be even more operationally meaningful:</p><pre>Remaining Buffer Time</pre><p>For example:</p><pre>Disk Usage:<br>75%</pre><pre>Free Space Available for Store-and-Forward:<br>3 GB</pre><pre>Current Data Growth:<br>150 MB/hour</pre><p>Then:</p><pre>3000<br>÷<br>150</pre><pre>=</pre><pre>approximately 20 hours</pre><p>Instead of only reporting:</p><pre>Disk Usage: 75%</pre><p>we can report:</p><blockquote><strong><em>At the current data generation rate, approximately 20 hours of buffering remain.</em></strong></blockquote><p>During an actual incident, this directly tells the operator how much time is available before data retention becomes critical.</p><h3>23. Combine Cloud Monitoring, Edge Buffering, and External Monitoring</h3><p>This becomes more useful when combined with communication-failure monitoring.</p><p>For example:</p><pre>02:00<br>Cloud Disconnection Detected</pre><p>On the cloud side:</p><pre>Communication Failure</pre><p>is reported.</p><p>On the Edge side:</p><pre>Store-and-Forward Starts<br>↓<br>Data Accumulates</pre><p>And an external monitoring system can observe:</p><pre>Disk Usage</pre><pre>Data Growth Rate</pre><pre>Remaining Buffer Time</pre><p>The overall monitoring model becomes:</p><pre>Cloud<br>│<br>└─ Detects the communication failure<br></pre><pre>Edge<br>│<br>└─ Retains the data<br></pre><pre>External Monitor<br>│<br>└─ Monitors Edge health and storage</pre><p>Now the system is being observed from three different directions.</p><p>That is much stronger than simply waiting for the Edge PC to report its own failure.</p><h3>24. Think in Terms of “How Long Can We Survive?” Instead of Only “Did a Failure Occur?”</h3><p>Once these metrics are available, the way we look at an outage changes.</p><p>Instead of only seeing:</p><pre>Cloud communication failed</pre><p>we can see:</p><pre>Outage Started:<br>02:00</pre><pre>Current Time:<br>08:00</pre><pre>Elapsed:<br>6 hours</pre><pre>Estimated Retention Capacity:<br>24 hours</pre><pre>Remaining:<br>approximately 18 hours</pre><p>This makes it easier for operators to decide:</p><pre>Do we need immediate on-site action?</pre><pre>Can we wait for the network to recover?</pre><pre>Are we approaching the data-retention limit?</pre><p>The system is no longer only reporting a failure.</p><p>It is reporting <strong>how much resilience remains</strong>.</p><h3>Record Store-and-Forward Test Results as Numbers</h3><p>Finally, I want the results of the failure test to be recorded quantitatively.</p><p>For example:</p><pre>Cloud Disconnect Test</pre><pre>Disconnect Duration:<br>6 hours</pre><pre>Generated Messages:<br>21,600</pre><pre>Recovered Messages:<br>21,600</pre><pre>Missing:<br>0</pre><pre>Duplicate:<br>0</pre><pre>Storage Increase:<br>1.4 GB</pre><pre>Disk Remaining:<br>42 GB</pre><pre>Reconnect:<br>08:00</pre><pre>Backlog Cleared:<br>08:37</pre><pre>Recovery Time:<br>37 minutes</pre><p>This tells us much more than:</p><pre>Store-and-Forward: OK</pre><p>Instead, we can say:</p><blockquote><strong><em>The system survived a six-hour cloud outage without data loss, and cleared the backlog within 37 minutes after connectivity was restored.</em></strong></blockquote><p>That is a measurable system capability.</p><h3>Conclusion — Move From “Store-and-Forward Is Enabled” to “We Know How Long It Can Protect the Data”</h3><p>The basic Store-and-Forward flow is:</p><pre>Cloud Disconnected<br>↓<br>edgeHub<br>↓<br>Store-and-Forward<br>↓<br>Cloud Restored<br>↓<br>Resend</pre><p>But for unattended 24/7/365 operation, that alone is not enough.</p><p>We need to know:</p><pre>How many hours of data can be retained?</pre><pre>How much disk capacity is required?</pre><pre>Is the TTL long enough?</pre><pre>Does stored data survive a restart?</pre><pre>How long does it take to catch up after recovery?</pre><pre>Are any messages missing?</pre><pre>Are any messages duplicated?</pre><p>One point is particularly important:</p><pre>Cloud Reconnected</pre><pre>≠</pre><pre>Fully Recovered</pre><p>After connectivity returns, the system may still be:</p><pre>Stored Data<br>↓<br>Resending<br>↓<br>Backlog Clearing</pre><p>Only after the backlog has been cleared should the system be considered fully recovered.</p><p>The same idea applies to disk monitoring.</p><p>Instead of thinking only in terms of:</p><pre>How many GB are left?</pre><p>I prefer to think in terms of:</p><pre>How many hours of data can still be protected?</pre><p>That makes operational decisions much easier during an outage.</p><blockquote><strong><em>Reliability is not only about preventing failures. It is also about being able to explain how long the system can survive a failure and how it returns to a normal state afterward.</em></strong></blockquote><p>Store-and-Forward should therefore be treated not merely as an Azure IoT Edge feature, but as an <strong>operational capability that can be measured, tested, and expressed in numbers</strong>.</p><h3>Next: Reliability Must Also Exist Between the Modality and the Edge PC</h3><p>So far, I have focused on:</p><pre>Edge PC<br>↓<br>Cloud</pre><p>When that communication path fails, the design can:</p><pre>Detect the outage</pre><pre>Retain data on the Edge</pre><pre>Resend data after recovery</pre><pre>Verify that the backlog is cleared</pre><p>But if we move one step closer to the original data source, the complete path is:</p><pre>Modality<br>↓<br>Edge PC<br>↓<br>Cloud</pre><p>This introduces another important failure scenario:</p><pre>Modality<br>↓<br>Edge PC</pre><p>What happens if that connection is lost?</p><p>From the Modality side:</p><pre>Data is ready to send<br>↓<br>Edge PC cannot be reached</pre><p>If the Modality simply does this:</p><pre>Transmission Failed<br>↓<br>Discard Data</pre><p>then even the strongest Store-and-Forward design on the Edge PC cannot recover that data.</p><p>The data never reached the Edge PC in the first place.</p><p>So the next topic is:</p><blockquote><strong><em>How should the Modality behave when it cannot send data to the Edge PC?</em></strong></blockquote><p>For example:</p><pre>Send Data to Edge PC<br>↓<br>Network Disconnected<br>↓<br>Transmission Fails<br>↓<br>Retain Data on the Modality<br>↓<br>Network Restored<br>↓<br>Retry</pre><p>We also need to consider situations such as:</p><pre>No response from the Edge PC</pre><pre>No ACK returned</pre><pre>Temporary network interruption</pre><p>In an unattended environment, immediately stopping processing with:</p><pre>ERROR</pre><p>for every temporary communication failure may not be the best design.</p><p>Instead, the system may need concepts such as:</p><pre>Wait for a response for a defined period</pre><pre>Retry</pre><pre>Treat short interruptions as temporary</pre><pre>Continue processing after connectivity returns</pre><pre>Notify the operator only when necessary</pre><p>The next article will focus on the communication path:</p><pre>Modality<br>↓<br>Edge PC</pre><p>and examine:</p><pre>Data retention after transmission failure</pre><pre>Retry design</pre><pre>ACK / response handling</pre><pre>Behavior during network disconnection</pre><pre>Avoiding unnecessary error stops</pre><blockquote><strong><em>If the goal is to prevent data loss across the entire system, reliability cannot exist only on the Edge PC. The Modality that generates and sends the data must also be designed on the assumption that communication will sometimes fail.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9e08904204c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#13. Detecting Edge Connectivity Loss from the Cloud — Designing Azure-Side Monitoring for Failures…]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/13-detecting-edge-connectivity-loss-from-the-cloud-designing-azure-side-monitoring-for-failures-8d9e4fb4fdf2?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d9e4fb4fdf2</guid>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[azure-iot-edge]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 23:09:51 GMT</pubDate>
            <atom:updated>2026-09-29T23:10:14.700Z</atom:updated>
            <content:encoded><![CDATA[<h3>#13. Detecting Edge Connectivity Loss from the Cloud — Designing Azure-Side Monitoring for Failures the Edge Device Cannot Report</h3><h3>Introduction</h3><p>I have been working on improving the security and reliability of edge/cloud environments for medical systems.</p><p>My main areas of focus include:</p><ul><li>Recovery from power failures</li><li>Data retention during offline periods</li><li>Detection of communication failures</li><li>Safe patch management</li><li>Long-term stable operation</li></ul><p>In the previous article, I introduced an external Linux monitoring device designed to preserve the <strong>last known state of an Edge PC even when the Edge PC completely freezes</strong>.</p><p>The architecture looked like this:</p><pre>Edge PC<br>   │<br>   ├─ Ping<br>   ├─ Heartbeat<br>   ├─ Telemetry<br>   ├─ rsyslog<br>   └─ netconsole<br>   │<br>   ▼<br>External Monitor</pre><p>With this setup, we can investigate conditions inside the local network, such as:</p><pre>Is the Edge PC still alive?</pre><pre>Is the application still running?</pre><pre>Did the kernel stop responding?</pre><pre>When did communication stop?</pre><p>However, for a system expected to operate unattended 24/7/365, there is another important question:</p><blockquote><strong><em>How can we detect, from a remote location, that an Edge PC can no longer communicate with the cloud?</em></strong></blockquote><p>In this article, I will describe a monitoring design for an Azure IoT Edge environment that detects communication failures <strong>from the cloud side</strong> and notifies administrators.</p><h3>1. A Disconnected Device Cannot Report That It Is Disconnected</h3><p>This is the first fundamental problem in communication monitoring.</p><p>Suppose the Edge PC tries to send the following message to Azure:</p><pre>Communication has been lost.</pre><p>But if communication with Azure has already failed, that message cannot be delivered either.</p><pre>Edge PC<br>   │<br>   ▼<br>Network Disconnection<br>   │<br>   ▼<br>Send &quot;Communication Lost&quot;<br>   │<br>   ▼<br>Cannot Send</pre><p>This means we cannot rely only on the affected device to report a communication failure.</p><p>Instead, we reverse the monitoring logic.</p><p>Rather than:</p><pre>Edge PC detects failure<br>↓<br>Edge PC reports failure</pre><p>we use:</p><pre>Cloud detects<br>that communication<br>from the Edge PC has stopped</pre><p>The failure is detected from the opposite side of the connection.</p><h3>2. What We Want to Monitor Is the Entire Path to the Cloud</h3><p>The external monitoring device introduced in the previous article primarily observes the local environment:</p><pre>Edge PC<br>   ↕<br>Local Network<br>   ↕<br>External Monitor</pre><p>This time, we want to observe a larger communication path:</p><pre>Edge PC<br>   │<br>   ▼<br>Facility Network<br>   │<br>   ▼<br>Internet<br>   │<br>   ▼<br>Azure<br>   │<br>   ▼<br>IoT Hub</pre><p>For example, the following may all be true:</p><pre>Edge PC<br>OK</pre><pre>Application<br>OK</pre><pre>Local Network<br>OK</pre><pre>Ping from External Monitor<br>OK</pre><p>while the Edge PC is still unable to connect to Azure IoT Hub.</p><p>Possible causes include:</p><pre>Facility Firewall</pre><pre>Internet Connection</pre><pre>DNS</pre><pre>WAN Routing</pre><pre>Path to Azure</pre><p>This is why <strong>local monitoring and cloud monitoring should be treated as separate layers</strong>.</p><h3>3. Separate Local Monitoring from Cloud Monitoring</h3><p>The monitoring architecture can be divided into two major parts.</p><h3>1. Local Monitoring</h3><pre>Edge PC<br>   │<br>   ▼<br>External Monitor</pre><p>Local monitoring answers questions such as:</p><pre>Is the PC itself still running?</pre><h3>2. Cloud Monitoring</h3><pre>Edge PC<br>   │<br>   ▼<br>Azure IoT Hub<br>   │<br>   ▼<br>Azure-side Monitoring</pre><p>Cloud monitoring answers a different question:</p><pre>Is data actually reaching the cloud?</pre><p>Combining these two views makes troubleshooting much easier.</p><p>For example:</p><pre>Local Ping<br>OK</pre><pre>Cloud Connection<br>NG</pre><p>In this case, a complete Edge PC freeze becomes less likely.</p><p>Instead, the investigation can focus on areas such as:</p><pre>WAN</pre><pre>Firewall</pre><pre>DNS</pre><pre>Internet Connection</pre><pre>Route to Azure</pre><h3>4. Monitoring Azure IoT Hub Connection State from the Cloud</h3><p>In this environment, the Edge PC communicates with the cloud through:</p><pre>Azure IoT Hub</pre><p>To reduce dependency on facility-specific network policies, the communication method was changed to:</p><pre>AMQP over WebSocket</pre><pre>TCP 443</pre><p>Azure IoT Hub can expose device connection and disconnection events to cloud-side services.</p><p>In particular, events such as:</p><pre>DeviceConnected</pre><pre>DeviceDisconnected</pre><p>can be routed through Azure Event Grid.</p><p>This provides a useful trigger for detecting possible communication failures.</p><h3>5. Basic Architecture</h3><p>The basic architecture looks like this:</p><pre>Edge PC<br>   │<br>   │ AMQP over WebSocket<br>   │ TCP 443<br>   ▼<br>Azure IoT Hub<br>   │<br>   │ DeviceDisconnected<br>   ▼<br>Azure Event Grid<br>   │<br>   ▼<br>Logic App<br>   │<br>   ├─ Identify Device<br>   ├─ Wait for Grace Period<br>   ├─ Check Reconnection<br>   │<br>   └─ Failure Still Active<br>          │<br>          ▼<br>      Notification</pre><p>The key point is that the Edge PC does <strong>not</strong> contain logic such as:</p><pre>Detect communication failure<br>↓<br>Send alert email</pre><p>Instead, the cloud reacts when it detects that the connection to the device has been lost.</p><pre>Device connection lost<br>↓<br>Cloud-side event triggered<br>↓<br>Notification workflow begins</pre><h3>6. Do Not Alert Immediately on DeviceDisconnected</h3><p>There is one important problem with this approach.</p><p>If every DeviceDisconnected event immediately generates an alert, administrators may receive many unnecessary notifications.</p><p>Temporary interruptions can occur because of:</p><pre>A few seconds of packet loss</pre><pre>Automatic reconnection</pre><pre>Router failover</pre><pre>Temporary network instability</pre><pre>IoT Edge reconnection</pre><p>For example:</p><pre>12:00:00<br>Disconnected</pre><pre>12:00:05<br>Reconnected</pre><p>If the alert is generated immediately, this five-second interruption becomes an incident email.</p><p>That is usually not what we want.</p><p>So the design should not be:</p><pre>Disconnect<br>↓<br>Immediate Alert</pre><h3>7. Treat the Failure as an Incident Only After a Grace Period</h3><p>A better approach is:</p><pre>DeviceDisconnected<br>↓<br>Start Timer<br>↓<br>Wait<br>↓<br>Has Communication Recovered?</pre><p>If communication has recovered:</p><pre>No Notification</pre><p>If it has not recovered:</p><pre>Communication Failure<br>↓<br>Notification</pre><p>Depending on the system, the grace period might be:</p><pre>2 minutes</pre><pre>3 minutes</pre><pre>5 minutes</pre><p>There is no universally correct value.</p><p>It should be based on:</p><blockquote><strong><em>How long can this system tolerate losing cloud communication?</em></strong></blockquote><p>The important concept is this:</p><blockquote><strong><em>A brief disconnection is not necessarily an incident. Remaining disconnected beyond the allowed time is.</em></strong></blockquote><h3>8. Do Not Treat Event Grid Events as the Only Source of Truth</h3><p>Event Grid is useful for device-level connection monitoring, but connection-state events should not be treated as a perfect real-time representation of every network transition.</p><p>There can be delay between the actual state change and the event being processed, and very short connection/disconnection transitions may not always be useful as an operational signal by themselves.</p><p>Therefore, instead of relying only on:</p><pre>DeviceDisconnected</pre><p>we should have another source of information.</p><p>That source is:</p><blockquote><strong><em>The last time data was successfully received from the device.</em></strong></blockquote><h3>9. “Connected” Does Not Mean “The System Is Working”</h3><p>This distinction is important.</p><p>For example:</p><pre>IoT Hub Connection<br>Connected</pre><p>does not necessarily mean that the application is successfully sending data.</p><p>The connection may still exist while the application responsible for generating or forwarding data has stopped.</p><p>Therefore:</p><pre>Connection Healthy</pre><p>does not automatically mean:</p><pre>System Healthy</pre><p>The reverse is also true.</p><p>A connection may briefly drop and then recover immediately, while normal data transmission resumes without any operational impact.</p><p>For this reason, the cloud should monitor two different things:</p><pre>Connection State</pre><p>and:</p><pre>Last Data Received</pre><h3>10. Monitor the Last Received Timestamp</h3><p>If the Edge PC sends data periodically, the cloud can maintain information such as:</p><pre>Device A</pre><pre>Last Received:<br>2026-09-21 12:00:05</pre><p>The monitoring system can then compare this value against the current time.</p><p>For example:</p><pre>Current Time<br>12:05</pre><pre>Last Received<br>12:00</pre><pre>Difference<br>5 minutes</pre><p>This means:</p><pre>No data has been received<br>for 5 minutes.</pre><p>This is more valuable than connection state alone because it answers a more practical question:</p><blockquote><strong><em>Is the system actually delivering data to the cloud?</em></strong></blockquote><h3>11. Combine “Disconnect Event” and “No Data Received”</h3><p>In this design, the notification logic uses two stages.</p><pre>1. DeviceDisconnected<br>↓<br>Possible communication problem detected<br></pre><pre>2. No new data for a defined period<br>↓<br>Communication problem confirmed</pre><p>For example:</p><pre>DeviceDisconnected<br>↓<br>Wait 3 minutes<br>↓<br>New Data Received<br>↓<br>Recovered<br>↓<br>No Alert</pre><p>Or:</p><pre>DeviceDisconnected<br>↓<br>Wait 3 minutes<br>↓<br>No New Data<br>↓<br>Failure Still Active<br>↓<br>Send Alert</pre><p>This reduces unnecessary alerts caused by short-lived network instability.</p><h3>12. Data Can Stop Even While the Connection Remains Active</h3><p>We also need to consider the opposite failure mode.</p><p>There may be no DeviceDisconnected event at all, while the application itself has stopped sending data.</p><p>For example:</p><pre>OS<br>OK</pre><pre>IoT Edge<br>Connected</pre><pre>Application Module<br>Stopped</pre><p>In this situation, connection monitoring alone may not detect the failure.</p><p>Therefore:</p><pre>No data received for a defined period</pre><p>should also exist as an independent monitoring condition.</p><h3>13. Separate Connection Monitoring from Data Monitoring</h3><p>From the cloud side, we therefore monitor two separate signals.</p><pre>Connection Monitoring<br>│<br>└─ DeviceDisconnected<br></pre><pre>Data Monitoring<br>│<br>└─ Last Received Time</pre><p>Connection monitoring is useful for quickly detecting problems related to:</p><pre>Network</pre><pre>IoT Hub Connection</pre><p>Data monitoring goes one layer deeper.</p><p>It can detect problems involving:</p><pre>Application</pre><pre>Data Pipeline</pre><pre>Module</pre><p>In other words, connection monitoring tells us whether the communication channel exists.</p><p>Data monitoring tells us whether the system is actually doing its job.</p><h3>14. Include Troubleshooting Information in the Alert</h3><p>An alert that simply says:</p><pre>Communication Error</pre><p>is not very useful during an incident.</p><p>The notification should include enough context for initial troubleshooting.</p><p>For example:</p><pre>Device ID</pre><pre>Detection Time</pre><pre>Last Data Received</pre><pre>Disconnect Detection Time</pre><pre>Duration of Communication Loss</pre><pre>Current Status</pre><p>An alert might look like this:</p><pre>Device:<br>Edge-PC-001</pre><pre>Status:<br>Communication Lost</pre><pre>Disconnected:<br>02:15</pre><pre>Last Data:<br>02:14:55</pre><pre>Duration:<br>5 minutes</pre><p>With this information, the administrator immediately knows:</p><pre>Which device is affected?</pre><pre>When did the problem begin?</pre><pre>Until when was data still arriving?</pre><p>That shortens the first stage of troubleshooting.</p><h3>15. Notify When Communication Recovers</h3><p>Recovery is just as important as failure detection.</p><p>For example:</p><pre>02:15<br>Communication Lost</pre><pre>02:23<br>Communication Restored</pre><p>Recovery can be detected through:</p><pre>DeviceConnected</pre><p>or:</p><pre>New Data Received</pre><p>A possible state transition is:</p><pre>Communication Failure<br>↓<br>Reconnect<br>↓<br>Data Reception Confirmed<br>↓<br>Recovered</pre><p>If required, a recovery notification can then be sent.</p><p>Without this, administrators may receive a failure email but have no clear indication of whether the system is still down.</p><h3>16. Do Not Send the Same Alert Repeatedly</h3><p>Duplicate notifications are another operational problem.</p><p>Suppose communication remains unavailable for 30 minutes.</p><p>We do not want:</p><pre>Communication Lost</pre><pre>Communication Lost</pre><pre>Communication Lost</pre><pre>Communication Lost</pre><p>every five minutes.</p><p>Instead, maintain a state for each device.</p><p>For example:</p><pre>NORMAL</pre><pre>ALERT</pre><pre>RECOVERED</pre><p>The transition becomes:</p><pre>NORMAL<br>↓<br>Failure Detected<br>↓<br>ALERT<br>↓<br>Send One Notification</pre><p>While the failure continues, the same initial alert is not repeatedly sent.</p><p>After recovery:</p><pre>ALERT<br>↓<br>RECOVERED<br>↓<br>NORMAL</pre><p>This leads to an important operational principle:</p><blockquote><strong><em>Notify on state transitions, not on every event.</em></strong></blockquote><h3>17. Combining Cloud Monitoring with Local Monitoring Improves Troubleshooting</h3><p>This is where the external monitor from the previous article becomes especially useful.</p><p>Suppose the cloud reports:</p><pre>Communication Lost</pre><p>but the external monitor shows:</p><pre>Ping<br>OK</pre><pre>Heartbeat<br>OK</pre><pre>Telemetry<br>OK</pre><p>The Edge PC is probably still running.</p><p>The investigation can then focus on:</p><pre>Internet Connection</pre><pre>Facility Firewall</pre><pre>DNS</pre><pre>WAN Route</pre><pre>Path to Azure</pre><p>On the other hand, suppose we see:</p><pre>Cloud<br>Communication Lost</pre><pre>External Monitor<br>Ping NG</pre><pre>Heartbeat NG</pre><p>Now the possible causes move lower in the stack:</p><pre>Edge PC Freeze</pre><pre>Power Loss</pre><pre>NIC Failure</pre><pre>Local Network Failure</pre><p>By comparing local and cloud-side signals, we can narrow the failure domain much more quickly.</p><h3>18. Think About Monitoring in Layers</h3><p>The monitoring architecture can be organized by layer.</p><pre>Application<br>│<br>├─ Cloud Data Reception<br>└─ Local Heartbeat<br></pre><pre>IoT / Cloud Connection<br>│<br>└─ IoT Hub / Event Grid<br></pre><pre>OS<br>│<br>├─ Telemetry<br>└─ rsyslog<br></pre><pre>Kernel<br>│<br>└─ netconsole<br></pre><pre>Network<br>│<br>├─ Local Ping<br>└─ Cloud Connection<br></pre><pre>Hardware<br>│<br>├─ SMART<br>├─ watchdog<br>└─ External Monitor</pre><p>The objective is not to make one monitoring mechanism explain every possible failure.</p><p>Instead:</p><blockquote><strong><em>Combine signals from multiple layers and determine the last layer that was still functioning normally.</em></strong></blockquote><p>That provides much better evidence during troubleshooting.</p><h3>19. Test the Design by Actually Breaking the Network</h3><p>Monitoring is not complete just because it has been configured.</p><p>The failure path must be tested.</p><p>In a test environment, intentionally stop communication between:</p><pre>Edge PC<br>↓<br>Azure</pre><p>In this system, cloud communication uses:</p><pre>AMQP over WebSocket</pre><pre>TCP 443</pre><p>so we deliberately create a condition in which the Edge PC can no longer establish cloud communication.</p><p>Then verify the complete monitoring chain:</p><pre>Was the IoT Hub connection lost?</pre><pre>Did Event Grid receive the event?</pre><pre>Did the notification workflow start?</pre><pre>Was the grace period applied correctly?</pre><pre>Was the alert sent after the expected delay?</pre><p>Monitoring should be treated like any other system feature.</p><p>It needs failure testing.</p><h3>20. Cloud-Side Monitoring Also Has Limits</h3><p>Cloud monitoring is not a perfect single point of truth either.</p><p>The monitoring chain itself depends on services such as:</p><pre>IoT Hub</pre><pre>Event Grid</pre><pre>Logic App</pre><pre>Notification Service</pre><p>If one of these services has a problem, the expected device-disconnection notification may not operate normally.</p><p>This is another reason not to depend on only one monitoring mechanism.</p><p>The overall design should combine:</p><pre>Edge-side Monitoring</pre><pre>Local External Monitoring</pre><pre>Cloud Monitoring</pre><p>Azure platform-level incidents should also be considered separately from device-level disconnection monitoring.</p><p>For those cases, Azure Service Health and resource-level monitoring provide another monitoring layer.</p><h3>21. Final Architecture</h3><p>The cloud-side monitoring layer added in this design looks like this:</p><pre>Edge PC<br>   │<br>   │ Data<br>   ▼<br>Azure IoT Hub<br>   │<br>   ├─ DeviceDisconnected<br>   │<br>   ▼<br>Event Grid<br>   │<br>   ▼<br>Logic App<br>   │<br>   ├─ Wait for Grace Period<br>   ├─ Check Reconnection<br>   ├─ Check Last Data Received<br>   │<br>   ▼<br>Determine Communication Failure<br>   │<br>   ▼<br>Notification</pre><p>When communication recovers:</p><pre>Reconnect</pre><pre>+</pre><pre>Data Reception Resumes<br>↓<br>Recovered</pre><p>This completes both sides of the monitoring lifecycle:</p><pre>Failure Detection<br>↓<br>Alert</pre><pre>Recovery Detection<br>↓<br>Clear Alert State</pre><h3>Conclusion: Do Not Ask the Disconnected Device to Report Its Own Disconnection</h3><p>When communication between an Edge PC and the cloud fails, the Edge PC cannot reliably send a message saying:</p><pre>I cannot communicate with the cloud.</pre><p>The communication channel required to send that message is exactly what has failed.</p><p>Instead, we monitor for something that was previously arriving normally but has now stopped arriving.</p><p>In this design, that means combining:</p><pre>DeviceDisconnected<br>↓<br>Event Grid</pre><pre>+</pre><pre>Last Data Received<br>↓<br>No Data Received</pre><pre>+</pre><pre>Grace Period<br>↓<br>Ignore Temporary Interruptions</pre><p>Then we manage the entire lifecycle:</p><pre>Failure<br>↓<br>Notification</pre><pre>Recovery<br>↓<br>Clear Failure State</pre><p>The core principle is simple:</p><blockquote><strong><em>If the communication channel used to report a failure may itself become unavailable, place failure detection on the other side of that channel as well.</em></strong></blockquote><p>That is the fundamental idea behind this cloud-side monitoring design.</p><h3>Next: How to Avoid Losing Data When the Cloud Is Unavailable</h3><p>At this point, the system can detect from the cloud side that:</p><pre>No data is arriving</pre><pre>or</pre><pre>The device is no longer connected</pre><p>But another important question remains:</p><blockquote><strong><em>What happens to the data generated while cloud communication is unavailable?</em></strong></blockquote><p>Consider this architecture:</p><pre>Medical Device<br>↓<br>Edge PC<br>↓<br>Cloud</pre><p>If cloud communication is unavailable for 30 minutes, the medical device may continue generating data during that entire period.</p><p>We cannot simply treat that data as:</p><pre>Could not send to cloud<br>↓<br>Discard</pre><p>Instead, we need a design such as:</p><pre>Cloud Available<br>↓<br>Send Normally<br></pre><pre>Cloud Disconnected<br>↓<br>Store Locally<br>↓<br>Wait for Delivery<br></pre><pre>Cloud Restored<br>↓<br>Reconnect<br>↓<br>Resend Unsent Data<br>↓<br>Return to Normal Operation</pre><p>In the next article, I will look at how to design an edge system that does not lose data even when the cloud is temporarily unavailable.</p><p>This requires more than simply saying “retry.”</p><p>For unattended 24/7/365 operation, we also need to consider:</p><pre>Local Storage</pre><pre>Queue Design</pre><pre>Storage Capacity</pre><pre>Retention Period</pre><pre>Resend Order</pre><pre>Duplicate Data</pre><pre>Cloud Recovery Detection</pre><p>These details determine whether store-and-forward is simply a feature — or a reliable operational design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d9e4fb4fdf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#12. When an Edge PC Freezes, Preserve the Evidence — Capturing the Last Known State with an…]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/12-when-an-edge-pc-freezes-preserve-the-evidence-capturing-the-last-known-state-with-an-162aa2e7f373?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/162aa2e7f373</guid>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Mon, 28 Sep 2026 23:44:41 GMT</pubDate>
            <atom:updated>2026-09-28T23:44:41.768Z</atom:updated>
            <content:encoded><![CDATA[<h3>#12. When an Edge PC Freezes, Preserve the Evidence — Capturing the Last Known State with an External Monitor</h3><p>In edge/cloud environments for medical systems, I have been working on ways to improve both security and operational reliability.</p><p>The main themes include:</p><ul><li>Recovery from unexpected power loss</li><li>Data retention during offline periods</li><li>Detection of network outages</li><li>Safe patch management</li><li>Long-term unattended operation</li></ul><p>In the previous article, I described how I designed an Edge PC for <strong>24/7 unattended operation</strong>, with the goal of making it easier for the system to return to a normal state after an abnormal condition.</p><p>The basic idea was:</p><pre>systemd timer<br>      ↓<br>Periodic maintenance<br>      ↓<br>Health check<br>      ↓<br>Repair only when necessary</pre><p>Tasks such as:</p><pre>NTP<br>DNS<br>Routing<br>Firewall / NAT<br>NIC<br>IoT Edge<br>Container Runtime<br>Reboot</pre><p>were separated by responsibility instead of being handled by one large maintenance process.</p><p>But there is one serious limitation to this approach.</p><h3>What happens if the Edge PC itself completely freezes?</h3><pre>Edge PC<br>   ↓<br>Freeze<br>   ↓<br>Timer stops<br>   ↓<br>Health checks stop<br>   ↓<br>Logging stops<br>   ↓<br>Self-recovery stops</pre><p>No matter how much monitoring you install on the Edge PC itself, once the entire machine freezes, <strong>the machine can no longer record its own failure</strong>.</p><p>That led to the next design decision:</p><blockquote><em>Monitor the Edge PC from another Linux machine and preserve the evidence outside the system being investigated.</em></blockquote><h3>1. Self-Monitoring Has a Fundamental Limit</h3><p>Normally, monitoring runs on the same machine being monitored.</p><p>For example:</p><pre>CPU<br>Memory<br>Disk<br>Network<br>Application<br>Containers<br>System Logs</pre><p>This is essential.</p><p>But if the operating system itself stops responding, the monitoring process stops with it.</p><p>Possible examples include:</p><pre>Kernel freeze<br>Hardware hang<br>NIC failure<br>Complete system freeze<br>Sudden power loss</pre><p>In these situations, local logs usually stop at some point before the actual failure.</p><p>And depending on the failure mode, the last log entries may not even have been completely written to disk.</p><p>So I decided to combine:</p><pre>Internal monitoring<br>        +<br>External monitoring</pre><p>The internal system tells me what is happening while the machine is alive.</p><p>The external system tells me <strong>when each observable signal disappears</strong>.</p><h3>2. Adding a Separate External Monitor</h3><p>The architecture is simple.</p><pre>┌──────────────────────────┐<br>│        Edge PC           │<br>│                          │<br>│  Application             │<br>│  Containers              │<br>│  Ubuntu                  │<br>│  Kernel                  │<br>│  NIC                     │<br>└────────────┬─────────────┘<br>             │<br>             │ Status / Logs<br>             │<br>             ▼<br>┌──────────────────────────┐<br>│    External Monitor      │<br>│       Ubuntu PC          │<br>│                          │<br>│  Ping                    │<br>│  Heartbeat Receiver      │<br>│  Telemetry Receiver      │<br>│  rsyslog Receiver        │<br>│  netconsole Receiver     │<br>└──────────────────────────┘</pre><p>The important point is that the monitoring target and the monitoring system are separated.</p><p>Even if the Edge PC stops completely:</p><blockquote><strong><em>The external monitor continues running.</em></strong></blockquote><p>This allows me to preserve information such as:</p><pre>When did Ping stop responding?</pre><pre>When was the last Heartbeat received?</pre><pre>What was the last Telemetry sample?</pre><pre>What was the last System Log?</pre><pre>What was the last Kernel message?</pre><p>That information can remain available even after the Edge PC itself has stopped.</p><h3>3. Ping Tells You When Connectivity Disappears — Not Why</h3><p>The simplest form of external monitoring is:</p><pre>ping</pre><p>In this design, the external monitor sends Ping requests to the Edge PC every second.</p><pre>External Monitor<br>       ↓<br>   1-second Ping<br>       ↓<br>     Edge PC</pre><p>The result may look like this:</p><pre>12:00:01 UP<br>12:00:02 UP<br>12:00:03 UP<br>12:00:04 DOWN<br>12:00:05 DOWN</pre><p>This lets me identify the loss of connectivity with approximately one-second resolution.</p><p>But Ping alone does not explain the cause.</p><p>If Ping stops responding, possible causes include:</p><pre>OS freeze<br>NIC failure<br>LAN cable problem<br>Network switch problem<br>Firewall issue<br>Power loss</pre><p>So Ping is useful for answering:</p><blockquote><strong><em>When did network-level responsiveness disappear?</em></strong></blockquote><p>It is not enough to answer:</p><blockquote><strong><em>Why did the system freeze?</em></strong></blockquote><p>That is why I added several independent monitoring paths.</p><h3>4. Heartbeat Shows Whether User Space Is Still Alive</h3><p>The next signal is a simple Heartbeat.</p><p>The Edge PC periodically sends a small message to the external monitor:</p><pre>I am alive</pre><p>In this environment, the interval is five seconds.</p><pre>Edge PC<br>   ↓<br>Heartbeat<br>   ↓<br>External Monitor</pre><p>This provides information that Ping cannot.</p><p>Ping mainly tells us whether the network stack can respond.</p><p>Heartbeat tells us whether the monitoring process in user space is still running.</p><p>For example:</p><pre>Ping       = OK<br>Heartbeat  = NG</pre><p>This suggests that the machine is still responding at the network level, while something higher in the stack may no longer be functioning correctly.</p><p>Possible areas include:</p><pre>Application<br>Monitoring Process<br>User Space</pre><p>On the other hand:</p><pre>Ping       = NG<br>Heartbeat  = NG</pre><p>suggests that the failure may exist at a lower layer or affect the system more broadly.</p><p>The value comes from comparing several signals rather than relying on one monitoring mechanism.</p><h3>5. Five-Second Telemetry Captures What Happened Just Before the Freeze</h3><p>A Heartbeat only provides two basic states:</p><pre>Alive</pre><pre>or</pre><pre>Not alive</pre><p>That is useful, but it does not describe what the machine was doing immediately before it stopped.</p><p>So I also send lightweight telemetry every five seconds.</p><p>The important design rule is:</p><blockquote><strong><em>Do not run heavy diagnostic commands every five seconds.</em></strong></blockquote><p>High-frequency telemetry should use information that can be collected with very little impact on the system.</p><p>For example, data available through:</p><pre>/proc<br>/sys</pre><p>can be used to observe items such as:</p><pre>CPU state<br>Memory state<br>Load<br>Disk I/O<br>Network I/O<br>Uptime<br>Boot ID</pre><p>If the machine later freezes, I can check whether there were signs such as:</p><pre>CPU load suddenly increased</pre><pre>Available memory decreased</pre><pre>Disk I/O increased</pre><pre>Network traffic changed</pre><p>immediately before the failure.</p><p>This gives me something much more useful than a simple:</p><pre>The machine stopped.</pre><p>It gives me a view of:</p><pre>What was happening immediately before it stopped?</pre><h3>6. Monitoring Must Not Become Part of the Problem</h3><p>This became one of the most important principles in the investigation.</p><p>When investigating a freeze:</p><blockquote><strong><em>The monitoring system itself should not significantly change the behavior of the system being investigated.</em></strong></blockquote><p>Suppose I executed commands like these every five seconds:</p><pre>smartctl<br>docker inspect<br>systemctl<br>powertop<br>turbostat<br>perf</pre><p>The monitoring itself could introduce:</p><pre>CPU wakeups<br>Disk access<br>Process creation<br>Interrupts<br>Power-state transitions</pre><p>That becomes especially problematic when the investigation involves areas such as:</p><pre>Idle behavior<br>C-states<br>Power management<br>Kernel behavior</pre><p>The act of observing the system could influence the exact behavior I am trying to investigate.</p><p>So instead of collecting everything at maximum frequency, I separated monitoring intervals based on two things:</p><ol><li>How quickly the information can change</li><li>How much load is required to collect it</li></ol><h3>7. Four Different Monitoring Intervals</h3><p>The monitoring configuration is divided roughly as follows.</p><pre>5 seconds<br>│<br>├─ Heartbeat<br>├─ CPU<br>├─ Memory<br>├─ Disk I/O<br>└─ Network I/O<br></pre><pre>60 seconds<br>│<br>├─ C-state<br>├─ PSI<br>├─ vmstat<br>├─ IRQ / softirq<br>├─ GPU Runtime PM<br>└─ Container status<br></pre><pre>10 minutes<br>│<br>├─ Network interface statistics<br>├─ Filesystem<br>├─ NTP<br>├─ Failed services<br>└─ Partial SMART information<br></pre><pre>1 hour<br>│<br>└─ Detailed SMART information</pre><p>The principle is simple:</p><pre>Information that needs fine-grained observation<br>                ↓<br>          Short interval<br></pre><pre>Expensive diagnostic operation<br>                ↓<br>           Long interval</pre><p>There is no reason to collect every metric every five seconds.</p><h3>8. Using 60-Second Telemetry for Deeper System State</h3><p>The 60-second telemetry goes deeper than the five-second lightweight measurements.</p><p>For example:</p><pre>C-state<br>PSI<br>vmstat<br>IRQ<br>softirq<br>GPU Runtime PM<br>Container status</pre><p>In this investigation, C-state information was particularly important because I was also examining the relationship between power-saving states and system freezes.</p><p>PSI — Pressure Stall Information — is also useful.</p><p>It helps observe resource pressure involving:</p><pre>CPU<br>Memory<br>I/O</pre><p>A simple metric such as:</p><pre>CPU = 20%</pre><p>does not necessarily describe how much time workloads are spending waiting for resources.</p><p>PSI provides another view of overall system pressure.</p><h3>9. Do Not Run SMART Every Five Seconds</h3><p>Storage health is also important.</p><p>Especially when investigating symptoms such as:</p><pre>SSD suddenly disappearing</pre><pre>Increasing I/O errors</pre><pre>System becoming unresponsive</pre><p>SMART information can provide useful clues.</p><p>But detailed SMART queries do not need to run every few seconds.</p><p>So I separated them into:</p><pre>Lightweight health check<br>        ↓<br>    Every 10 minutes<br></pre><pre>Detailed SMART<br>        ↓<br>      Every hour</pre><p>The goal is not to maximize the amount of information collected.</p><p>The goal is to find the right balance between:</p><pre>Diagnostic value</pre><pre>and</pre><pre>Monitoring impact</pre><h3>10. Send System Logs Off the Edge PC with rsyslog</h3><p>Another important component is:</p><pre>rsyslog</pre><p>Normally, system logs are stored on the Edge PC itself.</p><p>But if the machine completely freezes, there is no guarantee that the final messages were successfully written to local storage.</p><p>So I forward system logs to the external monitor.</p><pre>Edge PC<br>   ↓<br>rsyslog<br>   ↓<br>TCP<br>   ↓<br>External Monitor</pre><p>In this design, rsyslog uses TCP.</p><p>This gives me another copy of system events outside the machine being investigated.</p><p>Even if the Edge PC becomes inaccessible, the external monitor may still contain the last messages that were transmitted successfully.</p><h3>11. Use netconsole as a Separate Path for Kernel Messages</h3><p>rsyslog also has a limitation.</p><p>It is fundamentally a user-space process.</p><p>If a serious problem occurs inside the kernel, a message may never reach the normal user-space logging path.</p><p>That is why I also use:</p><pre>netconsole</pre><p>The architecture looks like this:</p><pre>Kernel<br>   ↓<br>netconsole<br>   ↓<br>UDP<br>   ↓<br>External Monitor</pre><p>netconsole can transmit kernel printk messages over the network to another machine.</p><p>The responsibility is therefore divided:</p><pre>rsyslog<br>   ↓<br>OS / User-space logs<br></pre><pre>netconsole<br>   ↓<br>Kernel messages</pre><p>These two mechanisms observe different parts of the system.</p><h3>12. Why Use Both rsyslog and netconsole?</h3><p>Either one can provide useful information.</p><p>But the information available depends on where the failure occurs.</p><p>For example:</p><pre>Application failure<br>        ↓<br>Likely visible through rsyslog<br></pre><pre>Kernel failure<br>        ↓<br>May be visible through netconsole<br></pre><pre>Complete system freeze<br>        ↓<br>Eventually both stop</pre><p>A complete freeze will eventually stop all outbound communication.</p><p>But that is not the most important question.</p><p>What matters is:</p><blockquote><strong><em>Which signal stopped first, and in what order?</em></strong></blockquote><p>Imagine the external monitor records:</p><pre>Telemetry stops<br>       ↓<br>rsyslog stops<br>       ↓<br>Kernel message arrives through netconsole<br>       ↓<br>Ping stops</pre><p>That sequence is much more informative than simply knowing:</p><pre>The Edge PC froze.</pre><p>The order in which monitoring channels disappear can help narrow down where the failure occurred.</p><h3>13. The “Last Received Timestamp” Becomes Diagnostic Data</h3><p>Every piece of data received by the external monitor is timestamped.</p><p>For example:</p><pre>12:30:10 Ping OK</pre><pre>12:30:10 Heartbeat OK</pre><pre>12:30:10 Telemetry OK</pre><pre>12:30:11 Ping OK</pre><pre>12:30:12 Ping OK</pre><pre>12:30:13 Ping NG</pre><p>From this alone, I know that the monitoring process was still functioning at approximately:</p><pre>12:30:10</pre><p>I can then inspect the telemetry collected at that time.</p><p>For example:</p><pre>CPU<br>Memory<br>C-state<br>I/O<br>Network</pre><p>This changes the purpose of monitoring.</p><p>Monitoring is not only about sending an alert saying:</p><pre>A failure occurred.</pre><p>The real objective is:</p><blockquote><strong><em>Preserve as much information as possible about the system immediately before the failure.</em></strong></blockquote><h3>14. The External Monitor Must Also Be Reliable</h3><p>Of course, an external monitor is useless if the monitor itself has stopped.</p><p>So the monitoring machine also needs its own reliability mechanisms.</p><p>For example:</p><pre>watchdog<br>kdump<br>persistent journal<br>SMART<br>pstore</pre><p>Logs should not exist only in volatile memory.</p><p>A persistent journal is used so that relevant information survives a reboot.</p><p>In other words, the architecture is not simply:</p><pre>Monitor the Edge PC</pre><p>It must also consider:</p><pre>Ensure that the monitoring system itself remains healthy</pre><h3>15. Kernel Panic Requires Another Type of Evidence</h3><p>A complete freeze and a kernel panic are similar from an operational perspective, but diagnostically they are different.</p><p>With a kernel panic, it may be possible to capture a crash dump.</p><p>So kdump is also part of the strategy.</p><p>The overall idea becomes:</p><pre>Normal operation<br>      ↓<br>Journal / Telemetry<br></pre><pre>Kernel messages<br>      ↓<br>netconsole<br></pre><pre>Kernel panic<br>      ↓<br>kdump<br></pre><pre>Complete freeze<br>      ↓<br>Last data received by the external monitor</pre><p>Different failure modes require different evidence.</p><p>There is no single logging mechanism that covers every type of failure.</p><h3>16. Do Not Heavily Modify the System You Are Investigating</h3><p>Another important rule was:</p><blockquote><strong><em>Do not significantly change the Edge PC configuration just to add monitoring.</em></strong></blockquote><p>If adding the monitoring system also changes things such as:</p><pre>Kernel version<br>GRUB<br>C-state configuration<br>Network configuration<br>Docker configuration<br>Scheduled reboot<br>Memory configuration</pre><p>then I am no longer testing the same system.</p><p>The environment under investigation has changed.</p><p>That makes comparison much more difficult.</p><p>So I tried to preserve the major configuration of the Edge PC and add monitoring with as little intrusion as possible.</p><h3>17. NMI Watchdog and C-State Investigation</h3><p>This becomes particularly important when investigating power-management behavior.</p><p>If the suspected freeze is related to C-states or power management, I do not want the monitoring mechanism itself to introduce unnecessary interrupts.</p><p>For the Edge PC under investigation, the configuration is:</p><pre>kernel.watchdog = 1<br>kernel.nmi_watchdog = 0</pre><p>The reason for disabling the NMI watchdog in this particular investigation is that I wanted to observe C-state behavior without introducing NMI interrupts as another experimental variable.</p><p>The external monitor is different.</p><p>It is not the system being investigated, so it can use more aggressive watchdog and crash-detection mechanisms.</p><p>This leads to another important principle:</p><blockquote><strong><em>The monitored system and the monitoring system do not need identical configurations.</em></strong></blockquote><p>Their roles are different.</p><h3>18. Monitoring Is Not a Reason to Open the Firewall Broadly</h3><p>External monitoring adds network traffic and additional communication paths.</p><p>But that does not mean the network should simply allow everything.</p><p>For example, I do not want a configuration such as:</p><pre>Allow Ping from every device</pre><pre>Send Telemetry across the entire network</pre><pre>Expose the Log Receiver on every interface</pre><p>Instead, Ping is allowed only from the external monitor’s IP address.</p><p>Likewise:</p><pre>Heartbeat<br>Telemetry<br>rsyslog<br>netconsole</pre><p>are directed only to the specified external monitor.</p><p>The principle is:</p><pre>Do not broadly open the firewall for monitoring.</pre><pre>Add only the communication required for monitoring.</pre><p>Observability should not unnecessarily expand the attack surface.</p><h3>19. Verify the Monitoring System with a Five-Minute Acceptance Check</h3><p>Building the monitoring configuration is not enough.</p><p>The important question is whether data is actually arriving.</p><p>During factory testing or setup, I connect the Edge PC and the external monitor and run them for at least five minutes.</p><p>During that period, I verify actual reception of:</p><pre>1-second Ping</pre><pre>5-second Heartbeat</pre><pre>5-second Telemetry</pre><pre>60-second Detailed Telemetry</pre><pre>rsyslog</pre><pre>netconsole</pre><p>The important point is not just checking:</p><pre>Service = Active</pre><p>The acceptance criterion is:</p><blockquote><strong><em>There is actual evidence that the data reached the external monitor.</em></strong></blockquote><p>A running service does not automatically mean the monitoring path works end to end.</p><h3>20. The Monitoring Layers</h3><p>The entire design can be summarized by layer.</p><pre>Network Level<br>│<br>└─ 1-second Ping<br></pre><pre>Process / User Space Level<br>│<br>├─ 5-second Heartbeat<br>└─ 5-second Telemetry<br></pre><pre>System Level<br>│<br>├─ 60-second Detailed Telemetry<br>├─ 10-minute Health Check<br>└─ 1-hour SMART<br></pre><pre>OS Log Level<br>│<br>└─ rsyslog<br></pre><pre>Kernel Level<br>│<br>└─ netconsole<br></pre><pre>Crash Level<br>│<br>├─ watchdog<br>├─ kdump<br>└─ pstore</pre><p>Instead of depending on one monitoring tool, the system leaves evidence at multiple layers.</p><p>Each signal answers a slightly different question.</p><h3>The Key Idea: If the Monitored System Can Stop, Keep the Evidence Somewhere Else</h3><p>For a 24/7 unattended Edge PC, self-monitoring and self-recovery are extremely important.</p><p>But when the monitored system itself completely freezes, those mechanisms stop as well.</p><p>So in addition to:</p><pre>Edge PC<br>   ↓<br>Maintenance<br>Self-monitoring<br>Self-recovery</pre><p>I added:</p><pre>External Monitor<br>   ↓<br>1-second Ping<br>Heartbeat<br>Telemetry<br>rsyslog<br>netconsole</pre><p>I also intentionally separated monitoring frequency based on collection cost:</p><pre>Lightweight information<br>        ↓<br>Short interval<br></pre><pre>Heavy diagnostics<br>        ↓<br>Long interval</pre><p>And I tried not to unnecessarily modify existing major settings such as:</p><pre>Kernel<br>GRUB<br>C-state<br>Network<br>Docker<br>Scheduled reboot</pre><p>just for the sake of observation.</p><p>The most important lesson from this design is:</p><blockquote><strong><em>When investigating a freeze, knowing that the system stopped is not enough. You need to preserve what was happening immediately before it stopped.</em></strong></blockquote><p>If the system being monitored may lose the ability to preserve its own evidence, move that evidence outside the system.</p><p>That is the fundamental idea behind this external monitoring design.</p><h3>Next: Detecting Communication Loss from the Cloud Side</h3><p>At this point, the architecture has two layers of local reliability:</p><pre>Edge PC<br>   ↓<br>Self-monitoring<br>Self-recovery<br></pre><pre>External Monitor<br>   ↓<br>Monitor the Edge PC from outside</pre><p>But there is another failure mode that matters in real unattended deployments.</p><p>For example:</p><pre>The site&#39;s Internet connection goes down</pre><pre>The Edge PC can no longer connect to Azure</pre><pre>Data transmission to IoT Hub stops</pre><p>These failures must also be detected remotely.</p><p>There is an important problem:</p><blockquote><strong><em>An Edge PC that has lost its connection to the Cloud cannot reliably use that same connection to report that it is disconnected.</em></strong></blockquote><p>So the next article will look at the opposite approach:</p><pre>Edge PC<br>   ↓<br>Azure IoT Hub<br>   ↓<br>Cloud detects loss of communication<br>   ↓<br>Check whether the condition continues<br>   ↓<br>Notify the administrator</pre><p>Instead of asking the device to report its own communication failure, the Cloud detects that <strong>data has stopped arriving from the device</strong>.</p><p>I will also look at how to combine information such as:</p><pre>DeviceDisconnected</pre><pre>Last data received time</pre><pre>Reconnection</pre><pre>Duration of the outage</pre><p>so that temporary network fluctuations do not generate unnecessary alerts.</p><p>The goal is to notify operators only when a communication outage genuinely requires attention.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=162aa2e7f373" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#11. Designing Edge Devices for Stable 24/7 Unattended Operation]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/designing-edge-devices-for-stable-24-7-unattended-operation-4d0d8f80274c?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d0d8f80274c</guid>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[azure-iot-edge]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 23:26:40 GMT</pubDate>
            <atom:updated>2026-09-28T23:42:06.503Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>I work on improving the security and reliability of edge/cloud environments used in medical systems, especially in environments where devices are expected to operate unattended for long periods.</p><p>Some of the main topics I focus on are:</p><ul><li>recovery after power failures</li><li>retaining data during offline periods</li><li>detecting communication failures</li><li>applying security patches safely</li><li>maintaining long-term system stability</li></ul><p>In the previous article, I discussed an important question:</p><blockquote><strong><em>How much of Azure IoT Edge and the container runtime should be fixed to a specific version, and how much should be allowed to update?</em></strong></blockquote><p>The policy I adopted was roughly:</p><pre>Security updates<br>↓<br>Apply them</pre><pre>Patches within the same release generation<br>↓<br>Apply them under controlled conditions</pre><pre>Unvalidated major or generation changes<br>↓<br>Do not apply automatically</pre><p>The goal was to balance two requirements that often conflict:</p><blockquote><strong><em>Security and operational stability</em></strong></blockquote><p>But version management alone is not enough to operate an unattended edge device 24 hours a day, 365 days a year.</p><p>In a real edge PC, many other things can go wrong:</p><pre>System clock drifts</pre><pre>DNS configuration changes unexpectedly</pre><pre>Network routes are not restored correctly</pre><pre>Firewall or NAT state becomes inconsistent</pre><pre>A NIC does not recover properly</pre><pre>An update requires a reboot</pre><pre>Container runtime state changes</pre><pre>Only part of the system recovers after a power failure</pre><p>So the design principle for this article is different.</p><p>Instead of trying to guarantee that failures never happen:</p><blockquote><strong><em>Design the system so that it can return to a known-good state when something goes wrong.</em></strong></blockquote><p>One of the main tools I used for this was:</p><pre>systemd timer</pre><h3>1. Booting Successfully Is Not Enough</h3><p>During development, we often verify something like this:</p><pre>Power ON<br>↓<br>Ubuntu boots<br>↓<br>Docker starts<br>↓<br>Azure IoT Edge starts<br>↓<br>Application starts<br>↓<br>Cloud connection established</pre><p>At that point, the system may appear complete.</p><p>For a device that runs unattended 24/7, however, that initial success is not the most important thing.</p><p>The real question is whether the system can return to the same working state:</p><pre>One day later</pre><pre>One week later</pre><pre>One month later</pre><pre>After an update</pre><pre>After a network outage</pre><pre>After a power failure</pre><p>That changed how I thought about the system.</p><p>Instead of focusing only on:</p><blockquote><strong><em>Creating the correct initial state</em></strong></blockquote><p>I also focused on:</p><blockquote><strong><em>Recreating the correct state periodically.</em></strong></blockquote><p>In long-term unattended operation, it is almost impossible to prevent every possible abnormal condition.</p><p>For example:</p><pre>Temporary network failures</pre><pre>Changes on the router or DHCP side</pre><pre>Clock drift</pre><pre>Package updates</pre><pre>Stopped processes</pre><pre>Unexpected reboots</pre><pre>Power failures</pre><p>Some of these events are outside the control of the edge PC itself.</p><p>So the design changed from:</p><pre>Prevent every abnormal condition</pre><p>to:</p><pre>If an abnormal condition occurs,<br>return to the expected state during the next recovery process</pre><p>Conceptually:</p><pre>Normal State<br>             ↑<br>             │<br>          Verify<br>             │<br>        Repair if needed<br>             │<br>             │<br>     Temporary Failure</pre><p>In other words:</p><blockquote><strong><em>Define the expected state, detect deviation from it, and restore it when necessary.</em></strong></blockquote><p>I applied this idea to each maintenance process.</p><h3>2. Do Not Put Everything Into One Huge Maintenance Script</h3><p>One approach I wanted to avoid was something like:</p><pre>Every night at 01:00</pre><pre>Check everything<br>Update everything<br>Reconfigure the network<br>Restart everything<br>Reboot</pre><p>Combining everything into one script may reduce the number of files that need to be managed.</p><p>But when something fails, troubleshooting becomes much more difficult.</p><p>For example:</p><pre>Where exactly did the process fail?</pre><pre>Does one failed step stop everything after it?</pre><pre>Did the network process conflict with an update?</pre><pre>Did a reboot make it difficult to inspect the logs?</pre><p>Instead, I separated maintenance processes according to their responsibilities.</p><p>For example:</p><pre>NTP</pre><pre>NAT</pre><pre>DNS</pre><pre>IoT Edge updates</pre><pre>OS reboot checks</pre><pre>IoT Edge reboot checks</pre><pre>NIC recovery</pre><pre>Route repair</pre><pre>Firewall verification</pre><pre>Diagnostics</pre><p>Each process has its own service and timer.</p><p>This makes the system easier to understand and easier to troubleshoot.</p><h3>3. Separating Responsibilities with systemd Timers</h3><p>For this system, I use standard Linux mechanisms:</p><pre>systemd service<br>+<br>systemd timer</pre><p>The basic relationship is:</p><pre>.timer<br>↓<br>Starts at a defined time or condition</pre><pre>.service<br>↓<br>Performs the actual operation</pre><p>For example:</p><pre>mdlinkage-ntp-sync.timer<br>↓<br>mdlinkage-ntp-sync.service<br>↓<br>NTP synchronization</pre><p>With this structure, I can check whether the timer itself is running:</p><pre>systemctl status xxx.timer</pre><p>And I can inspect logs for only the corresponding operation:</p><pre>journalctl -u xxx.service</pre><p>The important benefit is that it separates:</p><blockquote><strong><em>When something should run</em></strong></blockquote><p>from:</p><blockquote><strong><em>What the process actually does</em></strong></blockquote><p>That separation becomes extremely useful when debugging an unattended device.</p><h3>4. The Maintenance Schedule</h3><p>For this edge PC, the main maintenance processes are distributed across several hours.</p><pre>00:15<br>Scheduled reboot</pre><pre>00:45<br>NTP synchronization<br>NAT verification</pre><pre>01:00<br>DNS verification and recovery</pre><pre>01:30<br>IoT Edge / Moby patch check</pre><pre>02:30<br>Check whether OS updates require a reboot</pre><pre>03:30<br>Check the reboot flag created by<br>IoT Edge / Moby updates</pre><pre>04:30<br>Verify and recover NIC state</pre><p>In addition, immediately after boot, several network-related states are checked again:</p><pre>Route</pre><pre>NAT</pre><pre>Firewall</pre><pre>NIC</pre><pre>Network configuration</pre><p>The important point is:</p><blockquote><strong><em>These processes do not all run at the same time.</em></strong></blockquote><h3>5. Why Maintenance Tasks Are Staggered</h3><p>Imagine that all of the following occur simultaneously:</p><pre>NTP synchronization</pre><pre>Package updates</pre><pre>DNS configuration</pre><pre>Container restart</pre><pre>Network reconfiguration</pre><pre>System reboot</pre><p>Individually, every operation may be valid.</p><p>But when they happen at the same time, they can interfere with one another.</p><p>For example:</p><pre>The network temporarily disconnects</pre><pre>The machine reboots during an update</pre><pre>The NIC restarts while DNS is being checked</pre><pre>The container runtime changes while container health is being verified</pre><p>If something fails, troubleshooting also becomes difficult.</p><p>You are left asking:</p><pre>Was it NTP?</pre><pre>DNS?</pre><pre>An update?</pre><pre>The network?</pre><pre>The reboot?</pre><p>So the schedule looks more like this:</p><pre>Process A<br>↓<br>Wait<br>↓<br>Process B<br>↓<br>Wait<br>↓<br>Process C</pre><p>The key assumption is:</p><blockquote><strong><em>Maintenance processes themselves can become a source of failure.</em></strong></blockquote><p>This is why I deliberately separate them in time.</p><h3>6. 00:15 — Scheduled Reboot</h3><p>The system also performs a scheduled reboot every day at:</p><pre>00:15</pre><p>using a timer such as:</p><pre>scheduled-reboot.timer</pre><p>On an edge PC running continuously, temporary states can gradually accumulate.</p><p>For example:</p><pre>Long-running application state</pre><pre>Runtime state changes</pre><pre>Temporary network stack issues</pre><pre>Unexpected process states</pre><p>A scheduled maintenance window provides an opportunity to periodically return the entire system to a clean boot state.</p><p>But simply rebooting the device is not enough.</p><h3>7. The System Must Recover Automatically After Reboot</h3><p>A scheduled reboot becomes dangerous if the device does not automatically recover afterward.</p><p>For example:</p><pre>Network does not return</pre><pre>Route is missing</pre><pre>Firewall configuration is not restored</pre><pre>NAT rules are missing</pre><pre>NIC remains down</pre><pre>IoT Edge does not start</pre><p>In that case, the scheduled reboot itself becomes the cause of downtime.</p><p>That is why several recovery processes run after boot.</p><p>For example, a timer such as:</p><pre>fix-route.timer</pre><p>checks the routing table after boot.</p><p>If the expected route already exists:</p><pre>OK</pre><p>and the process exits.</p><p>If the route is missing, the script restores the expected state.</p><p>The logic is:</p><pre>Check current state<br>↓<br>If healthy, do nothing<br>↓<br>If unhealthy, repair it</pre><p>rather than:</p><pre>Rewrite the configuration every time</pre><p>This distinction is important.</p><h3>8. Firewall and NAT Are Runtime States Too</h3><p>The same idea applies to firewall and NAT configuration.</p><p>Configuring:</p><pre>nftables</pre><p>during the initial setup is not enough.</p><p>After power failures, network restarts, or other system events, I want to verify that the runtime state is still what I expect.</p><p>For this reason, I use recovery processes conceptually similar to:</p><pre>ensure-nft-filter</pre><pre>ensure-nft-nat</pre><p>The logic is:</p><pre>Check the current rules<br>↓<br>Healthy<br>↓<br>Do nothing</pre><p>or:</p><pre>Check the current rules<br>↓<br>Missing or abnormal<br>↓<br>Restore the expected state</pre><p>The principle here is:</p><blockquote><strong><em>Do not only verify configuration files. Verify what is actually active at runtime.</em></strong></blockquote><h3>9. 00:45 — Synchronizing Time</h3><p>Time synchronization is also important for an edge gateway.</p><p>Significant clock drift can affect:</p><pre>TLS certificates</pre><pre>Log timestamps</pre><pre>Cloud communication</pre><pre>Troubleshooting</pre><pre>Comparing logs across multiple systems</pre><p>During troubleshooting, I may need to compare:</p><pre>Edge PC logs</pre><pre>Network logs</pre><pre>Cloud-side logs</pre><p>If their clocks are inconsistent, reconstructing the sequence of events becomes much more difficult.</p><p>In this configuration, NTP synchronization is performed as a controlled:</p><pre>one-shot</pre><p>operation at defined times rather than relying only on a continuously running daemon.</p><p>The synchronization is also triggered after boot:</p><pre>Boot<br>↓<br>Network Ready<br>↓<br>NTP Sync</pre><p>This means that after a power failure, the device has an opportunity to correct its clock as part of the recovery sequence.</p><h3>10. 01:00 — Periodically Checking DNS</h3><p>DNS is another critical dependency for Azure IoT Edge.</p><p>The network itself may appear healthy:</p><pre>IP connectivity<br>↓<br>OK</pre><pre>DNS resolution<br>↓<br>NG</pre><p>But if DNS resolution fails, the device may still be unable to communicate with Azure IoT Hub.</p><p>From the user’s perspective, the symptom may simply look like:</p><pre>The network is connected,<br>but data is not reaching the cloud.</pre><p>For this reason, DNS is not treated as something that is configured once and forgotten.</p><p>Its expected state is checked periodically.</p><p>It also helps to think about communication in layers:</p><pre>Network<br>↓<br>Route<br>↓<br>DNS<br>↓<br>Cloud</pre><p>Separating the layers makes troubleshooting easier.</p><h3>11. 01:30 — A Dedicated Update Path for IoT Edge</h3><p>At:</p><pre>01:30</pre><p>the device checks for IoT Edge and container runtime patches.</p><p>This is the update process discussed in the previous article.</p><p>Conceptually:</p><pre>Check installed version<br>↓<br>Check candidate version<br>↓<br>Confirm that it remains within<br>the allowed release generation<br>↓<br>Dry-run<br>↓<br>Check dependencies<br>↓<br>Apply patch if conditions are satisfied<br>↓<br>Health check</pre><p>This process does not run at the same time as OS updates or network maintenance.</p><p>I also use:</p><pre>RandomizedDelaySec</pre><p>so that if many edge PCs are deployed, they do not all begin maintenance at exactly the same moment.</p><p>For example:</p><pre>Edge PC A<br>Edge PC B<br>Edge PC C<br>Edge PC D</pre><p>As deployments grow, this becomes increasingly important.</p><p>A maintenance architecture designed for one device should not create a synchronization problem when the fleet grows.</p><h3>12. 02:30 — Reboot Only When the OS Requires It</h3><p>After certain Ubuntu updates, such as kernel or critical package updates, the system may create:</p><pre>/var/run/reboot-required</pre><p>However, I do not reboot immediately after the update.</p><p>The update process finishes first.</p><p>Then, at a separate time:</p><pre>02:30</pre><p>another process checks whether a reboot is actually required.</p><pre>No reboot-required file<br>↓<br>Do nothing</pre><pre>reboot-required exists<br>↓<br>Reboot</pre><p>In other words:</p><blockquote><strong><em>The update process and the reboot decision are separated.</em></strong></blockquote><p>This reduces unnecessary coupling between maintenance tasks.</p><h3>13. 03:30 — Reboots Required by IoT Edge Updates Are Also Separated</h3><p>The same principle is applied to IoT Edge and Moby updates.</p><p>If a patch requires a reboot, the update process creates a flag such as:</p><pre>IoT Edge / Moby Update<br>↓<br>pending-iotedge-reboot</pre><p>Then, at:</p><pre>03:30</pre><p>a separate timer checks the flag.</p><pre>No flag<br>↓<br>Do nothing</pre><pre>Flag exists<br>↓<br>Check conditions<br>↓<br>Reboot</pre><p>The logic also considers the OS-level:</p><pre>reboot-required</pre><p>state so that the system does not reboot multiple times within a short period unnecessarily.</p><p>The architecture therefore becomes:</p><pre>Update<br>↓<br>Flag<br>↓<br>Maintenance Window<br>↓<br>Reboot</pre><p>instead of:</p><pre>Update<br>↓<br>Immediate Reboot</pre><h3>14. 04:30 — Verify the NIC Last</h3><p>Near the end of the maintenance window, the system also checks the:</p><pre>NIC</pre><p>A timer such as:</p><pre>nic-wakeup.timer</pre><p>runs both:</p><pre>After boot</pre><p>and:</p><pre>Daily at 04:30</pre><p>For an edge gateway, the application may be healthy, but if the network interface is not functioning correctly, the system cannot perform its role.</p><p>I therefore treat these as separate layers:</p><pre>Application</pre><pre>Container</pre><pre>Operating System</pre><pre>Network Interface</pre><p>For example:</p><pre>Application healthy</pre><pre>but</pre><pre>NIC unhealthy</pre><p>still means the gateway as a whole is unhealthy.</p><h3>15. Use Both Boot-Time Recovery and Scheduled Maintenance</h3><p>Some timers run at a specific daily time.</p><p>Others also use:</p><pre>OnBootSec</pre><p>so that they can run shortly after the device starts.</p><p>Examples include:</p><pre>NTP</pre><pre>NAT</pre><pre>Route</pre><pre>NIC</pre><pre>Firewall</pre><p>This was important for handling unexpected power failures.</p><p>Imagine a power failure occurs at:</p><pre>00:30</pre><p>The device should not have to wait until the next day’s scheduled maintenance to recover.</p><p>Instead:</p><pre>Power Failure<br>↓<br>Power Restored<br>↓<br>Ubuntu Boot<br>↓<br>Network Ready<br>↓<br>Verify Route<br>↓<br>Verify Firewall / NAT<br>↓<br>Verify NIC<br>↓<br>Synchronize Time<br>↓<br>Application Recovery</pre><p>In other words:</p><blockquote><strong><em>Boot itself becomes a recovery trigger.</em></strong></blockquote><h3>16. Use Persistent=true Selectively</h3><p>systemd timers also support:</p><pre>Persistent=true</pre><p>For example, if a task was scheduled for 01:00 but the PC was powered off at that time, systemd can run the missed task after the next boot.</p><p>That is useful for some processes.</p><p>But it does not make sense for every timer.</p><p>Consider a scheduled reboot.</p><p>If the device was powered off during yesterday’s planned reboot window, there is little value in doing this immediately after the next boot:</p><pre>Yesterday&#39;s reboot was missed<br>↓<br>Reboot immediately after startup</pre><p>So I separate timers into:</p><pre>Tasks whose missed execution<br>should be recovered after boot</pre><pre>and</pre><pre>Tasks whose missed execution<br>should simply be skipped</pre><p>Again, the important question is not:</p><blockquote><em>What systemd option should I enable?</em></blockquote><p>The real question is:</p><blockquote><strong><em>Why does this timer exist, and what behavior is appropriate for that purpose?</em></strong></blockquote><h3>17. Record Results, Not Just Execution</h3><p>On an unattended device, nobody is watching the screen to confirm:</p><pre>Success</pre><p>So the result of every maintenance operation needs to be observable later.</p><p>With systemd, I can inspect logs per service:</p><pre>journalctl -u mdlinkage-ntp-sync.service</pre><p>And I can review timers with:</p><pre>systemctl list-timers --all</pre><p>This shows information such as:</p><pre>When the timer last ran</pre><pre>When it will run next</pre><pre>Whether it is active</pre><p>For example:</p><pre>systemctl list-timers --all | grep -E \<br>&#39;mdlinkage|mdl-|reboot-if&#39;</pre><p>can be used to review maintenance-related timers together.</p><h3>18. Verify the Timers Themselves</h3><p>Creating a timer file does not prove that the maintenance mechanism works.</p><p>I want to verify more than:</p><pre>The timer file exists</pre><p>I also check:</p><pre>Is it enabled?</pre><pre>Is it active?</pre><pre>Is the scheduled time correct?</pre><pre>Did the corresponding service actually run?</pre><pre>Was the exit code successful?</pre><p>For example, during acceptance checks I verify that entries such as:</p><pre>00:15 Scheduled Reboot</pre><pre>00:45 NTP</pre><pre>00:45 NAT</pre><pre>01:00 DNS</pre><pre>01:30 IoT Edge Patch</pre><pre>02:30 OS Reboot Check</pre><pre>03:30 IoT Edge Reboot Check</pre><pre>04:30 NIC Wakeup</pre><p>are actually registered at the expected times.</p><p>After boot, I also verify evidence that processes such as:</p><pre>Route</pre><pre>NTP</pre><pre>NAT</pre><pre>Firewall</pre><pre>NIC</pre><p>actually executed during the current boot session.</p><p>The principle is:</p><blockquote><strong><em>Do not only check whether the configuration exists. Check evidence that it actually ran.</em></strong></blockquote><h3>19. Maintenance Operations Should Be Safe to Run Repeatedly</h3><p>Another principle I applied to recovery processes is:</p><pre>Running the process against<br>an already healthy system<br>should not break it</pre><p>For example, if a route is already correct:</p><pre>OK: route already correct</pre><p>and the process exits.</p><p>Similarly, if the expected firewall table and rules are already healthy:</p><pre>already healthy</pre><p>and nothing is changed.</p><p>The timer therefore behaves like:</p><pre>Timer runs<br>↓<br>Check current state<br>↓<br>Healthy<br>↓<br>Exit</pre><p>or:</p><pre>Timer runs<br>↓<br>Check current state<br>↓<br>Unhealthy<br>↓<br>Repair</pre><p>rather than:</p><pre>Timer runs<br>↓<br>Forcefully rewrite everything</pre><p>This reduces the chance that the maintenance mechanism itself becomes a new source of failure.</p><h3>But Scheduled Maintenance Cannot Detect Everything</h3><p>With these mechanisms, the edge PC can verify many aspects of its own health.</p><p>For example:</p><pre>Time</pre><pre>DNS</pre><pre>Route</pre><pre>Firewall</pre><pre>NAT</pre><pre>NIC</pre><pre>IoT Edge</pre><pre>Container Runtime</pre><pre>Reboot Requirements</pre><p>But there is one important limitation.</p><p>What happens if the edge PC completely freezes?</p><pre>Edge PC<br>↓<br>Freeze<br>↓<br>CPU / Kernel / Network stop</pre><p>At that point, the device’s own:</p><pre>Timers</pre><pre>Health checks</pre><pre>Log collection</pre><pre>Recovery scripts</pre><p>also stop.</p><p>This is why internal recovery alone is not sufficient.</p><h3>20. Self-Recovery and External Monitoring Have Different Roles</h3><p>I eventually divided the reliability architecture into two responsibilities.</p><p>The edge PC itself is responsible for:</p><pre>Edge PC<br>↓<br>Maintain the expected state<br>↓<br>Recover automatically when possible</pre><p>An external monitoring device is responsible for:</p><pre>External Monitor<br>↓<br>Check from outside<br>whether the Edge PC is actually alive</pre><p>The external monitor can observe the device through multiple paths, such as:</p><pre>Ping</pre><pre>Heartbeat</pre><pre>Telemetry</pre><pre>rsyslog</pre><pre>netconsole</pre><p>It is especially useful to separate an application-level heartbeat from lower-level signals such as kernel logging.</p><p>This makes it easier to distinguish between situations such as:</p><pre>The application stopped,<br>but the kernel is still alive</pre><pre>Only the network stopped</pre><pre>The entire operating system froze</pre><pre>A kernel crash occurred</pre><p>I will cover this external monitoring architecture in more detail in the next article.</p><h3>21. Monitoring Should Not Destabilize the System Being Monitored</h3><p>More monitoring is not always better.</p><p>Imagine repeatedly running commands such as:</p><pre>docker inspect</pre><pre>smartctl</pre><pre>systemctl</pre><pre>powertop</pre><pre>many short-lived processes</pre><p>every few seconds.</p><p>Monitoring itself may begin to affect:</p><pre>CPU load</pre><pre>Power states</pre><pre>Disk access</pre><pre>Runtime behavior</pre><p>This is particularly important when investigating freezes.</p><p>The monitoring process itself should not significantly change the conditions you are trying to observe.</p><p>For that reason, I divide telemetry collection according to the cost of collecting each type of information.</p><p>For example:</p><pre>Every 5 seconds<br>↓<br>Lightweight heartbeat / telemetry</pre><pre>Every 60 seconds<br>↓<br>C-state / PSI / vmstat /<br>IRQ / Docker state</pre><pre>Every 10 minutes<br>↓<br>Network / filesystem /<br>NTP / SMART</pre><pre>Every hour<br>↓<br>More detailed SMART information</pre><p>The principle is:</p><blockquote><strong><em>Collect the information you need, but avoid changing the system too much just by monitoring it.</em></strong></blockquote><h3>22. Putting the Architecture Together</h3><p>For this 24/7 unattended edge device, I think about reliability in three layers.</p><pre>1. Prevention</pre><pre>Version management<br>Security updates<br>Scheduled maintenance<br>Staggered maintenance windows<br></pre><pre>2. Self-Recovery</pre><pre>Scheduled reboot<br>Route verification after boot<br>Firewall / NAT verification<br>DNS verification<br>NTP synchronization<br>NIC recovery<br>Conditional reboot<br></pre><pre>3. External Detection</pre><pre>Ping<br>Heartbeat<br>Telemetry<br>rsyslog<br>netconsole</pre><p>The overall strategy is:</p><pre>Make failures less likely<br>↓<br>If something fails, recover<br>↓<br>If recovery fails, detect it externally</pre><h3>Conclusion: 24/7 Reliability Does Not Come From One Powerful Mechanism</h3><p>There is no single special technology making this system reliable.</p><p>Most of the mechanisms are standard Linux tools:</p><pre>systemd</pre><pre>systemd timer</pre><pre>journal</pre><pre>nftables</pre><pre>Shell scripts</pre><pre>Health checks</pre><p>The important part is how they are combined.</p><p>For every possible failure, I need to think about:</p><pre>What type of failure is this?</pre><pre>At which layer should it be detected?</pre><pre>When should the system check for it?</pre><pre>How far should automatic recovery go?</pre><pre>At what point should responsibility move<br>to external monitoring?</pre><p>That system-level design is much more important than any individual command or timer.</p><p>For unattended 24/7 operation:</p><blockquote><strong><em>Reliability is not only about keeping the system from stopping. It is also about being able to return to a known-good state — and detecting when it cannot.</em></strong></blockquote><h3>Next: Detecting an Edge PC Freeze From the Outside</h3><p>At this point, the edge PC itself has:</p><pre>Scheduled maintenance</pre><pre>State verification</pre><pre>Self-recovery</pre><pre>Controlled reboot mechanisms</pre><p>But if the entire edge PC freezes, all monitoring running inside the device stops as well.</p><p>So in the next article, I will introduce a different approach:</p><blockquote><strong><em>Using a separate Linux device to monitor the edge PC from the outside.</em></strong></blockquote><p>In my actual setup, I collect signals through multiple paths and intervals:</p><pre>1-second Ping</pre><pre>5-second Heartbeat</pre><pre>5-second Telemetry</pre><pre>60-second detailed Telemetry</pre><pre>10-minute Health information</pre><pre>1-hour detailed SMART information</pre><pre>rsyslog</pre><pre>netconsole</pre><p>The goal is not simply to collect as much information as possible.</p><p>Another important requirement is:</p><blockquote><strong><em>Keep the monitoring overhead low enough that the monitoring process itself does not interfere with freeze investigation.</em></strong></blockquote><p>The next article will focus on one question:</p><blockquote><strong><em>When the monitored device completely stops, what information needs to remain outside the device to help us understand what happened?</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d0d8f80274c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#10. Keeping Azure IoT Edge on a Validated Release Line While Still Taking Patches]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/10-keeping-azure-iot-edge-on-a-validated-release-line-while-still-taking-patches-5a7654354e45?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a7654354e45</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[azure-iot-edge]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 09:35:21 GMT</pubDate>
            <atom:updated>2026-09-24T09:35:21.035Z</atom:updated>
            <content:encoded><![CDATA[<h3>Update Design for 24/7 Unattended Ubuntu Edge Devices</h3><p>I work on improving the security and reliability of edge/cloud environments, particularly for systems that must continue operating in demanding field conditions.</p><p>Some of the main topics I focus on are:</p><ul><li>Recovery after power loss</li><li>Local data retention during cloud outages</li><li>Communication failure detection</li><li>Safe patch management</li><li>Long-term unattended operation</li></ul><p>In the previous article, I described how I moved an Edge PC from Windows 11 to Linux to isolate the cause of system freezes.</p><p>The validation process looked roughly like this:</p><pre>Windows 11<br>↓<br>Boot Linux from USB<br>↓<br>Run a minimal Linux environment<br>↓<br>Install the Edge application<br>↓<br>Test it in the actual field environment</pre><p>Once the application was running successfully on Linux, another question became important:</p><blockquote><strong><em>How should software updates be managed on an unattended device that is expected to run 24/7?</em></strong></blockquote><p>Software should not remain outdated forever.</p><p>We want:</p><pre>Security fixes<br>Bug fixes<br>Runtime fixes</pre><p>But automatically installing every new version introduces another type of risk:</p><pre>Update<br>↓<br>Package version changes<br>↓<br>Dependencies change<br>↓<br>The validated configuration changes<br>↓<br>Something suddenly stops working in the field</pre><p>So the update policy I adopted was:</p><blockquote><strong><em>Keep critical components such as Azure IoT Edge on a validated release line, while still allowing necessary patches and security updates.</em></strong></blockquote><p>This article explains how I approached that balance on Ubuntu.</p><h3>1. Why I Do Not Simply Update Everything to the Latest Version</h3><p>For an ordinary PC, the following approach is perfectly natural:</p><pre>New version released<br>↓<br>Update<br>↓<br>Receive new features and bug fixes</pre><p>But the systems I am dealing with are not ordinary desktop PCs.</p><p>The objective is closer to this:</p><blockquote><strong><em>Keep a defined Edge application running in a predictable state for as long as possible.</em></strong></blockquote><p>There are several layers involved:</p><pre>Ubuntu<br>↓<br>Container Runtime<br>↓<br>Azure IoT Edge<br>↓<br>edgeAgent / edgeHub<br>↓<br>Edge Application</pre><p>If components such as the following change automatically:</p><pre>Azure IoT Edge<br>Container Runtime<br>OS packages<br>Kernel<br>Application</pre><p>then the configuration running today may no longer be the configuration that was validated yesterday.</p><p>For an unattended system, that matters.</p><p>My basic principle therefore became:</p><blockquote><strong><em>Do not change a validated software combination without a reason.</em></strong></blockquote><h3>2. “Latest” and “Secure” Are Not the Same Thing</h3><p>Version control does not mean simply disabling updates.</p><p>If updates are completely stopped, we also stop receiving:</p><pre>Security fixes<br>Bug fixes<br>Runtime fixes</pre><p>That creates one risk:</p><pre>Prioritize stability<br>↓<br>Stop updates<br>↓<br>Security exposure increases</pre><p>But blindly updating everything creates another:</p><pre>Always install the latest version<br>↓<br>Move to an unvalidated software version<br>↓<br>The field configuration changes<br>↓<br>Availability risk increases</pre><p>The real question is therefore not:</p><blockquote><em>Security or availability?</em></blockquote><p>It is:</p><blockquote><strong><em>How do we manage both security risk and availability risk?</em></strong></blockquote><p>I created a boundary between two types of updates.</p><pre>Security fixes / bug-fix patches<br>        ↓<br>      Allowed</pre><pre>Changes to a new release family<br>        ↓<br>Not automatically allowed</pre><p>This distinction became the foundation of the update design.</p><h3>3. Why Azure IoT Edge Requires Stricter Update Control</h3><p>Azure IoT Edge does not operate in isolation.</p><p>In this environment, the overall path looks more like:</p><pre>Device<br>↓<br>Edge Application<br>↓<br>Container<br>↓<br>edgeHub / edgeAgent<br>↓<br>IoT Edge Security Subsystem<br>↓<br>Container Runtime<br>↓<br>Ubuntu<br>↓<br>Network<br>↓<br>Azure IoT Hub</pre><p>Changing just one part of this stack can affect other layers.</p><p>An Azure IoT Edge update may interact with:</p><ul><li>Container Runtime versions</li><li>Package dependencies</li><li>Container behavior</li><li>Networking</li><li>Runtime services</li><li>Edge modules</li></ul><p>On a normal workstation, someone can notice a problem and fix it.</p><p>On an unattended Edge Gateway, nobody may be looking at the screen.</p><p>So I treat:</p><pre>Azure IoT Edge<br>Container Runtime</pre><p>more conservatively than ordinary OS packages.</p><h3>4. Ubuntu Security Updates Are Still Enabled</h3><p>I did <strong>not</strong> freeze the entire Ubuntu installation.</p><p>Long-term operation without security updates would create its own risk.</p><p>The policy is closer to this:</p><pre>Ubuntu updates<br>Ubuntu security updates<br>        ↓<br>      Allowed</pre><pre>Unvalidated IoT Edge /<br>Container Runtime generation changes<br>        ↓<br>      Restricted</pre><p>Ubuntu uses unattended-upgrades, with periodic update processing enabled.</p><p>For example:</p><pre>APT::Periodic::Update-Package-Lists &quot;1&quot;;<br>APT::Periodic::Download-Upgradeable-Packages &quot;1&quot;;<br>APT::Periodic::AutocleanInterval &quot;7&quot;;<br>APT::Periodic::Unattended-Upgrade &quot;1&quot;;</pre><p>The allowed Ubuntu update sources include:</p><pre>Ubuntu<br>Ubuntu Security<br>Ubuntu Updates<br>ESM Apps Security<br>ESM Infra Security</pre><p>Conceptually:</p><pre>Ubuntu 24.04 LTS<br>│<br>├─ Security Updates        → Apply<br>│<br>├─ Stable OS Updates       → Apply<br>│<br>└─ Critical Runtime<br>     │<br>     ├─ Same release-line patch → Conditionally apply<br>     │<br>     └─ Release-line change     → Do not apply automatically</pre><p>The intention is not to freeze the OS.</p><p>It is to prevent critical infrastructure components from silently moving outside the validated range.</p><h3>5. Package Updates and Reboots Are Separate Decisions</h3><p>Another important distinction is:</p><blockquote><strong><em>Installing an update and rebooting the device are not the same operation.</em></strong></blockquote><p>Automatic rebooting is disabled:</p><pre>Unattended-Upgrade::Automatic-Reboot &quot;false&quot;;</pre><p>Instead of:</p><pre>Update completed<br>↓<br>Reboot required<br>↓<br>Immediate reboot</pre><p>the device behaves like this:</p><pre>Package update<br>↓<br>Check whether reboot is required<br>↓<br>/var/run/reboot-required<br>↓<br>Reboot only during the maintenance window</pre><p>A dedicated systemd timer checks this condition at approximately:</p><pre>02:30</pre><p>and reboots only when necessary.</p><p>This prevents package management from deciding by itself when a production Edge Gateway should disappear from the network.</p><h3>6. Pin the Release Family, Not One Exact Version Forever</h3><p>For Azure IoT Edge and the container runtime, I do not permanently freeze one exact version.</p><p>In this tested configuration, the validated baseline is:</p><pre>Azure IoT Edge 1.6.x<br>moby-containerd 2.2.x<br>moby-engine 29.x</pre><p>For example:</p><pre>Azure IoT Edge</pre><pre>1.6.0<br>↓<br>1.6.x</pre><p>can be considered for automated patching.</p><p>But:</p><pre>1.6.x<br>↓<br>1.7.x</pre><p>or:</p><pre>1.6.x<br>↓<br>2.x</pre><p>is treated as a release-line change and is not performed automatically.</p><p>The same concept applies to the container runtime:</p><pre>moby-containerd 2.2.x<br>        ↓<br>Same 2.2 release line allowed</pre><p>and:</p><pre>moby-engine 29.x<br>        ↓<br>Same 29.x release line allowed</pre><p>The key point is:</p><blockquote><strong><em>The goal is not to keep one exact version forever. The goal is to define a validated range within which controlled patching is allowed.</em></strong></blockquote><h3>7. Using APT Pinning to Define the Allowed Range</h3><p>The first layer of protection is APT pinning.</p><p>For example, Azure IoT Edge packages can be restricted like this:</p><pre>Package: aziot-edge aziot-identity-service aziot-keyd aziot-certd aziot-tpmd aziot-edged<br>Pin: version 1.5*<br>Pin-Priority: -10</pre><pre>Package: aziot-edge aziot-identity-service aziot-keyd aziot-certd aziot-tpmd aziot-edged<br>Pin: version 1.6*<br>Pin-Priority: 1001</pre><pre>Package: aziot-edge aziot-identity-service aziot-keyd aziot-certd aziot-tpmd aziot-edged<br>Pin: version 1.7*<br>Pin-Priority: -10</pre><pre>Package: aziot-edge aziot-identity-service aziot-keyd aziot-certd aziot-tpmd aziot-edged<br>Pin: version 2.*<br>Pin-Priority: -10</pre><p>Conceptually:</p><pre>1.5.x → Do not move there automatically<br>1.6.x → Validated release line<br>1.7.x → Do not move there automatically<br>2.x   → Do not move there automatically</pre><p>The container runtime follows the same principle.</p><pre>moby-containerd 2.2* → Allowed</pre><pre>1.*<br>2.0*<br>2.1*<br>2.3*<br>3.*<br>→ Not automatically allowed</pre><p>And:</p><pre>moby-engine 29* → Allowed<br>moby-engine 30* → Not automatically allowed</pre><p>This creates an explicit boundary around the validated software family.</p><h3>8. I Do Not Rely on APT Pinning Alone</h3><p>Pinning is only the first layer.</p><p>A dedicated update script also compares:</p><pre>Installed Version</pre><p>with:</p><pre>APT Candidate Version</pre><p>For example:</p><pre>Installed<br>1.6.3</pre><pre>Candidate<br>1.6.4</pre><p>is recognized as:</p><pre>Same 1.6 release line<br>↓<br>Patch candidate</pre><p>But:</p><pre>Installed<br>1.6.x</pre><pre>Candidate<br>1.7.x</pre><p>becomes:</p><pre>Release-line change<br>↓<br>Exclude from automatic update</pre><p>The same check is performed for container runtime packages.</p><p>This means the decision does not depend only on how the APT repository happens to be configured.</p><p>The update process itself understands the allowed version boundary.</p><h3>9. Detecting a New Release Without Automatically Installing It</h3><p>Blocking an upgrade is useful.</p><p>But silently ignoring it is not enough.</p><p>When a candidate version outside the validated release family is detected, the system creates a flag such as:</p><pre>/var/lib/edge-gateway/pending-genupgrade</pre><p>The flow is:</p><pre>Check candidate version<br>↓<br>Candidate exceeds validated release family<br>↓<br>Do not update automatically<br>↓<br>Create pending-genupgrade flag</pre><p>This means the system records:</p><blockquote><strong><em>A newer release family is available and needs evaluation.</em></strong></blockquote><p>That version can later be tested in a validation environment.</p><p>If it passes testing, the allowed version range can be deliberately changed.</p><p>This turns a blocked update into a controlled engineering decision instead of simply ignoring it forever.</p><h3>10. Even Same-Line Patches Go Through a Dry Run</h3><p>A patch being in the same release family does not automatically make it safe.</p><p>Before installation, the update script performs an APT simulation:</p><pre>apt-get -s install --only-upgrade ...</pre><p>The simulation checks more than whether APT <em>can</em> perform the update.</p><p>It checks whether the update would:</p><pre>Install new packages</pre><pre>Remove existing packages</pre><pre>Cause a downgrade</pre><pre>Upgrade unrelated packages</pre><p>Internally, I treat the desired state as:</p><pre>CHAIN-ZERO</pre><p>In other words:</p><blockquote><strong><em>The intended packages should change, and nothing else should be pulled into the update chain unexpectedly.</em></strong></blockquote><h3>11. A Patch Is Rejected If It Changes More Than Expected</h3><p>Suppose the intention is to patch Azure IoT Edge.</p><p>If the simulation produces something like:</p><pre>IoT Edge update</pre><pre>+</pre><pre>New package installation</pre><pre>+</pre><pre>Unrelated package upgrade</pre><pre>+</pre><pre>Package removal</pre><p>the update is not applied.</p><p>The expected result is closer to:</p><pre>Update target<br>↓<br>Only the explicitly selected<br>IoT Edge / Runtime packages</pre><p>This is important because:</p><pre>Patch version</pre><p>does not automatically mean:</p><pre>Low operational risk</pre><p>Instead, I check:</p><pre>Same release family?<br>↓<br>Any dependency changes?<br>↓<br>Any impact on unrelated packages?</pre><p>The important question is not just:</p><blockquote><em>What is the new version number?</em></blockquote><p>It is:</p><blockquote><strong><em>What exactly is APT about to change on this device?</em></strong></blockquote><h3>12. IoT Edge Uses Its Own Update Route</h3><p>Critical Edge components are not simply handed over to the normal Ubuntu update process.</p><p>The dedicated route manages packages such as:</p><pre>aziot-edge<br>aziot-identity-service<br>aziot-keyd<br>aziot-certd<br>aziot-tpmd<br>aziot-edged</pre><pre>moby-engine<br>moby-containerd<br>moby-runc</pre><p>The flow looks like this:</p><pre>Check installed version<br>↓<br>Check candidate version<br>↓<br>Check release family<br>↓<br>Block release-line changes<br>↓<br>Dry-run same-line patches<br>↓<br>Verify CHAIN-ZERO<br>↓<br>Update selected packages only<br>↓<br>Run health checks</pre><p>This update process is triggered by a systemd timer around:</p><pre>01:30</pre><p>I also use:</p><pre>RandomizedDelaySec=300</pre><p>to reduce the chance of multiple maintenance tasks starting at exactly the same moment.</p><h3>13. If a Generation Change Appears, Become Even More Conservative</h3><p>There is another safeguard.</p><p>If any package presents a candidate outside the validated release family, I do not blindly continue the normal IoT Edge/Moby update sequence.</p><p>The system first creates:</p><pre>pending-genupgrade</pre><p>Then it extracts only same-release-line aziot-* patch candidates and performs the dependency simulation again.</p><p>The logic becomes:</p><pre>Release-line change detected<br>↓<br>Stop normal update route<br>↓<br>Create pending-genupgrade<br>↓<br>Extract same-line IoT Edge patches only<br>↓<br>Dry-run<br>↓<br>No unexpected dependency impact?<br>↓<br>Apply patch</pre><pre>Otherwise<br>↓<br>Skip the update for that maintenance cycle</pre><p>The reason is simple:</p><blockquote><strong><em>If part of the software stack is already indicating an unexpected generation change, I do not want related components to move forward casually.</em></strong></blockquote><h3>14. Why Be This Conservative?</h3><p>This may sound excessively cautious for software updates.</p><p>But the operational model is different from a normal PC.</p><p>On a workstation:</p><pre>Update<br>↓<br>Problem occurs<br>↓<br>User notices<br>↓<br>User fixes it</pre><p>On an unattended Edge Gateway:</p><pre>Update<br>↓<br>One component fails<br>↓<br>Data transfer stops<br>↓<br>Nobody is on site</pre><p>The priority therefore changes.</p><p>For this type of system:</p><blockquote><strong><em>Successfully installing an update is less important than ensuring that the device can still perform its intended role after the update.</em></strong></blockquote><p>At the same time, permanently disabling security updates would not be acceptable either.</p><p>So the final balance becomes:</p><pre>Take patches<br>        +<br>Block unvalidated release-line changes<br>        +<br>Block unexpected dependency changes<br>        +<br>Verify operation after updating</pre><p>That is how I approach the balance between:</p><blockquote><strong><em>Security and availability</em></strong></blockquote><p>For Edge device design, deciding where this boundary should be is one of the first architectural decisions to make.</p><h3>15. “apt-get Succeeded” Does Not Mean the Edge Gateway Is Healthy</h3><p>An update command returning successfully is not enough.</p><p>After a patch is installed, the system automatically performs health checks.</p><p>For example:</p><pre>aziot-edged is active</pre><pre>docker is active</pre><pre>iotedge system status contains no:<br>fatal<br>failed<br>inactive<br>stopped<br>unhealthy</pre><pre>edgeAgent is Up</pre><pre>edgeHub is Up</pre><p>The system also verifies DNS resolution from inside the edgeHub container.</p><p>So the sequence becomes:</p><pre>Update complete<br>↓<br>Check services<br>↓<br>Check IoT Edge runtime<br>↓<br>Check edgeAgent / edgeHub<br>↓<br>Check DNS from inside the container</pre><p>If a failure is detected, diagnostic information such as the following is collected:</p><pre>journalctl -u aziot-edged</pre><pre>journalctl -u docker</pre><pre>docker ps -a</pre><p>Cloud connectivity is also checked separately.</p><p>Because some field networks may block standard AMQP traffic, this environment uses HTTPS / WebSockets over TCP 443 as an important cloud connectivity path.</p><p>For example:</p><pre>iotedge check --verbose</pre><p>can be used to verify checks such as:</p><pre>module network can connect to upstream HTTPS / WebSockets</pre><p>The overall acceptance flow therefore becomes:</p><pre>Package update succeeded<br>↓<br>Runtime healthy<br>↓<br>Containers healthy<br>↓<br>DNS healthy<br>↓<br>Cloud connectivity healthy</pre><p>Only then do I consider the Edge Gateway operationally healthy.</p><h3>16. Do Not Reboot Immediately After Updating IoT Edge</h3><p>Azure IoT Edge or Moby updates do not trigger an immediate reboot.</p><p>Instead:</p><pre>IoT Edge / Moby update<br>↓<br>pending-iotedge-reboot<br>↓<br>Wait<br>↓<br>03:30<br>↓<br>Reboot if the flag exists</pre><p>There is another condition.</p><p>If Ubuntu already has:</p><pre>/var/run/reboot-required</pre><p>the IoT Edge reboot process does not perform another reboot.</p><p>This avoids situations where:</p><pre>OS reboot<br>↓<br>Device starts<br>↓<br>IoT Edge reboot</pre><p>happen back-to-back.</p><p>The maintenance operations are intentionally separated.</p><p>For example:</p><pre>01:30<br>IoT Edge / Moby patch update</pre><pre>02:30<br>Check OS reboot-required</pre><pre>03:30<br>Check IoT Edge / Moby reboot flag</pre><p>The goal is not only to control updates.</p><p>It is also to:</p><blockquote><strong><em>Prevent maintenance operations from colliding with each other.</em></strong></blockquote><p>Even perfectly valid operations can become a problem if they all occur simultaneously:</p><pre>Update<br>Reboot<br>Network maintenance<br>Container restart</pre><p>I will cover this systemd timer maintenance scheduling strategy in more detail in another article.</p><h3>17. The Final Update Policy</h3><p>The resulting policy looks roughly like this:</p><pre>Ubuntu package list updates<br>        ↓<br>      Allowed</pre><pre>Ubuntu security updates<br>        ↓<br>      Allowed</pre><pre>Ubuntu stable updates<br>        ↓<br>      Allowed</pre><pre>Immediate reboot after update<br>        ↓<br>   Not allowed<br></pre><pre>Azure IoT Edge 1.6.x patches<br>        ↓<br>Conditionally allowed</pre><pre>Azure IoT Edge release-line changes<br>        ↓<br>Not automatically allowed<br></pre><pre>moby-containerd 2.2.x patches<br>        ↓<br>Conditionally allowed</pre><pre>moby-containerd release-line changes<br>        ↓<br>Not automatically allowed<br></pre><pre>moby-engine 29.x patches<br>        ↓<br>Conditionally allowed</pre><pre>moby-engine release-line changes<br>        ↓<br>Not automatically allowed</pre><p>For the IoT Edge update route, multiple checks are performed:</p><pre>APT Pinning<br>↓<br>Compare Installed / Candidate versions<br>↓<br>Detect release-line changes<br>↓<br>Dry-run<br>↓<br>No new packages<br>No removed packages<br>No downgrades<br>No unrelated upgrades<br>↓<br>Apply patch<br>↓<br>Health Check<br>↓<br>Set reboot flag<br>↓<br>Reboot during maintenance window</pre><p>This is deliberately more restrictive than a typical desktop update policy.</p><h3>18. Version Control Also Makes Troubleshooting Easier</h3><p>There is another advantage to this approach.</p><p>Imagine deploying Edge PCs across several sites:</p><pre>Device A<br>IoT Edge Version A</pre><pre>Device B<br>IoT Edge Version B</pre><pre>Device C<br>IoT Edge Version C</pre><p>When the same problem appears, troubleshooting quickly becomes complicated.</p><p>You have to ask:</p><pre>Hardware difference?</pre><pre>Ubuntu difference?</pre><pre>Kernel difference?</pre><pre>IoT Edge difference?</pre><pre>Container Runtime difference?</pre><pre>Application difference?</pre><p>But if the baseline is standardized:</p><pre>Ubuntu<br>IoT Edge<br>Container Runtime<br>Application</pre><p>there are fewer variables.</p><p>The same applies to a device that suddenly fails after previously operating normally.</p><p>If you know:</p><pre>The IoT Edge release family did not change.</pre><pre>The Container Runtime release family did not change.</pre><p>you can more quickly investigate other areas:</p><pre>Network<br>Cloud<br>External device<br>Application<br>Hardware<br>Power</pre><p>So version management is not only about stability.</p><blockquote><strong><em>It is also a troubleshooting strategy.</em></strong></blockquote><h3>What Comes Next — Designing an Edge Device for 24/7 Unattended Operation</h3><p>At this point, the software update model looks like this:</p><pre>Ubuntu<br>↓<br>Continue necessary updates</pre><pre>Azure IoT Edge / Container Runtime<br>↓<br>Stay within validated release families</pre><pre>Patches<br>↓<br>Apply only when defined conditions are satisfied</pre><pre>Reboots<br>↓<br>Execute during controlled maintenance windows</pre><p>This reduces the risk of the software configuration changing unexpectedly.</p><p>But version management alone is not enough for true 24/7 unattended operation.</p><p>An Edge Gateway can still experience:</p><pre>Network failure</pre><pre>DNS failure</pre><pre>Loss of cloud connectivity</pre><pre>Stopped containers</pre><pre>Clock drift</pre><pre>Partial recovery after reboot</pre><pre>Failure to return to a healthy state after power loss</pre><p>So the next question is:</p><blockquote><strong><em>How should the entire system be designed so that an unattended Edge device can continue operating reliably 24/7?</em></strong></blockquote><p>In the next article, I will look at the broader operational design:</p><pre>Periodic maintenance<br>↓<br>Distribute tasks with systemd timers<br>↓<br>Health monitoring<br>↓<br>Automatic recovery<br>↓<br>External detection when self-recovery fails</pre><p>This moves the discussion from <strong>software version control</strong> to <strong>system-level reliability design for unattended Edge devices</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a7654354e45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#9. From Windows 11 to Linux — Isolating the Cause of Edge PC Freezes at the OS Level]]></title>
            <link>https://medium.com/@y3kdmdrbaunib/9-from-windows-11-to-linux-isolating-the-cause-of-edge-pc-freezes-at-the-os-level-39a9cbcdb77a?source=rss-824da098e1fb------2</link>
            <guid isPermaLink="false">https://medium.com/p/39a9cbcdb77a</guid>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[azure-iot-edge]]></category>
            <dc:creator><![CDATA[Secure Edge Ops]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 09:17:23 GMT</pubDate>
            <atom:updated>2026-09-23T09:18:13.651Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>I work on improving <strong>security and reliability in medical edge/cloud environments</strong>, especially for systems that must continue operating under challenging field conditions.</p><p>Some of the main topics I focus on are:</p><ul><li>Recovery after unexpected power loss</li><li>Data retention during offline periods</li><li>Network disconnection detection</li><li>Safe software and security patching</li><li>Long-term unattended operation</li></ul><p>In previous tests, I tried several approaches to reduce freezes on a Windows 11-based Edge PC:</p><ul><li>Removing unnecessary drivers</li><li>Reviewing the graphics driver</li><li>Preventing unwanted driver updates through Windows Update</li><li>Disabling unnecessary devices</li></ul><p>These changes improved stability.</p><p>However, one question remained:</p><blockquote><strong><em>Were the drivers really the root cause?</em></strong></blockquote><p>No matter how much we simplify Windows, there are still components that cannot easily be removed:</p><pre>Windows Kernel<br>Power Management<br>Default Drivers<br>Background Services<br>Automatic Maintenance<br>Security Components</pre><p>So the next step was to change one of the largest variables in the system:</p><blockquote><strong><em>Replace Windows 11 with Linux and observe whether the same freeze still occurs.</em></strong></blockquote><p>But I did not immediately migrate the entire system to Linux.</p><p>Instead, I introduced changes gradually:</p><pre>Boot Linux from USB<br>↓<br>Run only a minimal Linux environment<br>↓<br>Install the Edge Application<br>↓<br>Test the complete system onsite</pre><p>The purpose was simple:</p><blockquote><strong><em>Change one condition at a time and observe when the problem appears.</em></strong></blockquote><h3>1. Why Move from Windows 11 to Linux?</h3><p>Reducing the number of Windows drivers changed the frequency of the freezes.</p><p>That was useful information, but it still did not prove that a specific driver was responsible.</p><p>Windows includes many components that may influence system stability:</p><pre>Windows Update<br>Power Management<br>PnP / Device Drivers<br>Graphics Stack<br>Background Services<br>Security Features<br>Automatic Maintenance</pre><p>Even after removing unnecessary drivers, there was still a possibility that the behavior of Windows itself was contributing to the problem.</p><p>So I designed a simple comparison:</p><pre>Same hardware<br>Same application eventually<br>Different operating system</pre><p>If the same PC behaves like this:</p><pre>Windows → Freeze<br>Linux   → Stable</pre><p>then the investigation can focus more heavily on the software side:</p><pre>OS<br>Drivers<br>Power Management<br>Kernel behavior</pre><p>On the other hand, if the result is:</p><pre>Windows → Freeze<br>Linux   → Freeze</pre><p>then the problem may exist at a lower layer:</p><pre>Hardware<br>BIOS<br>Firmware<br>Power</pre><p>This does not immediately identify the root cause.</p><p>But it significantly narrows the investigation.</p><h3>2. Why I Did Not Install Linux on the SSD Immediately</h3><p>When changing operating systems, one option is to erase the internal SSD and install Linux immediately.</p><p>For troubleshooting, however, that would introduce too many changes at once.</p><p>Instead, I first booted Linux from a USB drive.</p><p>The configuration looked like this:</p><pre>LIVA Z<br>│<br>├── Internal SSD<br>│   └── Windows 11<br>│<br>└── USB Drive<br>    └── Linux</pre><p>The physical hardware remained unchanged.</p><p>Only the operating system changed.</p><p>This allowed me to compare Windows and Linux while keeping the following components identical:</p><pre>CPU<br>Memory<br>SSD<br>NIC<br>Graphics Device<br>Motherboard</pre><p>That was important because the purpose of this test was not yet to build the final production environment.</p><p>The goal was to isolate the OS layer.</p><h3>3. First Test: Boot Linux from USB</h3><p>At this stage, I did <strong>not</strong> install the actual Edge Application.</p><p>I first wanted to answer a much simpler question:</p><blockquote><strong><em>Does the PC still freeze when it is running only Linux?</em></strong></blockquote><p>The environment was close to:</p><pre>Hardware<br>↓<br>Linux<br>↓<br>Standard Drivers</pre><p>No production Edge Application.</p><p>No Azure IoT Edge.</p><p>No application containers.</p><p>No additional monitoring tools.</p><p>By intentionally keeping the environment simple, I could observe the behavior of the hardware and Linux without the additional application stack.</p><p>If the system remained stable in this state, it would at least tell me that:</p><blockquote><strong><em>The hardware does not immediately fail simply because the machine is running.</em></strong></blockquote><p>It would not completely eliminate hardware as a possible cause, but it would provide an important new data point.</p><h3>4. Next Step: Install a Minimal Linux Environment</h3><p>After the USB-based test showed no immediate problems, the next step was to install Linux on the internal SSD.</p><p>The operating system used for the test was:</p><pre>Ubuntu 24.04 LTS</pre><p>Again, the important part was not to install everything immediately.</p><p>I started with the operating system itself.</p><pre>LIVA Z<br>↓<br>Ubuntu</pre><p>At this stage, I checked basic behavior such as:</p><ul><li>Does the system boot reliably?</li><li>Can it reboot repeatedly?</li><li>Is the network stable?</li><li>Can it remain running for extended periods?</li><li>Does the system freeze?</li></ul><p>This becomes the new baseline.</p><h3>5. Observe Stability with the Minimum Configuration</h3><p>The first Linux configuration was intentionally kept as small as possible.</p><p>Conceptually:</p><pre>STEP 1</pre><pre>Hardware<br>↓<br>Ubuntu</pre><p>Then I let the system run for an extended period.</p><p>If a freeze appeared at this stage, I could prioritize investigation into areas such as:</p><pre>Kernel<br>Driver<br>BIOS<br>Firmware<br>Hardware</pre><p>rather than spending time investigating the Edge Application.</p><p>If the minimal Linux environment remained stable, I could move on to the next layer.</p><p>This type of staged testing is useful because adding everything at once makes troubleshooting much more difficult.</p><p>If you install the operating system, container runtime, IoT Edge, application modules, monitoring tools, and maintenance scripts at the same time, a failure could come from almost anywhere.</p><h3>6. Add the Edge Application</h3><p>After confirming that the OS alone could operate normally, I started adding the actual Edge environment.</p><p>Conceptually, the system became:</p><pre>STEP 2</pre><pre>Hardware<br>↓<br>Ubuntu<br>↓<br>Docker / Azure IoT Edge<br>↓<br>Edge Application</pre><p>The Edge PC runs several containers and modules.</p><p>For example:</p><pre>edgeAgent<br>edgeHub<br>Application Modules<br>TCP Server<br>Cloud Sender<br>Local Storage</pre><p>At this point, the test becomes much closer to the real system.</p><p>The machine is no longer simply running Linux.</p><p>It is processing data, communicating between containers, handling network traffic, maintaining local storage, and communicating with the cloud.</p><p>In other words:</p><blockquote><strong><em>The system is now operating under a workload similar to the real Edge environment.</em></strong></blockquote><p>This allows us to determine whether adding the application layer changes system stability.</p><h3>7. Why Adding Components Gradually Matters</h3><p>The important part of this process was not Linux itself.</p><p>It was the order of the investigation.</p><p>Instead of moving directly from:</p><pre>Windows production environment</pre><p>to:</p><pre>Complete Linux production environment</pre><p>I separated the system into layers.</p><pre>Hardware<br>↓<br>OS<br>↓<br>Container Runtime<br>↓<br>IoT Edge<br>↓<br>Application<br>↓<br>Network<br>↓<br>Cloud</pre><p>Then I added them one by one.</p><p>This approach provides much more useful information when a problem occurs.</p><p>For example, if the system is stable with Ubuntu alone but begins freezing after the Edge Application is installed, the investigation changes significantly.</p><p>Likewise, if the system freezes even with a minimal Linux installation, the application becomes much less likely to be the root cause.</p><p>The objective is not simply to make the problem disappear.</p><p>The objective is to understand:</p><blockquote><strong><em>At which layer does the problem begin to appear?</em></strong></blockquote><h3>8. A Stable Lab Environment Is Still Not Enough</h3><p>Even if the system runs normally after installing the complete Edge Application, the investigation is not finished.</p><p>A laboratory environment and a real deployment environment are very different.</p><p>For example:</p><pre>Network Conditions<br>Connected Devices<br>Traffic Volume<br>Continuous Operating Time<br>Facility Firewall Rules<br>Power Conditions<br>Number of Reboots<br>Cloud Connectivity</pre><p>may all be different.</p><p>A system that runs successfully for several hours in a development environment is not automatically ready for:</p><blockquote><strong><em>24/7 unattended Edge operation.</em></strong></blockquote><p>The next stage therefore had to be an onsite test.</p><p>The Edge PC needed to operate under the same conditions it would experience in production.</p><h3>9. The Full Troubleshooting Flow</h3><p>The overall investigation looked like this:</p><pre>Windows 11<br>│<br>│ Freeze occurs<br>│<br>├── Reduce unnecessary drivers<br>│<br>├── Change device configuration<br>│<br>└── Review graphics driver<br>        │<br>        ▼<br>   Question the OS layer<br>        │<br>        ▼<br>Boot Linux from USB<br>        │<br>        ▼<br>Minimal Linux environment<br>        │<br>        ▼<br>Install Edge Application<br>        │<br>        ▼<br>Onsite testing</pre><p>Each step adds only a limited number of variables.</p><p>That makes it much easier to understand <strong>when the problem returns</strong>.</p><p>This is much more useful than making many configuration changes at the same time and simply hoping that the freeze disappears.</p><h3>What I Learned from This Approach</h3><p>When troubleshooting stability problems, it is tempting to keep modifying settings inside the existing operating system.</p><p>But sometimes the operating system itself should be treated as another variable.</p><p>In this case, changing from Windows to Linux was not simply an OS migration.</p><p>It was part of the troubleshooting process.</p><p>The important idea was:</p><pre>Do not change everything at once.</pre><pre>Change one layer.<br>Observe.<br>Then add the next layer.</pre><p>For edge systems expected to run unattended for long periods, this type of isolation becomes especially important.</p><p>A system that fails once every few weeks may look stable during ordinary development testing.</p><p>In a 24/7 deployment, however, that same failure rate can become a serious operational issue.</p><h3>Next: Turning Linux from a “Working OS” into a Reliable 24/7 Edge Platform</h3><p>Moving from Windows 11 to Linux and introducing the Edge Application step by step helped isolate the freeze problem at the OS level.</p><p>But there is another important point:</p><blockquote><strong><em>Just because an application runs correctly on Linux does not mean the system is ready for 24/7 unattended operation.</em></strong></blockquote><p>In an onsite environment, we also need to think about:</p><ul><li>How to manage software versions such as Azure IoT Edge</li><li>How much OS and package updating should be allowed</li><li>When maintenance operations such as reboots and network recovery should run</li><li>How to prevent multiple maintenance tasks from running at the same time</li><li>How the system should automatically recover without human intervention</li><li>How the cloud should detect and notify us when automatic recovery fails</li></ul><p>The next few articles will cover how I turned the Linux environment from simply a <strong>working system</strong> into an environment designed for <strong>long-term unattended Edge operation</strong>.</p><p>The overall direction is:</p><pre>Pin the Azure IoT Edge version<br>↓<br>Control OS / Application updates<br>↓<br>Automate maintenance with systemd timers<br>↓<br>Distribute maintenance tasks across different times<br>↓<br>Automatically recover from failures<br>↓<br>Detect unrecoverable states from the cloud<br>↓<br>Send notifications</pre><p>In the next article, I will start with:</p><blockquote><strong><em>Why I decided to pin the Azure IoT Edge version</em></strong></blockquote><p>and discuss the balance between <strong>keeping software updated</strong> and <strong>maintaining stability</strong> on Edge devices that are expected to operate unattended for long periods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39a9cbcdb77a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>