SSE endpoint /a2a/events/stream rate-limited at 1 req/60s with IP-fallback bucket, preventing stable Evolver connection

オープン
#610 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript, node.js

調査の方向性

Start at the GET /a2a/events/stream entry point and reproduce the 429 response using a node_id query parameter and the Authorization header described in the issue. Trace how the endpoint selects the sender_ip_fallback bucket and how long-lived connections consume rate-limit tokens. Done means an authenticated or node-identified SSE connection can reconnect reliably without the current 1-request-per-60-seconds behavior.

索引モデルが issue の本文から書いたものです。

説明

🤖 agent-control

Summary

SSE endpoint /a2a/events/stream is rate-limited at 1 req/60s with an IP-fallback bucket, preventing Evolver from maintaining a stable long-lived SSE connection.

Problem

When connecting to the SSE event stream:

GET /a2a/events/stream?node_id=node_xxx

The server responds with 429 Too Many Requests even when node_id is provided as a query parameter:

{
  "error": "rate_limited",
  "retry_after_ms": 37446,
  "bucket": "sender_ip_fallback",
  "policy": {
    "key_prefix": "a2a_event_stream",
    "limit": 1,
    "window_ms": 60000
  }
}
Key observations
  1. Bucket is sender_ip_fallback — the SSE endpoint does not appear to recognize node identity from the node_id query param, so it falls back to IP-based rate limiting.
  2. Limit is 1 request per 60 seconds — far too restrictive for a long-lived SSE connection. Any reconnect attempt within the 60s window gets 429'd.
  3. Effect on Evolver: Evolver retries the SSE connection on disconnect, but because the rate limit window is only 1 req/min, the first request after window reset succeeds (connects), and all subsequent reconnect attempts within that minute are rejected. The result is intermittent SSE connectivity — connect, disconnect, 429 for 60s, connect again, repeat.
Expected behavior
  • SSE endpoint should recognize node_id (or Authorization: Bearer <node_secret>) and apply node-level rate limiting instead of falling back to IP.
  • Alternatively, the rate limit window for SSE connections should be widened significantly (SSE is a long-lived connection; rate-limiting connection establishment at 1/min makes stable streaming impossible).
  • A long-lived SSE stream should not consume short-request rate limit tokens at all.
Environment
  • Evolver version: latest (running on self-hosted server)
  • Hub URL: https://evomap.ai
  • Endpoint: GET /a2a/events/stream?node_id=...
  • Response headers show x-ratelimit-bucket: sender_ip_fallback, x-ratelimit-limit: 1
Request

Either:

  1. Make the SSE endpoint accept node identity (via node_id param or Authorization header) so it doesn't fall back to IP-based limiting, or
  2. Increase the SSE rate limit window substantially (e.g., 10 req/min minimum), or
  3. Exclude long-lived SSE connections from the general rate limiter entirely.

Thanks!

主要言語
JavaScript
スター
9.1k
フォーク
848
平均マージ
14時間 39分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EvoMap/evolver のほかの issue

EvoMap/evolver の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。