<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Context on Nalar</title>
    <link>https://nalar.dev/tags/context/</link>
    <description>Recent content in Context on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 01 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/context/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Graceful HTTP Server Shutdown in Go</title>
      <link>https://nalar.dev/graceful-http-server-shutdown-in-go/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/graceful-http-server-shutdown-in-go/</guid>
      <description>&lt;p&gt;Stopping a web server with &lt;code&gt;Ctrl+C&lt;/code&gt; looks harmless during development, but production deployments need a more careful shutdown process. If a process exits immediately, active HTTP requests can be interrupted, clients may receive connection errors, and in-flight work can be left unfinished.&lt;/p&gt;&#xA;&lt;p&gt;Go&amp;rsquo;s standard library already provides the pieces needed for a clean shutdown. The main tools are &lt;code&gt;os/signal&lt;/code&gt;, &lt;code&gt;context&lt;/code&gt;, and &lt;code&gt;http.Server.Shutdown&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This guide shows a practical pattern for shutting down an HTTP server when the process receives &lt;code&gt;SIGINT&lt;/code&gt; or &lt;code&gt;SIGTERM&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
