<?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: Debasish Mohanty</title>
    <description>The latest articles on DEV Community by Debasish Mohanty (@debasish87).</description>
    <link>https://dev.to/debasish87</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3821824%2F58857466-15ac-4c23-b4bc-493c75a22c3d.jpg</url>
      <title>DEV Community: Debasish Mohanty</title>
      <link>https://dev.to/debasish87</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debasish87"/>
    <language>en</language>
    <item>
      <title>How I Debugged a KV-Cache Offloading Bug in vLLM</title>
      <dc:creator>Debasish Mohanty</dc:creator>
      <pubDate>Sun, 20 Sep 2026 16:56:16 +0000</pubDate>
      <link>https://dev.to/debasish87/how-i-debugged-a-kv-cache-offloading-bug-in-vllm-52lj</link>
      <guid>https://dev.to/debasish87/how-i-debugged-a-kv-cache-offloading-bug-in-vllm-52lj</guid>
      <description>&lt;h1&gt;
  
  
  How I Debugged a KV-Cache Offloading Bug in vLLM
&lt;/h1&gt;

&lt;p&gt;LLM inference performance is often limited by GPU memory rather than raw compute.&lt;/p&gt;

&lt;p&gt;One of the problems I worked on in vLLM involved KV-cache offloading for models using mixed KV-cache groups.&lt;/p&gt;

&lt;p&gt;The failure was subtle: the existing logic assumed a single KV-cache group layout, but models with mixed groups could require different block calculations.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;KV-cache is one of the largest consumers of GPU memory during autoregressive generation.&lt;/p&gt;

&lt;p&gt;When the GPU cannot keep the required KV-cache resident, vLLM can offload cache blocks to another memory tier.&lt;/p&gt;

&lt;p&gt;The existing implementation relied on &lt;code&gt;block_size&lt;/code&gt; for its calculations.&lt;/p&gt;

&lt;p&gt;That assumption was not sufficient for models with mixed KV-cache groups.&lt;/p&gt;

&lt;p&gt;The result was incorrect chunking during KV-cache offloading.&lt;/p&gt;

&lt;p&gt;This affected models with architectures such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DeepSeek-V4-Flash&lt;/li&gt;
&lt;li&gt;Gemma-4&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What was wrong
&lt;/h2&gt;

&lt;p&gt;The important distinction was between the configured block size and the number of blocks that should actually be processed together.&lt;/p&gt;

&lt;p&gt;Using the existing value directly worked for the common case, but broke when different KV-cache groups had different requirements.&lt;/p&gt;

&lt;p&gt;The bug was therefore not simply a memory-capacity problem.&lt;/p&gt;

&lt;p&gt;It was an assumption in the API and its downstream calculation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;I introduced:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;blocks_per_chunk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;while keeping the existing:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;block_size&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;behavior backward compatible.&lt;/p&gt;

&lt;p&gt;The important part was avoiding a breaking change for existing users of the KV-cache implementation.&lt;/p&gt;

&lt;p&gt;The new value allows the offloading logic to operate correctly when KV-cache groups require different chunking behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;LLM infrastructure bugs are often not obvious application failures.&lt;/p&gt;

&lt;p&gt;The model can load.&lt;/p&gt;

&lt;p&gt;The request can start.&lt;/p&gt;

&lt;p&gt;The GPU can be healthy.&lt;/p&gt;

&lt;p&gt;And the system can still produce incorrect behavior because an internal assumption doesn't hold for a particular model architecture.&lt;/p&gt;

&lt;p&gt;That is why I find infrastructure debugging interesting.&lt;/p&gt;

&lt;p&gt;The problem is usually several layers below the API surface:&lt;/p&gt;

&lt;p&gt;Model&lt;br&gt;
↓&lt;br&gt;
Attention / KV Cache&lt;br&gt;
↓&lt;br&gt;
Memory Manager&lt;br&gt;
↓&lt;br&gt;
GPU Memory&lt;br&gt;
↓&lt;br&gt;
Runtime&lt;br&gt;
↓&lt;br&gt;
Kubernetes / Cloud Infrastructure&lt;/p&gt;

&lt;p&gt;A production inference system needs every layer to agree about the same assumptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The upstream contribution
&lt;/h2&gt;

&lt;p&gt;The fix was submitted upstream to vLLM:&lt;/p&gt;

&lt;p&gt;PR #48878&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/vllm-project/vllm/pull/48878" rel="noopener noreferrer"&gt;https://github.com/vllm-project/vllm/pull/48878&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The change was designed to preserve existing behavior while handling mixed KV-cache groups correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson was simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The bug was in the assumption, not the runtime.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When debugging inference infrastructure, I now try to identify the invariant first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What does the API promise?&lt;/li&gt;
&lt;li&gt;What does the scheduler assume?&lt;/li&gt;
&lt;li&gt;What does the memory manager calculate?&lt;/li&gt;
&lt;li&gt;Does that assumption still hold for newer model architectures?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That approach is often more useful than starting from the final symptom.&lt;/p&gt;

&lt;h2&gt;
  
  
  More
&lt;/h2&gt;

&lt;p&gt;I work on infrastructure underneath LLM inference:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS → Kubernetes → vLLM → GPU&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm particularly interested in GPU memory, KV-cache management, scheduling, autoscaling, observability, and making inference infrastructure faster and more cost-efficient.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Debasish-87" rel="noopener noreferrer"&gt;https://github.com/Debasish-87&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://www.debasishmohanty.in/" rel="noopener noreferrer"&gt;https://www.debasishmohanty.in/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>kubernetes</category>
      <category>llm</category>
    </item>
    <item>
      <title>Building an Enterprise Release Governance Platform for Kubernetes (DevSecOps + CI/CD)</title>
      <dc:creator>Debasish Mohanty</dc:creator>
      <pubDate>Fri, 13 Mar 2026 08:35:18 +0000</pubDate>
      <link>https://dev.to/debasish87/building-an-enterprise-release-governance-platform-for-kubernetes-devsecops-cicd-2on</link>
      <guid>https://dev.to/debasish87/building-an-enterprise-release-governance-platform-for-kubernetes-devsecops-cicd-2on</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Modern CI/CD pipelines often rely heavily on &lt;strong&gt;test results&lt;/strong&gt; to decide whether a release should proceed.&lt;/p&gt;

&lt;p&gt;However, in real production environments, &lt;strong&gt;tests passing alone does not guarantee a safe release&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A deployment may pass all tests
&lt;/li&gt;
&lt;li&gt;But the Kubernetes cluster might already be under pressure
&lt;/li&gt;
&lt;li&gt;Other services may be crashlooping
&lt;/li&gt;
&lt;li&gt;Security vulnerabilities might exist in dependencies
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To explore this problem, I built a platform called &lt;strong&gt;Enterprise Release Governance System (ERGS)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal of ERGS is to transform a traditional CI/CD pipeline into a &lt;strong&gt;release intelligence system&lt;/strong&gt; that evaluates multiple signals before allowing a release.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Problem with Traditional CI/CD
&lt;/h1&gt;

&lt;p&gt;Typical pipelines usually follow a pattern like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run tests
&lt;/li&gt;
&lt;li&gt;Build artifacts
&lt;/li&gt;
&lt;li&gt;Deploy
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach ignores important signals such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;security vulnerabilities
&lt;/li&gt;
&lt;li&gt;dependency risks
&lt;/li&gt;
&lt;li&gt;cluster health
&lt;/li&gt;
&lt;li&gt;runtime platform stability
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In large systems, releasing without considering these signals can introduce &lt;strong&gt;serious operational risks&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  What is ERGS?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Enterprise Release Governance System (ERGS)&lt;/strong&gt; is a governance layer on top of CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;It integrates multiple validation layers and generates a final release decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GO → Safe to release&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HOLD → Manual review required&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NO-GO → Release blocked&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire system runs inside &lt;strong&gt;GitHub Actions pipelines&lt;/strong&gt; and produces consolidated reports.&lt;/p&gt;

&lt;p&gt;Project repository:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/Debasish-87/ReleaseGuard" rel="noopener noreferrer"&gt;https://github.com/Debasish-87/ReleaseGuard&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  ERGS High-Level Architecture
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     ┌─────────────────────────┐
                     │     Developer Commit     │
                     │     GitHub Repository    │
                     └─────────────┬───────────┘
                                   │
                                   ▼
                       ┌────────────────────┐
                       │   GitHub Actions    │
                       │  CI/CD Pipeline     │
                       └─────────┬───────────┘
                                 │
                                 ▼

        ┌───────────────────────────────────────────────────┐
        │              RELEASE GOVERNANCE PIPELINE           │
        └───────────────────────────────────────────────────┘

      ┌───────────────┐
      │ Layer 1       │
      │ Application   │
      │ Testing       │
      │ (Allure)      │
      └──────┬────────┘
             │
             ▼

      ┌───────────────┐
      │ Layer 2       │
      │ DevSecOps     │
      │ Security Scan │
      │               │
      │ Semgrep       │
      │ Trivy         │
      │ Gitleaks      │
      └──────┬────────┘
             │
             ▼

      ┌───────────────┐
      │ Layer 3       │
      │ SBOM &amp;amp;        │
      │ Dependency    │
      │ Security      │
      │               │
      │ Syft          │
      │ Grype         │
      └──────┬────────┘
             │
             ▼

      ┌───────────────┐
      │ Layer 4       │
      │ Kubernetes    │
      │ Platform      │
      │ Validation    │
      │ (KPQE)        │
      │               │
      │ Node checks   │
      │ Pod health    │
      │ Crashloops    │
      └──────┬────────┘
             │
             ▼

      ┌───────────────┐
      │ Layer 5       │
      │ Release       │
      │ Dashboard     │
      │               │
      │ Consolidated  │
      │ Reports       │
      └──────┬────────┘
             │
             ▼

      ┌───────────────┐
      │ Layer 6       │
      │ Final         │
      │ Decision      │
      │ Engine        │
      │               │
      │ GO / HOLD     │
      │ / NO-GO       │
      └──────┬────────┘
             │
             ▼

      ┌───────────────────────────┐
      │ GitHub Pages Reports      │
      │                           │
      │ /allure                   │
      │ /security                 │
      │ /sbom                     │
      │ /kpqe                     │
      │ /dashboard                │
      │ /decision                 │
      └───────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;




&lt;h1&gt;
  
  
  System Architecture
&lt;/h1&gt;

&lt;p&gt;The pipeline evaluates releases using multiple layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1 — Automated Testing
&lt;/h2&gt;

&lt;p&gt;Application tests are executed and results are published using &lt;strong&gt;Allure reports&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Outputs include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allure HTML report&lt;/li&gt;
&lt;li&gt;test execution summary&lt;/li&gt;
&lt;li&gt;testing intelligence signals&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Layer 2 — DevSecOps Security Scans
&lt;/h2&gt;

&lt;p&gt;Security analysis is performed using several tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semgrep&lt;/strong&gt; → static code analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trivy&lt;/strong&gt; → vulnerability scanning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gitleaks&lt;/strong&gt; → secret detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tools identify potential security risks before deployment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 3 — SBOM Generation
&lt;/h2&gt;

&lt;p&gt;Software Bill of Materials (SBOM) is generated using &lt;strong&gt;Syft&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Dependencies are then scanned for vulnerabilities using &lt;strong&gt;Grype&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Outputs include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CycloneDX SBOM&lt;/li&gt;
&lt;li&gt;vulnerability reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures visibility into &lt;strong&gt;software supply chain risks&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 4 — Kubernetes Platform Validation
&lt;/h2&gt;

&lt;p&gt;Before approving a release, the pipeline validates the &lt;strong&gt;cluster health&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The platform checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;node readiness&lt;/li&gt;
&lt;li&gt;pod crashloops&lt;/li&gt;
&lt;li&gt;restart risk signals&lt;/li&gt;
&lt;li&gt;overall cluster health&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This stage is implemented using &lt;strong&gt;Kubernetes Platform Quality Engineering (KPQE)&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 5 — Release Intelligence Dashboard
&lt;/h2&gt;

&lt;p&gt;All signals are merged into a consolidated dashboard.&lt;/p&gt;

&lt;p&gt;The dashboard provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;release summary&lt;/li&gt;
&lt;li&gt;testing insights&lt;/li&gt;
&lt;li&gt;security scan results&lt;/li&gt;
&lt;li&gt;SBOM vulnerability status&lt;/li&gt;
&lt;li&gt;Kubernetes readiness signals&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Layer 6 — Final Decision Engine
&lt;/h2&gt;

&lt;p&gt;Finally, a decision engine evaluates governance rules.&lt;/p&gt;

&lt;p&gt;Example logic:&lt;/p&gt;

&lt;h3&gt;
  
  
  GO
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;tests passed&lt;/li&gt;
&lt;li&gt;no critical vulnerabilities&lt;/li&gt;
&lt;li&gt;cluster health acceptable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  HOLD
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;tests pass but security warnings exist&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NO-GO
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;tests fail&lt;/li&gt;
&lt;li&gt;critical vulnerabilities detected&lt;/li&gt;
&lt;li&gt;cluster validation fails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system generates a final output:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
final-decision.json&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;json&lt;/p&gt;




&lt;h1&gt;
  
  
  Example Release Governance Decision
&lt;/h1&gt;

&lt;p&gt;A typical decision might look like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;json&lt;br&gt;
{&lt;br&gt;
 "releaseDecision": "GO",&lt;br&gt;
 "tests": "passed",&lt;br&gt;
 "security": "clean",&lt;br&gt;
 "clusterStatus": "healthy"&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This provides a &lt;strong&gt;clear automated decision&lt;/strong&gt; for CI/CD pipelines.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Release Governance Matters
&lt;/h1&gt;

&lt;p&gt;Modern production environments are extremely complex.&lt;/p&gt;

&lt;p&gt;A safe release decision should consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code quality&lt;/li&gt;
&lt;li&gt;security posture&lt;/li&gt;
&lt;li&gt;supply chain risks&lt;/li&gt;
&lt;li&gt;infrastructure health&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining these signals, we can significantly improve &lt;strong&gt;release reliability&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Demo
&lt;/h1&gt;

&lt;p&gt;Demo video:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/rC9K4sqsgE0" rel="noopener noreferrer"&gt;https://youtu.be/rC9K4sqsgE0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Project repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Debasish-87/ReleaseGuard" rel="noopener noreferrer"&gt;https://github.com/Debasish-87/ReleaseGuard&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;CI/CD pipelines are excellent for automation, but they often lack &lt;strong&gt;governance intelligence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A governance layer like ERGS allows teams to make smarter release decisions by combining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;testing signals&lt;/li&gt;
&lt;li&gt;security scans&lt;/li&gt;
&lt;li&gt;dependency analysis&lt;/li&gt;
&lt;li&gt;Kubernetes cluster health&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of relying only on &lt;em&gt;tests passing&lt;/em&gt;, releases can be evaluated with a &lt;strong&gt;holistic risk perspective&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;💬 I'm curious how other teams handle &lt;strong&gt;release governance in Kubernetes environments&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Do you validate cluster health before deployments, or rely only on CI/CD pipeline checks?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>security</category>
      <category>cloudnative</category>
    </item>
  </channel>
</rss>
