# Pricing and costs

> forkrail is free and open source. You pay AWS for the servers and the traffic, at AWS’s own prices, on your own AWS bill.

- Category: Get started
- URL: https://www.forkrail.com/docs/pricing

## forkrail is free

There is no forkrail plan, seat price, bandwidth tier or invoice. forkrail is Apache-2.0 software you install in your own AWS account. AWS bills you for what runs there, and AWS credits, Savings Plans and private pricing apply as they do for anything else in the account.

## Fixed costs

These run whether or not anyone visits your apps. A fresh install in one region costs about **$1.80 a day, around $55 a month** (us-east-1 prices):

| Item | Per day | Per month |
| --- | --- | --- |
| Router: t4g.small with a fixed address | ~$0.45 | ~$14 |
| Log server: t4g.medium, 50 GB disk | ~$0.90 | ~$27 |
| Addresses, disks, KMS keys, audit trail | ~$0.45 | ~$14 |

- **A second router region** (a manual setup today) adds a router like the first, and AWS Global Accelerator to put both behind one anycast address ($0.025 an hour, about $18 a month, plus a per-GB premium).
- **A function region without a router** adds only an encryption key there, about $1 a month.

## Usage costs

Everything else is billed by use at AWS list prices. These are the rates forkrail’s own meters use for [spend limits](https://www.forkrail.com/docs/spend-budgets):

| What | AWS price | Notes |
| --- | --- | --- |
| Function time (Lambda, arm64) | $0.0000133334 per GB-second | Billed for the memory you set, from start to finish of each invocation. With concurrent compute, requests that overlap share one invocation. |
| Function invocations | $0.20 per million | One per worker start, not per request, when requests share a worker. |
| Data to visitors | $0.09 per GB | EC2 data transfer out, first 10 TB a month. Global Accelerator adds $0.015/GB in North America and Europe when you run more than one router region. |
| Router to workers | $0.01 per GB each way | $0.02 per GB between regions. |
| Static files | S3 storage and requests | About $0.023 per GB-month, $0.0004 per 1,000 reads. Files in a router’s memory cost nothing to serve. |
| Builds | Lambda time | The builder’s memory (4 GB, or 8 GB for large builds) for as long as each build runs. |
| Image Optimization | Lambda time and S3 | About $0.011 per 1,000 WebP resizes. Each image is resized once and kept. |

> **Free tiers:** AWS’s free allowances (for example a million Lambda requests and 100 GB of data transfer out a month) come off your bill as usual. forkrail’s spend meters leave them out on purpose, so a budget errs high, never low.

## Worked examples

Rough monthly AWS costs on top of the install’s fixed cost, at list prices with no free tier:

| App | Traffic | About |
| --- | --- | --- |
| Static site | 500,000 page views, 40 GB out | ~$3.60 to $4.60: transfer $3.60, plus S3 reads for files not already in the router’s memory. No function runs. |
| JSON API at 640 MB | 5 million requests at 150 ms, 10 GB out | Up to ~$8.40: Lambda time $6.25, invocations $1.00, transfer ~$1.10. Less when requests overlap on one worker. |
| SSR site at 1,024 MB | 2 million renders at 80 ms, 60 GB out | Up to ~$8.50: Lambda time $2.13, invocations $0.40, transfer ~$6.00. |

Lambda time is memory × duration: 5 million requests × 0.15 s × 0.625 GB = 468,750 GB-seconds, about $6.25, plus $1 for invocations if every request had its own. Run `forkrail usage` to see what each project actually used and cost, next to an estimate of the same traffic on Vercel.

## Keeping costs down

- **Right-size memory.** An API that mostly waits on other servers runs as fast at 256 MB as at 640 MB. Memory buys CPU (a full core at 1,769 MB), so CPU-heavy work like SSR benefits from more. See [Function settings](https://www.forkrail.com/docs/functions).
- **Leave concurrent compute on** for I/O-bound APIs, so overlapping requests share one worker.
- **Cache.** Pages and API responses with `s-maxage` are served by the router without running your function. See [Caching and ISR](https://www.forkrail.com/docs/caching).
- **Let the router compress.** It sends pages, JSON and other text in Brotli or gzip to clients that ask, so large answers shrink to about a tenth. Leave out compression middleware unless you need it; a route that sets `content-encoding: identity` turns it off.
- **Set a spend limit.** A budget pauses a project within about a second of being reached. See [Spend limits](https://www.forkrail.com/docs/spend-budgets).
