Reference
Instances

Instances

Instances are the runtime units that execute your project's code. When your application is deployed, the code is built and packaged into a container image and run as an Instance.

Under the hood, Instances are Firecracker microVMs (opens in a new tab) which serve as a thin, isolated, high performance wrapper around your code. Each Instance is associated with a single Deployment of a Service and runs in one of Koyeb's regions.

Instance types

The Instance type determines the resources (CPU, Memory, Disk) allocated to your application. You can select your Instance type in your Service's Deployment configuration. You can customize the Instance type running in each region when deploying to multiple regions.

The Standard Instance types include:

Instance typevCPURAMDiskPrice
nano0.25256MB2.5GB SSD$2.68/month
($0.000001/second)
micro0.5512MB5GB SSD$5.36/month
($0.000002/second)
small11GB10GB SSD$10.71/month
($0.000004/second)
medium22GB20GB SSD$21.43/month
($0.000008/second)
large44GB40GB SSD$42.85/month
($0.000016/second)
xlarge88GB80GB SSD$85.71/month
($0.000032/second)
2xlarge1616GB160GB SSD$171.42/month
($0.000064/second)
3xlarge2432GB240GB SSD$342.84/month
($0.000128/second)
4xlarge3264GB320GB SSD$685.67/month
($0.000256/second)
5xlarge40128GB400GB SSD$1371.34/month
($0.000512/second)

The Eco Instance types (available in Washington, D.C., Frankfurt, and Singapore) include:

All plans can deploy 1 Instance of the free type. This lets you to deploy a web Service to the Frankfurt or Washington, D.C. regions with 512MB of RAM, 0.1 vCPU, and 2GB of SSD.

We are currently rolling out a change that will make free Instances sleep when no inbound traffic is detected for two minutes. They will automatically wake up within 500ms of receiving new traffic.

Instance typevCPURAMDiskPrice
free0.1512MB2GB SSD$0.00/month
($0.000000/second)
eco-nano0.1256MB2GB SSD$1.61/month
($0.0000006/second)
eco-micro0.25512MB4GB SSD$2.68/month
($0.000001/second)
eco-small0.51GB8GB SSD$5.36/month
($0.000002/second)
eco-medium12GB16GB SSD$10.71/month
($0.000004/second)
eco-large24GB20GB SSD$21.43/month
($0.000008/second)
eco-xlarge48GB20GB SSD$42.85/month
($0.000016/second)
eco-2xlarge816GB20GB SSD$85.71/month
($0.000032/second)

GPU Instance types (available in Frankfurt) include:

GPU Instances are currently in private preview. Join the private preview (opens in a new tab) to get access to GPUs for your organization. We are gradually onboarding users to ensure the best experience for everyone.

Instance typeRTX 4000 SFF ADAV100L4L40S
GPU vRAM20GB16GB24GB48GB
GPU Memory Bandwidth280GB/s900GB/s300GB/s864GB/s
RAM44GB44GB44GB96GB
vCPU683030
On-Demand Price$0.50/hr$0.85/hr$1/hr$2/hr

Instance life cycle

Each Instance's life cycle is closely related to that of the Deployment it belongs to. Instance health statuses affect Deployment health statuses and that health status bubbles up to the Service and App levels. Likewise, changes in Service configuration affect how Instances start and stop and whether they receive traffic routed to the application.

When deploying from a git repository, Instances will be provisioned once the build succeeded. When deploying from a container registry, Instances will be provisioned when the image is downloaded and other requirements are met.

When an Instance responds to health checks as expected, Koyeb will mark the Instance as healthy and add it to the group of Instances that are targets for load balancing. If an Instance stops responding to health checks or fails to reach a healthy state during initial provisioning, it will be marked as unhealthy.

If an Instance is not working correctly, a new Deployment is promoted, or the Instance's Service is deleted, the Instance will be stopped. This will remove the Instance from the Service load balancer's list of targets and then stop and delete the Instance.

Instance statuses

Instances can have several statuses during their life cycle:

  • Allocating: A start request has been received and the Instance is about to start.
  • Starting: The Instance is running but health checks have not yet succeed.
  • Healthy: The Instance is running and health checks are succeeding.
  • Unhealthy: The Instance is running but health checks are failing.
  • Sleeping: The Instance is healthy but sleeping due to inactivity. New requests will wake the Instance within 500ms.
  • Stopping: The Instance is being stopped. This happens when a Service change is requested and the Deployment that the Instance is associated with is stopping.
  • Stopped: The Instance is stopped.
  • Error: The Instance failed to start.

In addition to the Instance status, messages are provided with additional information. These messages can be helpful when troubleshooting problems with a specific Instance or a Deployment.

Check out the troubleshooting page to learn more about how to troubleshoot your Services, Deployments, and Instances.

You can learn more about MicroVMs and Firecracker reading the following articles: