Choose a dedicated server #
On this page
Prompt:
Move this app to Dedicated 4 GB. Tell me when the new server is serving.
A dedicated server has its CPU and memory reserved for your application. It runs on a machine shared with other customers’ dedicated servers. Choose Dedicated 4 GB or Dedicated 8 GB for the production environment of an existing server application. Dedicated 4 GB reserves 1 CPU and 4 GiB of memory. Dedicated 8 GB reserves 2 CPUs and 8 GiB of memory.
Dedicated 4 GB and Dedicated 8 GB are for unbilled accounts. Billed accounts can’t move to these sizes yet. Turn Zero records dedicated server usage once a day, based on the size your app has. For an unbilled account, that usage takes nothing from the balance. Production stays awake on a dedicated size. It can restart if its machine is reimaged during the weekly maintenance window. Development stays on shared compute and still sleeps when idle.
What your AI does #
- Checks your application's current size and whether development is set to match it.
- Requests the size you chose and follows the change with
read_status. - Reports how long the new copy has been waiting for a machine, if it has to wait, and checks which size is serving when the change ends.
What you need #
- An existing server application. If it already serves on production, Turn Zero replaces the serving copy when you change size. If you need a new app, start with either shared size.
- An unbilled account and a signed-in AI assistant.
- Your choice of Dedicated 4 GB or Dedicated 8 GB. Use
read_plan_quotaswithplanset to the size's ID to compare its limits.
Steps #
1. Check the current settings #
Read list_applications for the application ID and read_status for its size and production hostname. If application.development_at_size is true, development must return to its usual shared size first. Confirm that change with the owner if they haven’t already agreed to it. Then call set_app_size with development_at_size: false. If applying names a development version, check that it succeeds before moving production.
2. Request the dedicated size #
Call set_app_size with the application ID and size: "dedicated-4gb" or size: "dedicated-8gb". Leave production sleep and the development size out of that call. A completed move to dedicated records production sleep as off.
3. Wait for the new server to serve #
If the answer gives applying, call read_status with wait_seconds for applying.environment. Follow applying.version until the change ends. Leave out brief to keep the step history. If deploy.step is waiting_for_node, Turn Zero is starting a machine or waiting for room on one. Report the wait using deploy.step_started_at. A later deploy or restart can wait for a machine too.
In one development test, the move to Dedicated 4 GB took about 1 minute 52 seconds while Turn Zero started a machine. The move to Dedicated 8 GB took about 13 seconds with room on an existing machine. The move back to Shared 0.5 GB also took about 13 seconds. Your move may take longer if Turn Zero needs a machine.
The production address stays the same. The old copy keeps serving until the replacement passes its health check and takes traffic.
When the change settles, check the version's outcome and application.size. With no applying, check the recorded size. The size may already be set, or production may have no copy to replace. If the wait reaches 15 minutes without a machine, the new version fails with node_unavailable. Turn Zero removes the replacement and keeps the previous size and settings. Try the change again when capacity is available.
4. Move back to shared #
Call set_app_size with size: "shared-0.5gb" or size: "shared-1gb". Follow the same status checks. Once the shared size takes effect, you can change its sleep setting or set development to match in a separate call.
Expected result #
read_status shows the requested size and the same production hostname. If a version serves, the status also names it. When the size is dedicated, it reports production_sleep: false and development stays shared. If no version serves yet, verify the size and version after the first deployment or promotion.
Refusals #
This table covers some refusals. For more, see Refusals in Size and usage.
| Refusal | Cause | Remedy |
|---|---|---|
size_not_open |
A billed account requested a dedicated size before sales opened. | Keep the current size or choose another shared size. |
development_at_size_set |
Development is set to match production, or the request would turn that setting on. | Turn off development matching and wait for it to finish. Request the size in a separate call. |
invalid_request |
A request turns on sleep for a dedicated size or turns on development matching while production is dedicated. | Leave out production_sleep: true and keep development matching off while production is dedicated. |
dedicated_capacity or group_full |
The application's location cannot place the new copy. | Wait for capacity before trying the size change again. |
Related #
- Size and usage explains size settings and how to read their limits.
- Refusals explains the API error names.