# Limits and quotas During the beta every workspace has the same limits, unless Kilby has put it on a plan: then it has that plan's limits, which its Billing page shows, and nothing is charged until billing starts. They keep one workspace from using more than its share, and they are checked when you create, change, resume or roll back a service or a database. ## What a workspace may run | Limit | Today | Notes | |---|---|---| | Services (web, private and worker) | 5 | Suspended ones count too. | | Cron jobs | 5 | | | Postgres databases | 2 | | | Key Value instances | 3 | | | CPU | 2 cores | Every instance of every running service counts, and a database or a Key Value instance counts as one instance. With autoscaling, the maximum counts. | | Memory | 4 GB | Counted the same way as CPU. | | Disk | 50 GB | Database disks, Key Value disks and service disks together. A suspended service keeps its disk, so it still counts. | | Instances of one service | 1 to 10 | Within the CPU and memory above. | | Custom domains | 20 per workspace, 5 per service | | | Members | Unlimited | | | Workspaces you can own | 3 | | | Webhook endpoints | 5 | Per workspace. | | Slack channels | 5 | Per workspace. | | Environment groups | 20 per workspace, 100 variables in a group | A service can use up to 20 groups. | | Projects | 20 per workspace, 10 environments in a project | They organize the workspace. They share these limits: they do not add to them. | | Secret files | 10 per service, 128 KB each | 768 KB in all for a service, and 100 files or 8 MB for a workspace. | CPU and memory are counted from the **instance type** of what runs: see [Services](/docs/services.md#instance-types). A service with a maximum of 3 instances counts as 3 instances, even while it runs 1, so it can always scale up. A suspended service counts toward the number of services and its disk counts toward the disk limit, but its CPU and memory are free. Something you deleted stops counting at once, while Kilby is still removing it. Behind these limits, each workspace's namespace has a resource quota of 4 CPU and 8Gi of memory: twice the limit, so that a rolling deploy can briefly run the old and the new version side by side. The extra instance of a deploy does not count against the limits above. ## Other limits | What | Limit | |---|---| | Service name | 3 to 40 characters | | Database name | 3 to 30 characters | | Instances of one service | 1 to 10 | | Disk of a service | 1 to 50 GB, grows once every 6 hours at most | | Disk of a database | 1, 5, 10 and 20 GB at creation; it can grow by itself, up to the largest size you set and the workspace's disk limit | | Environment variables | 100 per service, values up to 8 KB, 512 KB in all | | Start command | 2000 characters | | Health check path | 200 characters | | A cron run | stopped after 1 hour | | Custom domains | 5 per service, 20 per workspace | | Manual database backups | 6 a day per database | | Webhook endpoints | 5 per workspace | | Shells | 3 at once per person, 20 minutes idle, 2 hours at most | | API requests | 300 a minute per key | | Kilby AI | 20 analyses a day per workspace | | Email over SMTP | on Pro and up; on Hobby and in the beta, ports 25, 465 and 587 to the internet are closed (see [Sending email](#sending-email)) | | Workspaces you can own | 3 | The size of a blueprint file and how many resources it can hold are in the [Blueprint reference](/docs/blueprints). ## Sending email On **Hobby** and in the **beta**, services cannot open connections to ports **25, 465 and 587** on the internet: free sign-ups are how spam gets sent from a platform, and one spammer can get every customer's mail refused. Send mail through an email service's **HTTPS API** instead, such as Amazon SES, SendGrid, Postmark or Resend: every one of them has one, and it is how most apps send mail anyway. Every other port is open as before. On **Pro** and up, SMTP is open. A workspace that existed before this rule kept SMTP as it had it. If you need SMTP on Hobby for a good reason, write to support: a Kilby admin can open it for your workspace. A change of plan reaches running services within a minute, without a restart. ## When you reach a limit The form or the API refuses the change and says which limit, for example: - "A workspace can have up to 5 services during the beta. Delete one to add another." - "That would exceed this workspace's limit of 2 CPU and 4 GB of memory during the beta (every instance counts, and the maximum when autoscaling). Choose a smaller instance type or fewer instances, or suspend or delete something else." - "That would exceed this workspace's limit of 50 GB of disk during the beta (databases and service disks together)." The API answers `422 invalid_request` with that message. A deploy that the cluster refuses because of the quota fails with the reason `quota`. ## Usage and prices The **Usage** page and `GET /api/v1/usage` show what your workspace ran this month. Billing is not live yet and nothing is charged. `GET /api/v1/pricing` lists the instance types, plans and list prices as JSON, without an API key. ## Outbound bandwidth Outbound bandwidth is what your web services send to their visitors. Each workspace plan includes some every month: 5 GB on Hobby, 25 GB on Pro and 1000 GB on Scale. Beyond that it costs $0.15 per GB, where a GB is 1,000,000,000 bytes, rated by the byte and rounded to the cent once on the invoice. **What counts.** The responses your web services send through Kilby's gateway, on their Kilby address and on your custom domains: headers and bodies, as your service sends them, measured every 30 seconds and added up per hour. **What does not count:** - Traffic between your services and to your databases, on the private network. - Redirects that Kilby answers for you (a custom domain set to redirect to another), and Kilby's own pages (a service that is starting, suspended or in maintenance). - Requests your visitors send to you (inbound traffic). - Connections your services open to the internet themselves, such as calls to other APIs or uploads elsewhere. Kilby does not measure them yet, so they are not billed. - Builds, logs, the shell and deploys. The Billing page shows the bandwidth of the month so far against what your plan includes, and the Usage page shows it per service. Kilby tells you at least 30 days before it starts to bill bandwidth; until that date it is measured and shown, and not billed. ## Related - [Services](/docs/services.md): instance types and what they cost. - [Disks and scaling](/docs/disks-scaling.md): disks and instances. - [Troubleshooting](/docs/troubleshooting.md): a deploy that failed on a limit. - [API keys and the API](/docs/api.md): the request rate limit.