<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc strict="yes"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="exp" ipr="trust200902" docName="draft-ahrweiler-hotreload-00">
  <front>
    <title abbrev="HotReload">Passive Hot Reload for Web Servers</title>
    <seriesInfo name="Internet-Draft" value="draft-ahrweiler-hotreload-00"/>
    <author fullname="Chris Ahrweiler" initials="C." surname="Ahrweiler">
      <organization>foxyfy.net</organization>
      <address>
        <email>info@foxyfy.net</email>
      </address>
    </author>
    <date year="2025" month="November" day="5"/>
    <abstract>
      <t>This document defines a passive, file-based mechanism for automatic hot reloading of configuration files and TLS certificates in web servers. Unlike traditional web servers that require explicit reload commands, this design uses file modification time (mtime) to detect changes and reloads in memory automatically.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Most web servers require manual intervention or explicit signals to reload configuration or TLS certificates. This document presents a passive strategy, based entirely on filesystem modification times, to perform reloads automatically and safely.</t>
    </section>

    <section title="Mechanism">
      <t>At startup, the server stores the current mtime of its configuration and TLS certificate files. A periodic timer (e.g. every 10 minutes) checks if those mtimes have changed. If so, the server reloads the updated configuration and certificates in memory without affecting active connections.</t>
    </section>

    <section title="Security Considerations">
      <t>Ensure proper file permissions to avoid unauthorized tampering. Always validate config and certificate contents before applying them. Avoid race conditions when reloading.</t>
    </section>

    <section title="Reference Implementation">
      <t>The FoxyFy web server implements this mechanism in Go. See [FOXYFY-SPEC] for full source and deployment notes.</t>
    </section>
  </middle>

  <back>
    <references title="Informative References">
      <reference anchor="FOXYFY-SPEC">
        <front>
          <title>FoxyFy Hot Reload (Full Specification)</title>
          <author>
            <organization>foxyfy.net</organization>
          </author>
          <date year="2025" month="November" day="5"/>
        </front>
        <seriesInfo name="URL" value="https://foxyfy.net/spec/draft-foxyfy-hotreload-00.txt"/>
      </reference>
    </references>
  </back>
</rfc>
