Skip to content

Blog: Controlling AI Spend w/ AppNet+agentgateway#5698

Open
therealmitchconnors wants to merge 14 commits intoAzure:masterfrom
therealmitchconnors:agw-blog
Open

Blog: Controlling AI Spend w/ AppNet+agentgateway#5698
therealmitchconnors wants to merge 14 commits intoAzure:masterfrom
therealmitchconnors:agw-blog

Conversation

@therealmitchconnors
Copy link
Copy Markdown

This is the blog equivalent of the Azure booth demo at Kubeon EU 26. Highlights capabilities of the newly launched AppNet, and a "better together" story with agentgateway. Ideally timed around release of agentgateway 1.1 around April 8.

@therealmitchconnors
Copy link
Copy Markdown
Author

Note to self: need to update parameters to point to AppNet control plane, not OSS istio...

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Docusaurus blog post describing a platform-layer pattern to control shared AI quota/spend by combining Azure Kubernetes Application Network (AppNet) identity (mTLS) with agentgateway token-based rate limiting.

Changes:

  • Adds a new blog post under website/blog/2026-04-09-appnet-agentgateway/.
  • Documents an architecture and example manifests for per-application token rate limiting.
  • Includes an example validation flow showing success (200) and throttling (429).

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Copilot AI review requested due to automatic review settings April 10, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Comment thread website/blog/tags.yml Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 13, 2026 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/authors.yml Outdated
therealmitchconnors and others added 2 commits April 13, 2026 16:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 13, 2026 16:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/authors.yml
Copilot AI review requested due to automatic review settings April 13, 2026 16:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

Comment thread website/blog/authors.yml Outdated
Comment thread website/blog/authors.yml Outdated
Comment thread website/blog/authors.yml Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Copy link
Copy Markdown
Contributor

@chzbrgr71 chzbrgr71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 21:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread website/blog/authors.yml Outdated
domain: token-budgets
```

Finally, let's configure our Rate Limiting Server to deny traffic after 100 tokens per application per minute (in reality, we'd need a much bigger budget, but this low budget lets us easily demo exceeding the rate limiter).
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The narrative says '100 tokens per application per minute', but the example ConfigMap enforces requests_per_unit: 100 (requests/minute). Either update the text to say 'requests' (and adjust other 'token' references accordingly), or update the example to reflect actual token-based limiting if the rate limit server supports it. As written, this is internally inconsistent and could mislead readers trying to reproduce token-based control.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not actually inconsistent. The requests_per_unit: 100 is part of the Envoy ratelimit service ConfigMap schema.

The magic happens in the AgentgatewayPolicy, where we set unit: Tokens. It tells agentgateway to report the LLM token count as the hit count to the ratelimit service. So when a request consumes 28 tokens, agentgateway tells the ratelimit service "this request used 28 hits" instead of the default 1. The ratelimit service is unaware it's counting tokens — it just does counter math against the 100 budget in Redis.

Copy link
Copy Markdown
Contributor

@colinmixonn colinmixonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some suggestions on readability, flow and making the value prop evident in the intro paragraph

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Co-authored-by: colinmixonn <109253437+colinmixonn@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 19:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment on lines +160 to +164
- key: client_ns
rate_limit:
unit: minute
requests_per_unit: 100
kind: ConfigMap
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s a mismatch between the narrative (“deny traffic after 100 tokens per application per minute”) and the sample rate limit config, which uses requests_per_unit: 100 (requests) rather than tokens. Either adjust the prose/examples to consistently talk about requests, or update the configuration examples to reflect token-based limiting if that’s what the implementation supports.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 16, 2026 19:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md
Copy link
Copy Markdown
Contributor

@colinmixonn colinmixonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few nits on abbreviation, but approved

Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Comment thread website/blog/2026-04-09-appnet-agentgateway/index.md Outdated
Co-authored-by: colinmixonn <109253437+colinmixonn@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 21:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread website/blog/authors.yml
socials:
linkedin: zhewei-hu
github: zheweihu

Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s trailing whitespace on the otherwise blank line after the zhewei-hu author entry. This can cause noisy diffs and may trip YAML/style linters; make the line truly empty or remove it.

Suggested change

Copilot uses AI. Check for mistakes.
tags: [application-network, ai]
---

## Control AI spend with per-application token rate limiting using Application Network and agentgateway
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog title (from the frontmatter) will be displayed on the page by default, so no need to include here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants