Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
IT NachrichtenSamsung Galaxy S26 FE review: false economy(24.09.2026 um 22:07 Uhr)
••••••••••
IT NachrichtenSamsung Galaxy S26 FE review: false economy(24.09.2026 um 22:07 Uhr)
•••••••••
Intelligence View
⚡ tsecurity.de Intelligence

I Put a 5MB Rust Binary Between My Code and Every LLM API — It Cut My Bill by 40%

Every developer using LLMs faces the same three problems: Cost blindness — you cannot answer "how much did I spend today?" No failover — when OpenAI goes down, your app goes down Wasted money — identical prompts hit the API over and ov…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Every developer using LLMs faces the same three problems:





  1. Cost blindness — you cannot answer "how much did I spend today?"


  2. No failover — when OpenAI goes down, your app goes down


  3. Wasted money — identical prompts hit the API over and over instead of being cached



I built llmux to fix all three with zero code changes.






What is llmux?



A single Rust binary (~5MB) that sits between your code and every LLM API. It handles failover, caching, rate limiting, and cost tracking automatically.




Your code (any language)
|
http://localhost:4000
|
┌──────┐
│ llmux │ ← single binary, ~5MB
└──┬───┘
│
┌────┼────┬────────┐
▼ ▼ ▼ ▼
OpenAI Claude Gemini Ollama









Zero Code Changes



You change one environment variable. That is it.




# Before
export OPENAI_BASE_URL=https://api.openai.com

# After
export OPENAI_BASE_URL=http://localhost:4000/v1






Your existing code — Python, TypeScript, Go, whatever — keeps working exactly the same. llmux intercepts the calls and adds superpowers.






Quick Start






git clone https://github.com/LakshmiSravyaVedantham/llmux.git
cd llmux
cargo build --release
cp config.example.toml config.toml
# Edit config.toml with your API keys
./target/release/llmux start






That is it. Your gateway is running.






What You Get








































Feature What it does
Multi-provider proxy Routes to OpenAI, Anthropic, Google, Mistral, Ollama
Automatic failover Provider down? Routes to next one automatically
Response caching Identical prompts return cached responses — saves money instantly
Token budgets Set daily spend caps — warn mode or hard block
Cost tracking Real-time cost estimation per model, per provider
TUI dashboard Live terminal dashboard showing spend, cache hits, request log
Request logging Every call logged to embedded SQLite — query anytime





The TUI Dashboard



Run llmux dash to see live stats:




┌─ llmux dashboard (q to quit) ──────────────────────┐
│ Requests today: 142 │
│ Cache hits: 38 (26.8%) │
│ Input tokens: 284,000 │
│ Output tokens: 71,000 │
│ Spend today: $3.4200 │
└─────────────────────────────────────────────────────┘
┌─ Recent Requests ───────────────────────────────────┐
│ Time Provider Model Status Cost │
│ 14:23:01 openai gpt-4 200 $0.0450 │
│ 14:22:58 openai gpt-4 200 $0.0000 │
│ 14:22:55 anthropic claude-sonnet 200 $0.0120 │
└─────────────────────────────────────────────────────┘






The second request shows $0.00 — that is a cache hit. Same prompt, zero cost.






How Failover Works



Configure providers with priorities:




[[providers]]
name = "openai"
api_key = "${OPENAI_API_KEY}"
priority = 1
base_url = "https://api.openai.com"

[[providers]]
name = "anthropic"
api_key = "${ANTHROPIC_API_KEY}"
priority = 2
base_url = "https://api.anthropic.com"






OpenAI returns a 5xx? llmux marks it unhealthy and routes to Anthropic. Connection refused? Same thing. Your app never sees the error.






The Cache Math



If 25% of your LLM calls are identical prompts (common in dev workflows, CI, repeated queries), and you spend $100/month:





  • Without llmux: $100/month


  • With llmux: $75/month (25% cache hits = $0)


  • With aggressive caching (1hr TTL): $60/month



The cache is an in-memory LRU with configurable TTL. Keys are SHA256 hashes of provider + request body. No data leaves your machine.






Budget Protection






[budget]
daily_limit_usd = 5.00
action = "block"






Set action = "warn" to log warnings, or "block" to return HTTP 429 when the limit is hit. Never wake up to a surprise LLM bill again.






Why Rust?





  • Single binary — no runtime, no dependencies, no Docker required


  • ~15MB RAM at steady state


  • <2ms proxy overhead per request


  • Thread-safe — handles concurrent requests with zero data races



The entire gateway is ~1,600 lines of Rust across 7 modules.






What is Next



llmux is the first in a trilogy:





  1. llmux (this project) — gateway, caching, cost tracking


  2. llm-lens — observability and tracing for AI agents, builds on llmux request capture


  3. llm-guard — runtime safety monitor, detects loops, hallucinations, budget overruns



Each one is standalone but they compose into a full AI agent infrastructure stack.






Try It






git clone https://github.com/LakshmiSravyaVedantham/llmux.git
cd llmux && cargo build --release






Star the repo if this is useful: github.com/LakshmiSravyaVedantham/llmux






llmux is MIT licensed and open source. Built with Rust, axum, tokio, ratatui, and rusqlite.

CTI Threat Relationship Graph3 Knoten / 2 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - I Put a 5MB Rust Binary Between My Code and Every LLM API — It Cut My Bill by 40%
id: 5d6b7a72-0a87-4dc0-ae20-379e3c16972c
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "I Put a 5MB Rust Binary Betwee" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("I Put a 5MB Rust Binary Between My Code ")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*I Put a 5MB Rust Binary Between My Code *"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "I Put a 5MB Rust Binary Between My Code "
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich I Put a 5MB Rust Binary Between My Code .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I Put a 5MB Rust Binary Between My Code and Every LLM API — It Cut My Bill by 40%

Thematisch verwandte Begriffe: Rust, Binary, Between, Code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61823 | code16 Sharp is a Laravel-based framework for building content-managemen…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle