Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add rate limits page (#843)

Vasek Mlejnsky2c3b01b3cb2d
diff --git a/apps/web/src/app/(docs)/docs/sandbox/rate-limits/page.mdx b/apps/web/src/app/(docs)/docs/sandbox/rate-limits/page.mdx
new file mode 100644
index 000000000..33ea4422b
--- /dev/null
+++ b/apps/web/src/app/(docs)/docs/sandbox/rate-limits/page.mdx
@@ -0,0 +1,125 @@
+# Rate Limits
+
+This page describes API and sandbox rate limits of the E2B platform.
+
+## Table of Contents
+
+- [Sandbox lifecycle & management API](#sandbox-lifecycle-and-management-api)
+- [Sandbox operations & requests to sandboxes](#sandbox-operations-and-requests-to-sandboxes)
+- [Concurrent Sandboxes](#concurrent-sandboxes)
+- [Sandbox creation rate](#sandbox-creation-rate)
+- [Reaching limits](#reaching-limits)
+- [Increasing and avoiding rate limits](#increasing-and-avoiding-rate-limits)
+
+Here's a limits breakdown table based on the plan:
+
+<table style={{ border: '2px solid #FFB766', borderCollapse: 'collapse' }}>
+ <thead>
+ <tr style={{ background: '#000', color: 'white' }}>
+ <th style={{ textAlign: 'left', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Plan</th>
+ <th style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Hobby</th>
+ <th style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Pro</th>
+ <th style={{ textAlign: 'center', padding: '8px', border: '2px solid #FFB766' }}>Enterprise</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style={{ fontWeight: 'bold', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Sandbox lifecycle &amp; management API</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>20,000 / 30s</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>20,000 / 30s</td>
+ <td style={{ textAlign: 'center', padding: '8px', border: '2px solid #FFB766' }}>Custom</td>
+ </tr>
+ <tr>
+ <td style={{ fontWeight: 'bold', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Sandbox operations</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>40,000 / 60s per IP</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>40,000 / 60s per IP</td>
+ <td style={{ textAlign: 'center', padding: '8px', border: '2px solid #FFB766' }}>Custom</td>
+ </tr>
+ <tr>
+ <td style={{ fontWeight: 'bold', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Concurrent sandboxes</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>10</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>100 - 1,100<b><sup>*</sup></b></td>
+ <td style={{ textAlign: 'center', padding: '8px', border: '2px solid #FFB766' }}>Custom</td>
+ </tr>
+ <tr>
+ <td style={{ fontWeight: 'bold', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>Sandbox creation rate</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>1 / sec</td>
+ <td style={{ textAlign: 'center', padding: '8px', borderRight: '2px solid #FFB766', border: '2px solid #FFB766' }}>5 / sec</td>
+ <td style={{ textAlign: 'center', padding: '8px', border: '2px solid #FFB766' }}>Custom</td>
+ </tr>
+ </tbody>
+</table>
+
+<Note>
+ <b><sup>*</sup></b> Pro plan default is 100 concurrent sandboxes. Higher concurrency up to 1,1000 is available as a separate addon that can be purchased.
+</Note>
+
+---
+
+## Sandbox lifecycle & management API
+
+**20,000 requests per 30 seconds**
+
+This rate limit applies to lifecycle and management operations such as sandbox create, kill, update, list, and other.
+
+---
+
+## Sandbox operations & requests to sandboxes
+
+**40,000 requests per 60 seconds**
+
+This rate limits applies to operations to/within running sandboxes such as running code, listing files, running commands, etc.
+This also includes requests made to custom ports in the sandbox.
+
+<br/> This limit is enforced globally across all sandbox operations from a single IP address.
+
+---
+
+## Concurrent sandboxes
+
+Number of concurrent sandboxes differs based on the pricing tier.
+
+### Hobby tier
+**Up to 10 concurrent sandboxes**
+
+### Pro tier
+**Starts at 100 concurrent sandboxes**
+
+<Note>
+Can go up to 1,100 with a separate addon available for purchase.
+</Note>
+
+
+### Enterprise tier
+**Custom limit - 1,100+ concurrent sandboxes**
+
+---
+
+## Sandbox creation rate
+
+This limit controls how quickly you can create new sandboxes.
+
+### Hobby tier
+**1 sandbox per second**
+
+
+### Pro tier
+**5 sandboxes per second**
+
+### Enterprise tier
+**Custom limit - 5+ sandboxes per second**
+
+## Reaching limits
+
+When you reach the limits of your plan, subsequent requests/function calls will be effectively dropped and return the following:
+- the `429 Too Many Requests` HTTP status code (when calling API/sandbox ports directly)
+- `RateLimitError` in the JS/TS SDK
+- `RateLimitException` in the Python SDK
+
+For example, if you're on the Pro tier (without any concurrency addons) you can create up to 100 sandboxes running concurrently.
+If the 100 sandboxes are still running, requests for creating new sandboxes from the SDKs (`Sandbox.create()` in JS/TS or `Sandbox()` in Python) will fail and return `RateLimitError` or `RateLimitException` respectively.
+After the number of running sandboxes drops below 100 or you purchase the concurrency addon, you'll be able to create new sandboxes again.
+
+## Increasing and avoiding rate limits
+
+You can avoid rate limits by either increasing your plan or contacting our sales team to discuss your specific requirements and we can provide tailored limits to meet your needs at [[email protected]](mailto:[email protected]).
\ No newline at end of file
diff --git a/apps/web/src/components/Navigation/routes.tsx b/apps/web/src/components/Navigation/routes.tsx
index 20ad8208d..55a8be8ed 100644
--- a/apps/web/src/components/Navigation/routes.tsx
+++ b/apps/web/src/components/Navigation/routes.tsx
@@ -314,6 +314,10 @@ export const docRoutes: NavGroup[] = [
title: 'Connecting storage bucket',
href: '/docs/sandbox/connect-bucket',
},
+ {
+ title: 'Rate limits',
+ href: '/docs/sandbox/rate-limits',
+ },
{
title: 'Installing beta SDKs',
href: '/docs/sandbox/installing-beta-sdks',