Compute resources are the fundamental units that represent the processing power and memory available to your Nhost projects. The primary compute resources are vCPU and RAM. This documentation outlines the key aspects of compute resources in the context of the Nhost Cloud Platform.
Shared vs Dedicated Compute
Free Projects are given a total of 2 shared vCPUs and 1 GiB of RAM:
- Postgres: 0.5 vCPU / 256 MiB
- Hasura GraphQL: 0.5 vCPU / 384 MiB
- Auth: 0.5 vCPU / 256 MiB
- Storage: 0.5 vCPU / 128 MiB
Pro Projects are given a total of 2 shared vCPUs and 2 GiB of RAM:
- Postgres: 0.5 vCPU / 512 MiB
- Hasura GraphQL: 0.5 vCPU / 768 MiB
- Auth: 0.5 vCPU / 384 MiB
- Storage: 0.5 vCPU / 384 MiB
This is fine if your apps mostly run at low to medium load, occasionally burst for brief periods of time, and can tolerate drops in performance. It is important to understand that the availability of CPU time is not guaranteed.
On the other hand, for high production workloads where latency is important, or variable performance is not at all tolerable, you should consider configuring your project to use dedicated compute resources. With dedicated compute, resources are guaranteed for your project so you don't have to contend for them.
In addition to the resources fully dedicated to the project, apps are allowed to burst if demand requires it and resources are available. If properly sized, dedicated resources should guarantee the performance of your application while allowing for occassional burts.
To configure dedicated compute to your projects, all you have to do is navigate to the project's settings, and click on "Compute Resources" (see image below). There you will be able to choose the total amount of resources you want to dedicate, and spread those resources amongst all services.
To further improve availability and fault tolerance, you can also leverage Service Replicas. To learn more, check out the documentation for Service Replicas.