Bifrost benchmark results
Performance measurements for Bifrost and LiteLLM under sustained load, gateway overhead tests, and high-throughput stress tests.
Benchmark summary
The benchmark compares Bifrost and LiteLLM using sustained load tests, gateway overhead measurements, high-throughput stress tests, and architecture-level differences.
Interactive charts use generated samples around the published benchmark values. Use the tables below for the fixed benchmark figures.
- Throughput. Bifrost processed 424 req/s and LiteLLM processed 44.84 req/s in the 500 RPS load test on AWS EC2. This is 9.5x higher throughput in the published data.
- Success rate. Bifrost completed 100% of requests and LiteLLM completed 88.78% of requests in the 500 RPS load test.
- P50 latency. Bifrost measured 804ms P50 latency and LiteLLM measured 38.65s P50 latency in the 500 RPS load test.
- P99 latency. Bifrost measured 1.68s P99 latency and LiteLLM measured 90.72s P99 latency in the 500 RPS load test. This is 54x lower P99 latency in the published data.
- Memory. Bifrost used 120 MB peak memory and LiteLLM used 372 MB peak memory in the 500 RPS load test. This is 68% lower peak memory in the published data.
- Gateway overhead. Bifrost measured 0.99ms gateway overhead and LiteLLM measured 40ms gateway overhead with a 60ms mock OpenAI upstream. This is 40x lower gateway overhead in the published data.
Performance at a glance
| Signal | Result | Condition |
|---|---|---|
| Throughput | 9.5x higher throughput | 424 req/s for Bifrost and 44.84 req/s for LiteLLM in the 500 RPS load test. |
| P99 latency | 54x lower P99 latency | 1.68s for Bifrost and 90.72s for LiteLLM in the 500 RPS load test. |
| Peak memory | 68% lower peak memory | 120 MB for Bifrost and 372 MB for LiteLLM in the 500 RPS load test. |
| Gateway overhead | 40x lower gateway overhead | 0.99ms for Bifrost and 40ms for LiteLLM with a 60ms mock OpenAI upstream. |
Test environment
These fields describe the 500 RPS Bifrost vs LiteLLM load test environment.
| Field | Value |
|---|---|
| Instance | t3.medium |
| CPU | 2 vCPU |
| Memory | 4GB RAM |
| Provider | AWS EC2 |
| Region | us-east-1 |
| OpenAI tier | Tier 5 |
| Duration | 60 seconds |
| Concurrent users | 500 VUs |
500 RPS load test
| Metric | Bifrost | LiteLLM | Description |
|---|---|---|---|
| Success Rate | 100% | 88.78% | Percentage of requests completed successfully |
| P50 Latency | 804ms | 38.65s | Median response time |
| P99 Latency | 1.68s | 90.72s | 99th percentile response time |
| Max Latency | 6.13s | 92.67s | Maximum observed response time |
| Throughput | 424 req/s | 44.84 req/s | Requests processed per second |
| Peak Memory | 120MB | 372MB | Maximum memory consumption |
Gateway overhead
Gateway overhead excludes the 60ms mock OpenAI response and measures the proxy processing time added by the gateway.
| Metric | Bifrost | LiteLLM | Description |
|---|---|---|---|
| Median Latency | 60.99ms | 100ms | Median end-to-end latency |
| Gateway Overhead | 0.99ms | 40ms | Internal processing time (excluding 60ms mock OpenAI call) |
| RPS Capacity | 500 req/s | 475 req/s | Maximum sustainable requests per second |
High-throughput stress test
The 5,000 RPS stress test records Bifrost-only internal overhead on two AWS EC2 instance sizes.
- t3.medium. 59µs internal overhead at 5,000 RPS with 100% success rate.
- t3.xlarge. 11µs internal overhead at 5,000 RPS with 100% success rate.
Architecture comparison
| Feature | Bifrost | LiteLLM |
|---|---|---|
| Language | Go | Python |
| Async Runtime | Goroutines | asyncio |
| HTTP Server | Fast http | FastAPI/Uvicorn |
| Memory Model | Efficient GC | GC-managed |
| Concurrency | Native goroutines | GIL-limited |
| Binary Size | ~80MB | ~500MB+ (with deps) |
| Open Source | Yes (Apache 2.0) | Yes (MIT) |
Key insights
- Optimized architecture. Bifrost uses Go, efficient parsing, and memory-optimized data structures to reduce allocations.
- Native concurrency. Bifrost uses Go goroutines to handle concurrent connections without the Python GIL bottleneck.
- Efficient memory model. Bifrost uses Go memory management to maintain consistent performance under load while using less memory in the benchmark.
Full analysis
Read the full benchmark analysis for methodology, test configuration, and detailed performance discussion. [Read full benchmark analysis]
Open Source & Enterprise
OSS Features
- 01Model Catalog. Access 8+ providers and 1000+ AI models through a unified interface. Also supports custom deployed models.
- 02Budgeting. Set spending limits and track costs across teams, projects, and models.
- 03Provider Fallback. Automatic failover between providers ensures 99.99% uptime for your applications.
- 04MCP Gateway. Centralize all MCP tool connections, governance, security, and auth. Your AI can safely use MCP tools with centralized policy enforcement. [MCP Gateway resource]
- 05Virtual Key Management. Create different virtual keys for different use cases with independent budgets and access control.
- 06Unified Interface. One consistent API for all providers. Switch models without changing code.
- 07Drop-in Replacement. Replace your existing SDK with just one line change. Compatible with OpenAI, Anthropic, LiteLLM, Google GenAI, LangChain, and more. [Drop-in replacement docs]
- 08Built-in Observability. Out-of-the-box OpenTelemetry support. Built-in dashboard for quick visibility without complex setup.
- 09Community Support. Active Discord community with responsive support and regular updates.
Enterprise Features
- 01Governance. SAML support for SSO and role-based access control with policy enforcement for team collaboration. [Governance resource]
- 02Adaptive Load Balancing. Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.
- 03Cluster Mode. High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.
- 04Alerts. Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook, and more.
- 05Log Exports. Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export for compliance, monitoring, and analytics.
- 06Audit Logs. Comprehensive logging and audit trails for compliance and debugging.
- 07Vault Support. Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.
- 08VPC Deployment. Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls. [Enterprise deployment resource]
- 09Guardrails. Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents. [Guardrails resource]
Drop-in replacement for compatible AI SDKs
Change one line of code to point compatible SDKs at Bifrost. Works with OpenAI, Anthropic, LiteLLM, Google GenAI, LangChain, and Vercel AI SDK. [Gateway setup docs] [Drop-in replacement docs]
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"),
base_url="https://<bifrost_url>/openai",
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)import os
from anthropic import Anthropic
anthropic = Anthropic(
api_key=os.environ.get("ANTHROPIC_API_KEY"),
base_url="https://<bifrost_url>/anthropic",
)
message = anthropic.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
)import litellm
# Set the base URL to your Bifrost deployment
litellm.api_base = "https://<bifrost_url>"
response = litellm.completion(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)import google.generativeai as genai
genai.configure(
api_key="YOUR_API_KEY",
transport="rest",
client_options={"api_endpoint": "<bifrost_url>/google"},
)
model = genai.GenerativeModel("gemini-pro")
response = model.generate_content("Hello!")- Point the SDK base URL at your Bifrost deployment.
- Keep API keys in your environment or secret manager.
- See the docs for provider-specific configuration and deployment steps.
Trust
- Benchmark methodology. The full analysis documents methodology, test configuration, and detailed performance discussion for the benchmark data. [Full benchmark analysis]
FAQ
How were the Bifrost vs LiteLLM benchmarks conducted?
The 500 RPS load test used AWS EC2 t3.medium instances in us-east-1 with 2 vCPU, 4GB RAM, Tier 5 OpenAI access, a 60-second test duration, and 500 concurrent virtual users. Gateway overhead tests used a 60ms mock OpenAI response. The 5,000 RPS stress test reports Bifrost internal overhead on t3.medium and t3.xlarge instances.
Why does Bifrost show lower latency than LiteLLM in these results?
Bifrost is built in Go, which compiles to native machine code and uses goroutines for lightweight concurrency. LiteLLM is Python-based, which means it is subject to the Global Interpreter Lock (GIL), asyncio overhead, and higher memory consumption from dynamic typing and garbage collection.
Does switching from LiteLLM to Bifrost require code changes?
No. Bifrost provides an OpenAI-compatible API, so you only need to change the base URL in your application. The same SDKs, request formats, and response structures work without modification.
What does "gateway overhead" mean in these benchmarks?
Gateway overhead measures the additional latency the proxy adds on top of the actual LLM provider response time. Bifrost adds approximately 11 microseconds of overhead per request in the 5,000 RPS t3.xlarge stress test.
Can Bifrost handle higher throughput than what the benchmarks show?
The published benchmark data covers a 500 RPS Bifrost vs LiteLLM load test and Bifrost-only 5,000 RPS stress tests on t3.medium and t3.xlarge instances. Bifrost maintains a 100% success rate in the published 5,000 RPS stress tests. Teams should validate higher targets on their own instance sizes, provider mix, and payload profile.