Skip to content

Commit 02f480d

Browse files
committed
Creating a new consolidated FAQ page, using partials
1 parent 2893e23 commit 02f480d

File tree

5 files changed

+80
-50
lines changed

5 files changed

+80
-50
lines changed

src/content/docs/durable-objects/platform/limits.mdx

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,7 @@ For Durable Object classes with [SQLite storage](/durable-objects/api/storage-ap
8383

8484
<Render file="limits_increase" product="workers" />
8585

86-
## Frequently Asked Questions
87-
88-
### How much work can a single Durable Object do?
89-
90-
Durable Objects can scale horizontally across many Durable Objects. Each individual Object is inherently single-threaded.
91-
92-
- An individual Object has a soft limit of 1,000 requests per second. You can have an unlimited number of individual objects per namespace.
93-
- A simple [storage](/durable-objects/api/storage-api/) `get()` on a small value that directly returns the response may realize a higher request throughput compared to a Durable Object that (for example) serializes and/or deserializes large JSON values.
94-
- Similarly, a Durable Object that performs multiple `list()` operations may be more limited in terms of request throughput.
95-
96-
A Durable Object that receives too many requests will, after attempting to queue them, return an [overloaded](/durable-objects/observability/troubleshooting/#durable-object-is-overloaded) error to the caller.
97-
98-
### How many Durable Objects can I create?
99-
100-
Durable Objects are designed such that the number of individual objects in the system do not need to be limited, and can scale horizontally.
101-
102-
- You can create and run as many separate Durable Objects as you want within a given Durable Object <GlossaryTooltip term="namespace">namespace</GlossaryTooltip>.
103-
- The main limit to your usage of Durable Objects is the total storage limit per account.
104-
- If you need more storage, contact your account team or complete the [Limit Increase Request Form](https://forms.gle/ukpeZVLWLnKeixDu7) and we will contact you with next steps.
105-
106-
### Increasing Durable Object CPU limits
86+
## Increasing Durable Object CPU limits
10787

10888
Durable Objects are Worker scripts, and have the same [per invocation CPU limits](/workers/platform/limits/#worker-limits) as any Workers do. Note that CPU time is active processing time: not time spent waiting on network requests, storage calls, or other general I/O, which don't count towards your CPU time or Durable Objects compute consumption.
10989

@@ -122,3 +102,7 @@ By default, the maximum CPU time per Durable Objects invocation (HTTP request, W
122102
```
123103

124104
</WranglerConfig>
105+
106+
## Frequently asked questions
107+
108+
<Render file="do-faq-limits" product="durable-objects"/>

src/content/docs/durable-objects/platform/pricing.mdx

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -122,32 +122,4 @@ In this scenario, the estimated monthly cost would be calculated as:
122122

123123
## Frequently Asked Questions
124124

125-
### Does an empty table / SQLite database contribute to my storage?
126-
127-
Yes, although minimal. Empty tables can consume at least a few kilobytes, based on the number of columns (table width) in the table. An empty SQLite database consumes approximately 12 KB of storage.
128-
129-
### Does metadata stored in Durable Objects count towards my storage?
130-
131-
All writes to a SQLite-backed Durable Object stores nominal amounts of metadata in internal tables in the Durable Object, which counts towards your billable storage.
132-
133-
The metadata remains in the Durable Object until you call [`deleteAll()`](/durable-objects/api/storage-api/#deleteall).
134-
135-
### When does a Durable Object incur duration charges?
136-
137-
A Durable Object incurs duration charges as long as the JavaScript object is held in memory. Once an object has been evicted from memory, the next time it is needed, it will be recreated (calling the constructor again). There are two factors which decide when an object may be evicted from memory: hibernatability and existence of clients.
138-
139-
A Durable Object is considered hibernatable any time that it is not waiting for any I/O or callbacks that depend on the in-memory state.
140-
141-
- For example, if an object calls `fetch()` and awaits the response, it is considered to be waiting for I/O, and so cannot hibernate.
142-
143-
- Less obvious to a user, if an object calls `setTimeout()` to schedule a callback in the future - no matter how far in the future - then it is considered non-hibernatable, since there would be no way to recreate the callback after hibernating.
144-
145-
- Additionally, if the Durable Object has received an incoming request and has not fully responded yet, then it cannot be hibernated, because hibernating would mean losing track of the async function which is eventually supposed to return a response to that request.
146-
147-
- As an exception, a WebSocket request which has explicitly been accepted using the [WebSocket hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) allows a Durable Object to hibernate even while the WebSocket is still connected.
148-
149-
150-
151-
Once a Durable Object has been in a hibernatable state for 10 consecutive seconds, it hibernates, and duration billing stops.
152-
153-
Even if a Durable Object never becomes hibernatable, it will still be evicted once all clients have gone away. A Durable Object is considered to have clients if any other Worker currently holds a stub pointing to the Durable Object, or is waiting for a response from the Durable Object. An incoming WebSocket connection counts as a client. If the object is currently responding to an alarm event, this also counts as having a client. When not hibernatable, a Durable Object will be evicted from memory after it has had no client for 70-140 seconds (the exact interval varies). But again, if the object is hibernatable, then the 10-second hibernation timeout takes precedence and the 70-140 second no-client timeout is moot.
125+
<Render file="do-faq-pricing" product="durable-objects"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: FAQs
3+
pcx_content_type: concept
4+
sidebar:
5+
order: 12
6+
7+
---
8+
9+
import { Render } from "~/components";
10+
11+
## Pricing FAQs
12+
13+
<Render file="do-faq-pricing" product="durable-objects"/>
14+
15+
## Limits FAQs
16+
17+
<Render file="do-faq-limits" product="durable-objects"/>
18+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
{}
3+
---
4+
5+
import {GlossaryTooltip} from "~/components";
6+
7+
### How much work can a single Durable Object do?
8+
9+
Durable Objects can scale horizontally across many Durable Objects. Each individual Object is inherently single-threaded.
10+
11+
- An individual Object has a soft limit of 1,000 requests per second. You can have an unlimited number of individual objects per namespace.
12+
- A simple [storage](/durable-objects/api/storage-api/) `get()` on a small value that directly returns the response may realize a higher request throughput compared to a Durable Object that (for example) serializes and/or deserializes large JSON values.
13+
- Similarly, a Durable Object that performs multiple `list()` operations may be more limited in terms of request throughput.
14+
15+
A Durable Object that receives too many requests will, after attempting to queue them, return an [overloaded](/durable-objects/observability/troubleshooting/#durable-object-is-overloaded) error to the caller.
16+
17+
### How many Durable Objects can I create?
18+
19+
Durable Objects are designed such that the number of individual objects in the system do not need to be limited, and can scale horizontally.
20+
21+
- You can create and run as many separate Durable Objects as you want within a given Durable Object <GlossaryTooltip term="namespace">namespace</GlossaryTooltip>.
22+
- The main limit to your usage of Durable Objects is the total storage limit per account.
23+
- If you need more storage, contact your account team or complete the [Limit Increase Request Form](https://forms.gle/ukpeZVLWLnKeixDu7) and we will contact you with next steps.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
{}
3+
---
4+
5+
### Does an empty table / SQLite database contribute to my storage?
6+
7+
Yes, although minimal. Empty tables can consume at least a few kilobytes, based on the number of columns (table width) in the table. An empty SQLite database consumes approximately 12 KB of storage.
8+
9+
### Does metadata stored in Durable Objects count towards my storage?
10+
11+
All writes to a SQLite-backed Durable Object stores nominal amounts of metadata in internal tables in the Durable Object, which counts towards your billable storage.
12+
13+
The metadata remains in the Durable Object until you call [`deleteAll()`](/durable-objects/api/storage-api/#deleteall).
14+
15+
### When does a Durable Object incur duration charges?
16+
17+
A Durable Object incurs duration charges as long as the JavaScript object is held in memory. Once an object has been evicted from memory, the next time it is needed, it will be recreated (calling the constructor again). There are two factors which decide when an object may be evicted from memory: hibernatability and existence of clients.
18+
19+
A Durable Object is considered hibernatable any time that it is not waiting for any I/O or callbacks that depend on the in-memory state.
20+
21+
- For example, if an object calls `fetch()` and awaits the response, it is considered to be waiting for I/O, and so cannot hibernate.
22+
23+
- Less obvious to a user, if an object calls `setTimeout()` to schedule a callback in the future - no matter how far in the future - then it is considered non-hibernatable, since there would be no way to recreate the callback after hibernating.
24+
25+
- Additionally, if the Durable Object has received an incoming request and has not fully responded yet, then it cannot be hibernated, because hibernating would mean losing track of the async function which is eventually supposed to return a response to that request.
26+
27+
- As an exception, a WebSocket request which has explicitly been accepted using the [WebSocket hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) allows a Durable Object to hibernate even while the WebSocket is still connected.
28+
29+
30+
31+
Once a Durable Object has been in a hibernatable state for 10 consecutive seconds, it hibernates, and duration billing stops.
32+
33+
Even if a Durable Object never becomes hibernatable, it will still be evicted once all clients have gone away. A Durable Object is considered to have clients if any other Worker currently holds a stub pointing to the Durable Object, or is waiting for a response from the Durable Object. An incoming WebSocket connection counts as a client. If the object is currently responding to an alarm event, this also counts as having a client. When not hibernatable, a Durable Object will be evicted from memory after it has had no client for 70-140 seconds (the exact interval varies). But again, if the object is hibernatable, then the 10-second hibernation timeout takes precedence and the 70-140 second no-client timeout is moot.

0 commit comments

Comments
 (0)