{"slug": "show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram", "title": "Show HN: A2a-gateway – Rust A2A v1.0 and MCP 2.0 gateway (973 RPS, 13.5 MB RAM)", "summary": "A developer released a2a-gateway, an open-source Rust edge gateway for A2A (Agent2Agent) v1.0 and MCP 2.0 (2026-07-28) agent traffic, installable via `cargo install a2a-gateway`. Benchmarked on a GCP Always Free e2-micro instance in us-central1 with 300 concurrent SendMessage JSON-RPC requests at concurrency=10, the gateway plus the optional langextract-agent and langextract-core 0.3.0 stack sustained 973.6 RPS with p50/p95/p99 end-to-end latency of 8.99 ms/18.24 ms/25.21 ms and under 13.5 MB combined RSS. The gateway enforces JSON media types before body parsing to block cross-origin text/plain and form-encoded CORS requests, adds optional constant-time Bearer auth and per-tenant token-bucket rate limiting, and emits zero-PII JSONL telemetry that excludes message bodies, prompts, headers and IP addresses.", "body_md": "Lean, production-grade **Rust A2A (Agent2Agent v1.0) Edge Gateway** engineered for low-memory VMs (such as GCP Always Free `e2-micro`), featuring:\n\n- **Strict Edge Media-Type / CSRF Defense:** Enforces`application/json` or`application/*+json` (including`application/a2a+json` ) before body parsing, blocking cross-origin`text/plain` and form-encoded CORS simple requests with JSON-RPC`-32005` (`CONTENT_TYPE_NOT_SUPPORTED` ).\n- **Constant-Time Auth & Per-Tenant Rate Limiting:** Optional Bearer token verification + lightweight token-bucket rate limiter per tenant (`/{tenant}/agents/{agent_id}` ).\n- **Dynamic Agent Discovery & Aggregated Card:** Discovers upstream`/.well-known/agent-card.json` endpoints and serves a deterministic aggregated A2A v1.0 Agent Card.\n- **Zero-Copy SSE Streaming Passthrough:** Proxies`SendStreamingMessage` /`text/event-stream` responses chunk-by-chunk with no buffering.\n- **Zero-PII Mizan Telemetry:** Emits structured JSONL metrics (`ts_ms` ,`tenant` ,`agent_id` ,`rpc_method` ,`status` ,`streaming` ,`latency_ms` ,`bytes_in` ,`bytes_out` ) — never logs message bodies, prompts, headers, or IP addresses.\n- **Stateless MCP 2.0 (`2026-07-28`) Discovery Facade:** Exposes registered healthy A2A skills via`POST /mcp` (`server/discover` and`tools/list` ) with`cacheScope` and`ttlMs` .\n- **Optional `langextract-agent` Binary (`--features langextract-agent`):** Ships a zero-LLM-cost A2A v1.0 agent powered by[` langextract-core`](https://crates.io/crates/langextract-core) for deterministic text cleaning, chunking, and snippet grounding.\n\nMeasured live on `mizan-cloud-prod` (`e2-micro`, `us-central1`, 300 concurrent `SendMessage` JSON-RPC requests at concurrency=10, full round-trip `a2a-gateway` -> `langextract-agent` -> `langextract-core 0.3.0` + JSONL telemetry):\n\n| Metric | Measured Value | \n|---|---|\n| **Throughput** | **973.6 RPS** (`300 reqs` in`0.308s` ) | \n| **End-to-End Latency (p50 / p95 / p99)** | **8.99 ms / 18.24 ms / 25.21 ms** | \n| **`langextract-core` Compute (p50 / p95 / p99)** | **25 us / 41 us / 71 us** | \n| **`a2a-gateway` RSS (idle / post-bench)** | **5.4 MB / 6.5 MB** | \n| **`langextract-agent` RSS (idle / post-bench)** | **4.0 MB / 6.8 MB** | \n| **Combined Stack Memory** | **< 13.5 MB RSS** | \n\n```\n# 1. Aggregated A2A v1.0 Agent Card\ncurl -s https://a2a.35-209-222-203.sslip.io/.well-known/agent-card.json\n\n# 2. Stateless MCP 2.0 (2026-07-28) Discovery\ncurl -s -X POST https://a2a.35-209-222-203.sslip.io/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"server/discover\"}'\n\n# 3. Live A2A v1.0 SendMessage (clean, chunk & ground snippets via langextract-core)\ncurl -s -X POST https://a2a.35-209-222-203.sslip.io/agents/langextract \\\n  -H \"Content-Type: application/json\" \\\n  -H \"A2A-Version: 1.0\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"SendMessage\",\"params\":{\"message\":{\"messageId\":\"demo-1\",\"role\":\"ROLE_USER\",\"parts\":[{\"text\":\"Rust A2A Edge Gateway runs in 5.4 MB RSS on GCP e2-micro.\"}]},\"metadata\":{\"maxChars\":120,\"overlap\":10,\"snippets\":[\"5.4 MB RSS\"]}}}'\n# Install from crates.io\ncargo install a2a-gateway\n\n# Or build with the optional LangExtract A2A v1.0 agent\ncargo install a2a-gateway --features langextract-agent\n\n# Run with config\ncp a2a-gateway.example.toml a2a-gateway.local.toml\na2a-gateway a2a-gateway.local.toml\n```\n\n| Endpoint | Purpose | \n|---|---|\n| `GET /health/live` | Liveness probe | \n| `GET /health/ready` | Readiness probe (reports healthy upstream agent count) | \n| `GET /.well-known/agent-card.json` | Aggregated A2A v1.0 Agent Card merging healthy upstream skills | \n| `POST /agents/{agent_id}` | JSON-RPC 2.0 & SSE proxy (default tenant) | \n| `POST /{tenant}/agents/{agent_id}` | Multi-tenant JSON-RPC 2.0 & SSE proxy | \n| `POST /mcp` | Stateless MCP 2.0 ( `2026-07-28` )`server/discover` &`tools/list` facade | \n\n```\ncargo test --all-targets --all-features\ncargo clippy --all-targets --all-features -- -D warnings\ncargo fmt --check\n```\n\n", "url": "https://wpnews.pro/news/show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram", "canonical_source": "https://github.com/csa7mdm/a2a-gateway", "published_at": "2026-12-06 05:17:00+00:00", "updated_at": "2026-12-06 05:45:40.247390+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-infrastructure"], "entities": ["a2a-gateway", "Agent2Agent (A2A) v1.0", "MCP 2.0", "langextract-agent", "langextract-core 0.3.0", "Rust", "Google Cloud Platform e2-micro"], "also_reported_by": [], "takeaway": "The a2a-gateway Rust binary proxies A2A v1.0 JSON-RPC and SSE traffic plus a stateless MCP 2.0 discovery facade at 973.6 RPS with p99 latency of 25.21 ms and under 13.5 MB combined RSS on a GCP e2-micro, so agent gateways can run on free-tier VMs.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram", "markdown": "https://wpnews.pro/news/show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram.md", "text": "https://wpnews.pro/news/show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram.txt", "jsonld": "https://wpnews.pro/news/show-hn-a2a-gateway-rust-a2a-v1-0-and-mcp-2-0-gateway-973-rps-13-5-mb-ram.jsonld"}}