<?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: Keshav</title>
    <description>The latest articles on DEV Community by Keshav (@keshav_af7403d92948605d98).</description>
    <link>https://dev.to/keshav_af7403d92948605d98</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%2F3469302%2F8e07a423-e227-498e-a7a6-3bef3afc7b3c.png</url>
      <title>DEV Community: Keshav</title>
      <link>https://dev.to/keshav_af7403d92948605d98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keshav_af7403d92948605d98"/>
    <language>en</language>
    <item>
      <title>What AI Agent Skills Are and How They Work</title>
      <dc:creator>Keshav</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:45:22 +0000</pubDate>
      <link>https://dev.to/keshav_af7403d92948605d98/what-ai-agent-skills-are-and-how-they-work-30ap</link>
      <guid>https://dev.to/keshav_af7403d92948605d98/what-ai-agent-skills-are-and-how-they-work-30ap</guid>
      <description>&lt;h1&gt;
  
  
  AI Agent Skills: The Missing Piece of Procedural Knowledge
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
AI agents are great at reasoning and recalling facts, but they struggle with step‑by‑step workflows. &lt;em&gt;Skills&lt;/em&gt; solve this by packaging procedural knowledge into lightweight, open‑standard Markdown files that agents load on demand. They’re fast, versionable, and portable across platforms—just watch out for security when installing third‑party skills.&lt;/p&gt;


&lt;h2&gt;
  
  
  What Are AI Agent Skills?
&lt;/h2&gt;

&lt;p&gt;AI agents built on large language models (LLMs) can answer trivia, explain concepts, or describe architecture.&lt;br&gt;&lt;br&gt;
What they &lt;strong&gt;don’t&lt;/strong&gt; do well is execute a &lt;em&gt;specific&lt;/em&gt; multi‑step process—like generating a compliant financial report in 47 steps—without being told every single step.  &lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;skill&lt;/strong&gt; is the mechanism that injects that procedural knowledge into an agent. Think of it as a &lt;em&gt;recipe&lt;/em&gt; that tells the agent &lt;em&gt;what&lt;/em&gt; to do and &lt;em&gt;when&lt;/em&gt; to do it.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Anatomy of a Skill
&lt;/h2&gt;

&lt;p&gt;A skill lives in its own folder and is centered around a single &lt;code&gt;skill.md&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;---
name: PDF Builder
description: Use this when the user asks to extract a PDF.
author: Jane Doe
version: 1.0
---

&lt;span class="gu"&gt;## Goal
&lt;/span&gt;Extract text from a PDF and return a clean, searchable version.

&lt;span class="gu"&gt;## Steps
&lt;/span&gt;1. Receive the PDF file path.
2. Call the &lt;span class="sb"&gt;`pdf-extract`&lt;/span&gt; script.
3. Clean the extracted text.
4. Return the cleaned text to the user.

&lt;span class="gu"&gt;## Example
&lt;/span&gt;&lt;span class="gs"&gt;**Input:**&lt;/span&gt; &lt;span class="sb"&gt;`extract_pdf("report.pdf")`&lt;/span&gt;  
&lt;span class="gs"&gt;**Output:**&lt;/span&gt; &lt;span class="sb"&gt;`Cleaned text of report.pdf`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mandatory Fields
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unique identifier for the skill.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trigger condition – tells the agent when to use the skill.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Optional Fields
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;author&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt; – for provenance.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scripts/&lt;/code&gt; – executable JS/Python/bash files the agent can run.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;references/&lt;/code&gt; – extra docs the agent may load on demand.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;assets/&lt;/code&gt; – static resources like templates or data files.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How Skills Are Loaded: Progressive Disclosure
&lt;/h2&gt;

&lt;p&gt;Loading every skill’s full content into the LLM’s context window would quickly exhaust the token budget.&lt;br&gt;&lt;br&gt;
Skills solve this with a &lt;strong&gt;three‑tier&lt;/strong&gt; progressive disclosure strategy.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;What’s Loaded&lt;/th&gt;
&lt;th&gt;When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1 – Metadata&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;name&lt;/code&gt; + &lt;code&gt;description&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;At agent startup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2 – Full Instructions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Entire &lt;code&gt;skill.md&lt;/code&gt; body&lt;/td&gt;
&lt;td&gt;When a request matches the description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3 – Resources&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;scripts/&lt;/code&gt;, &lt;code&gt;references/&lt;/code&gt;, &lt;code&gt;assets/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Only when a specific task requires them&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This keeps the agent lightweight, yet fully functional when a skill is needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Skills vs. Other Knowledge Injections
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Knowledge Type&lt;/th&gt;
&lt;th&gt;What It Provides&lt;/th&gt;
&lt;th&gt;How It Works&lt;/th&gt;
&lt;th&gt;Limitations&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tool access &amp;amp; API calls&lt;/td&gt;
&lt;td&gt;Agent calls external services&lt;/td&gt;
&lt;td&gt;No judgment on &lt;em&gt;when&lt;/em&gt; to call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG (Retrieval‑Augmented Generation)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Factual data from a knowledge base&lt;/td&gt;
&lt;td&gt;Pulls relevant chunks at runtime&lt;/td&gt;
&lt;td&gt;No procedural guidance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fine‑Tuning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Permanent knowledge baked into weights&lt;/td&gt;
&lt;td&gt;Model retrained on new data&lt;/td&gt;
&lt;td&gt;Expensive, inflexible to changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Procedural workflows&lt;/td&gt;
&lt;td&gt;Markdown + optional scripts&lt;/td&gt;
&lt;td&gt;Requires careful security review&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Skills complement MCP, RAG, and fine‑tuning by adding &lt;em&gt;judgment&lt;/em&gt;—the “when” and “how” to use other knowledge sources.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Open‑Standard Edge
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Format&lt;/strong&gt;: &lt;code&gt;skill.md&lt;/code&gt; + optional folders.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spec&lt;/strong&gt;: Published at &lt;a href="https://agentskills.io" rel="noopener noreferrer"&gt;agentskills.io&lt;/a&gt; under an Apache 2.0 license.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portability&lt;/strong&gt;: A skill built for Claude, Code, or OpenAI Codex works on any platform that supports the spec.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;p&gt;Because skills can execute scripts with file‑system access, API keys, and environment variables, they’re a potential attack vector:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Injection&lt;/strong&gt; – malicious prompts that manipulate the skill’s logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Poisoning&lt;/strong&gt; – tampering with external tools the skill calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden Malware&lt;/strong&gt; – scripts that perform unwanted actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best practice:&lt;/strong&gt; Treat skill installation like any other software dependency—review the code, understand its behavior, and audit before running it locally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Procedural knowledge&lt;/strong&gt; is the missing piece for AI agents; skills fill that gap.&lt;/li&gt;
&lt;li&gt;A skill is a &lt;strong&gt;Markdown file&lt;/strong&gt; (&lt;code&gt;skill.md&lt;/code&gt;) that defines &lt;em&gt;what&lt;/em&gt; the agent does and &lt;em&gt;when&lt;/em&gt; to do it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive disclosure&lt;/strong&gt; keeps agents efficient: metadata → instructions → resources.&lt;/li&gt;
&lt;li&gt;Skills work alongside MCP, RAG, and fine‑tuning, adding &lt;em&gt;judgment&lt;/em&gt; to the agent’s toolkit.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;open‑standard&lt;/strong&gt; format ensures portability across AI platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt; is paramount—review skills before executing them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With skills, an agent that already knows the &lt;em&gt;airspeed velocity of an unladen swallow&lt;/em&gt; can now learn to &lt;em&gt;generate a compliant financial report&lt;/em&gt;—all by loading a few lines of Markdown. Happy skill‑building!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>technology</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Protect Your Systems with Throttling &amp; Rate Limiting - 5 Real-World Use Cases</title>
      <dc:creator>Keshav</dc:creator>
      <pubDate>Tue, 27 Oct 2026 14:17:25 +0000</pubDate>
      <link>https://dev.to/keshav_af7403d92948605d98/how-to-protect-your-systems-with-throttling-rate-limiting-5-real-world-use-cases-10k5</link>
      <guid>https://dev.to/keshav_af7403d92948605d98/how-to-protect-your-systems-with-throttling-rate-limiting-5-real-world-use-cases-10k5</guid>
      <description>&lt;h1&gt;
  
  
  Throttling &amp;amp; Rate Limiting: 5 Real‑World Use Cases
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; – Throttling is a defensive technique that controls the flow of requests to a target system, preventing overload, abuse, and costly spikes. By combining &lt;em&gt;slowing down&lt;/em&gt;, &lt;em&gt;rejecting&lt;/em&gt;, and &lt;em&gt;ignoring&lt;/em&gt; strategies, you can protect both public APIs and internal services. Below are five practical scenarios where rate limiting shines, from stopping DoS attacks to rationing expensive third‑party calls.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. What Is Throttling?
&lt;/h2&gt;

&lt;p&gt;Throttling is the process of &lt;strong&gt;ensuring that data requests are forwarded to a target system at an acceptable rate&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
When many users or subsystems send traffic to a single machine, a &lt;strong&gt;rate limiter&lt;/strong&gt; acts as a gatekeeper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Buffering&lt;/strong&gt; – Drips requests slowly so the target never gets overwhelmed.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rejecting&lt;/strong&gt; – Drops requests that exceed capacity, returning an error (e.g., &lt;code&gt;429 Too Many Requests&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring&lt;/strong&gt; – Silently discards requests but still returns a success response to the caller, useful for stealthy abuse mitigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Why it matters:&lt;/em&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevents system crashes from sudden traffic spikes.
&lt;/li&gt;
&lt;li&gt;Keeps costs predictable by limiting compute usage.
&lt;/li&gt;
&lt;li&gt;Avoids cascading failures across dependent services.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Why Do We Need Throttling?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;th&gt;What It Protects&lt;/th&gt;
&lt;th&gt;Typical Scenario&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prevent abuse&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;System uptime&lt;/td&gt;
&lt;td&gt;Rogue users hammering an API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Handle legitimate surges&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;User experience&lt;/td&gt;
&lt;td&gt;Viral traffic spikes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Control consumption cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Budget&lt;/td&gt;
&lt;td&gt;Expensive compute or third‑party calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Avoid cascading failures&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;System stability&lt;/td&gt;
&lt;td&gt;One service overloads another&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Throttling Strategies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  3.1 Slowing Down (Buffering)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mechanism&lt;/strong&gt;: Queue requests and release them at a steady pace.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: Message brokers like &lt;strong&gt;SQS&lt;/strong&gt; or &lt;strong&gt;RabbitMQ&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benefit&lt;/strong&gt;: Keeps the consumer at a comfortable load level.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Incoming requests → Rate Limiter (queue) → Consumer (drips at 10 req/s)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.2 Rejecting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mechanism&lt;/strong&gt;: Drop excess requests outright.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;: API servers capped at 100 req/s.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benefit&lt;/strong&gt;: No buffering, clear feedback (&lt;code&gt;429&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.3 Ignoring
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mechanism&lt;/strong&gt;: Silently drop requests but return a success status.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use‑case&lt;/strong&gt;: Deceptive DoS mitigation—attackers think they succeeded.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benefit&lt;/strong&gt;: Keeps traffic patterns normal for monitoring tools.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Five Real‑World Use Cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  4.1 External Rate Limiter – Prevent Catastrophic DoS Attacks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: All incoming traffic hits a rate limiter before reaching your services.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: Configure rules to block IPs, tokens, or user agents that exceed thresholds.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: Attack traffic is dropped; legitimate traffic flows normally.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Example AWS API Gateway rate limit rule&lt;/span&gt;
&lt;span class="na"&gt;throttle&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;burst&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;
  &lt;span class="na"&gt;rate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;
  &lt;span class="na"&gt;ip_whitelist&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;192.168.1.0/24"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4.2 External Rate Limiter – Gracefully Handle User Surges
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: A sudden influx of legitimate users (e.g., after a viral tweet).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: Allow a subset of requests to pass while dropping the rest.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: The system stays responsive for some users; others receive a friendly “try again later” message instead of a hard 503.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4.3 Internal Rate Limiter – Ration Compute for Tiered Pricing
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: A CI/CD platform (e.g., CircleCI) offers free, paid, and unlimited tiers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: Before launching a build job, the API server checks the user’s quota.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: The rate limiter consults a database of consumed minutes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: Users stay within their allocated build time; over‑usage is blocked.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;build_minutes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;builds&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;window_start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4.4 Internal Rate Limiter – Avoid Over‑Using Expensive Third‑Party APIs
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Your service calls a paid ML API that costs $5 per request.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: Workers consult a rate limiter before each external call.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: The limiter enforces a daily or hourly cap.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: You stay within budget and avoid unexpected bill spikes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rate_limiter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;allow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ml_api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ml_api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Rate limit exceeded&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4.5 Internal Rate Limiter – Protect Unprotected Systems (e.g., Hard Deletes)
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Deleting millions of rows in a single query can lock tables and crash the DB.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt;: Split the delete into smaller batches.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How&lt;/strong&gt;: Use a scheduler or a rate limiter to pace the deletes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: The database remains responsive; the operation completes without downtime.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="s1"&gt;'2024-01-01'&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;-- run every minute&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Key Takeaways
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Takeaway&lt;/th&gt;
&lt;th&gt;Why It Matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rate limiting is not just for APIs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Internal services, third‑party calls, and even database operations benefit from controlled traffic.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Choose the right strategy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Buffering for smooth load, rejecting for hard caps, ignoring for stealthy defense.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Combine external &amp;amp; internal limits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Protect the edge of your system &lt;em&gt;and&lt;/em&gt; the core of your infrastructure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tie limits to business logic&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tiered pricing, cost controls, and SLA guarantees all rely on well‑configured throttling.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monitor &amp;amp; adjust&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Traffic patterns change; keep your limits tuned to real usage.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;By integrating thoughtful throttling mechanisms, you can keep your services robust, cost‑effective, and user‑friendly—even under the most demanding conditions. Happy throttling!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>technology</category>
      <category>programming</category>
      <category>python</category>
    </item>
  </channel>
</rss>
