<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ganapathy Subramanian Ramachandran</title>
    <description>The latest articles on DEV Community by Ganapathy Subramanian Ramachandran (@ganapathys_ramachandran).</description>
    <link>https://dev.to/ganapathys_ramachandran</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2587983%2F498d3641-8d54-4b85-be41-ccde21406402.png</url>
      <title>DEV Community: Ganapathy Subramanian Ramachandran</title>
      <link>https://dev.to/ganapathys_ramachandran</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganapathys_ramachandran"/>
    <language>en</language>
    <item>
      <title>Why Out-of-Band Health Checks Are the Secret to Hassle-Free Maintenance</title>
      <dc:creator>Ganapathy Subramanian Ramachandran</dc:creator>
      <pubDate>Wed, 18 Dec 2024 19:46:15 +0000</pubDate>
      <link>https://dev.to/ganapathys_ramachandran/why-out-of-band-health-checks-are-the-secret-to-hassle-free-maintenance-8d</link>
      <guid>https://dev.to/ganapathys_ramachandran/why-out-of-band-health-checks-are-the-secret-to-hassle-free-maintenance-8d</guid>
      <description>&lt;p&gt;If you’ve ever built software that interacts with upstream services, chances are you’ve implemented some kind of health check. Maybe your software is a standalone application, a proxy, or even a service consumed by others. Regardless, health checks are crucial for ensuring your system stays reliable and responsive.&lt;/p&gt;

&lt;p&gt;But here's the thing: not all health checks are created equal. In fact, the way you implement them can make or break your ability to maintain your service without impacting users. Let me explain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with In-Band Health Checks
&lt;/h2&gt;

&lt;p&gt;The worst (and most common) way to perform health checks is by piggybacking the very same port your service listens on for data. These are called in-band health checks, and they look a lot like this:&lt;/p&gt;

&lt;p&gt;A basic HTTP request, like GET /hc.html, to a main service port, which in our examples would be port 80.&lt;br&gt;
A TCP connection check against that primary operating port of a given service.&lt;br&gt;
On the surface, this seems fine—it’s quick, simple, and easy to set up. But here’s the catch: when you’re using the same port for both health checks and client traffic, you’re setting yourself up for trouble.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Could Go Wrong?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Resource Contention: If your service is experiencing high traffic, health check requests are forced to compete with client requests. This can lead to false alarms about service health.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;False Negatives: A minor hitch in the traffic or a load balance can bring your health checks down for the count-even when a service is nominally okay.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Disruptive Maintenance: Performing scheduled updates to take services down? Have fun hoping to do so gracefully whenever your health checks are bound to the same port.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Smarter Alternative: Out-of-Band Health Checks&lt;br&gt;
So what's the better option? Enter out-of-band health checks.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach involves using a separate port to run your health checks. The idea is simple: keep health checks entirely independent of the main service port. For example:&lt;/p&gt;

&lt;p&gt;If your service runs on port 80, you’d expose the health check on port 81.&lt;br&gt;
If it’s HTTPS on port 443, the health check could be on port 444.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Out-of-Band Checks Are a Game-Changer
&lt;/h2&gt;

&lt;p&gt;Here are the key benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Maintenance Without Downtime: Out-of-band checks allow you to gracefully take a service offline without affecting existing connections. In most cases, you need only fail the health check-simply return a 4xx response-or shut down the health check port-to instruct your load balancers that a particular service is unavailable. Meanwhile, any currently processed client requests can complete without any disruption visible to users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved Accuracy: Since health checks no longer compete with client traffic, you'll have a clearer picture of your service's health. No more false negatives due to spikes in user activity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: You may then introduce custom rules or logic without touching the main service. For instance, you may decide to add extra latency or simulate failures for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Easier Diagnostics: Placing health checks on their own port enables the ability for multiple checks in one spot. For example:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GET /healthcheck/port1 for service A&lt;br&gt;
GET /healthcheck/port2 for service B&lt;br&gt;
It helps much in identifying issues and learning the status of various components.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple Convention for Control Ports
&lt;/h2&gt;

&lt;p&gt;To further simplify things, you may stick to using a fixed offset to assign the health check ports. As an example:&lt;/p&gt;

&lt;p&gt;Port 80 → Control port 81&lt;br&gt;
Port 443 → Control port 444&lt;br&gt;
For larger offsets, 8080 and 8443.&lt;br&gt;
This consistency makes it easy to configure and monitor your services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Out-of-band health checks are a small change that pays big dividends. They make your services more resilient, your maintenance less disruptive, and your monitoring more reliable.&lt;/p&gt;

&lt;p&gt;So, if you’re still relying on in-band health checks, it’s time to rethink your approach. Separating health checks onto a dedicated port is an investment in better uptime, smoother updates, and happier users.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>loadbalancing</category>
      <category>outofband</category>
      <category>healthchecks</category>
    </item>
  </channel>
</rss>
