The edge cache is in private preview. Email support@useautumn.com to turn it on for your organization.
Why use the edge cache?
Everycheck and track is a network call from your server to Autumn. For most apps that is fast enough. For hot paths, like gating every AI request, you may want the answer without leaving your own network.
The edge cache is a small service that runs in your own AWS or GCP account. It holds a copy of your customers’ balances, answers check and records track locally. Autumn stays the source of truth and keeps the cache up to date.
How it works
- Your app calls
checkandtrackas usual. The SDK sends them to the edge cache first. - The edge cache answers checks from the balances it holds and deducts tracked usage on the spot. Responses are the same as the Autumn API’s.
- The edge cache sends tracked usage on to Autumn in the background. Whenever something changes in Autumn, like a plan change, Autumn pushes the new state back.
- If the edge cache can’t handle a call, it asks Autumn for you. If the edge cache is down, the SDK asks Autumn directly.
Setting up the edge cache
1
Name it, then pick a region and size
In the dashboard, open Settings → Edge cache. Give the edge cache a name, such as the region your servers run in, then pick an AWS region and a machine size.
2
Choose your network
Use a new VPC (reachable over the internet with TLS), or an existing VPC.With an existing VPC, enter its private subnets and pick how your app reaches the edge cache:
- Private: only from inside your VPC.
- Internet: over the internet, with a public URL and your secret key. Add at least two public subnets in different availability zones. They must route to an internet gateway.
3
Create the stack
Click Create stack in AWS. This opens a prefilled CloudFormation page in your AWS account. Create the stack there.
4
Copy the endpoint
Wait for the dashboard to show the edge cache as connected, then copy its endpoint URL from its page.
Choosing a size
Here’s what each size handled in our tests, rounded down. Checks per second are for both machines together, and each machine holds every active customer.
Active customers are customers checking or tracking at the same time. Your total number of customers isn’t capped.
When you set up an edge cache, the dashboard recommends a size from your calls to Autumn in that environment over the last 30 days, and selects it unless you’ve already picked one. It takes your busiest second, estimated as three times your average over your busiest five minutes, and your busiest hour of active customers. It then picks the smallest size that handles twice that rate and one and a half times those customers, so one machine can still carry your peak while the other restarts. Together, that keeps your busiest five minutes to about a sixth of what the size handles. Tracks and locks count against what each size handled of them, which is less than its checks. If no size is enough, it recommends XL. With no traffic yet it recommends nothing, and Medium stays selected. Calls answered by an edge cache you already run count too. Edge caches log only a sample of allowed checks, so customers only an edge cache saw may be undercounted, and a customer seen by both in the same hour counts twice.
We measured each size in November 2026 on its own EC2 instances, at a p99 under 50 ms, with a balance change on every third check.
Sending calls to the edge cache
Pass the edge cache’s endpoint URL to the SDK and turn onuseEdge. Your existing secret key works as is.
useEdge off and call it directly, for example autumn.edge.check().
Sending track to the edge cache needs autumn-js 1.6.69 or later, or the Python SDK (autumn-sdk) 1.3.73 or later. Older SDKs send check and the reads to the edge cache and send track straight to Autumn, so update the SDK to have tracked usage deducted at the edge.
The SDK gives each track sent to the edge cache its own idempotency key, so a track it has to send again to Autumn is still counted once. If you set an Idempotency-Key header on a track yourself, the SDK sends that track straight to Autumn.
Calling the edge cache without an SDK
You can call the edge cache over plain HTTP. It takes the same requests as the Autumn API, at the same paths, with the same secret key. Point the request at the edge cache’s endpoint URL instead ofhttps://api.useautumn.com.
The edge cache serves these paths:
POST /v1/balances.checkPOST /v1/balances.track, and the olderPOST /v1/trackPOST /v1/balances.finalizePOST /v1/customers.getandGET /v1/customers/{customer_id}POST /v1/entities.getandGET /v1/customers/{customer_id}/entities/{entity_id}POST /v1/customers.get_or_create
x-api-version header on every request. Without one, the edge cache hands the call to Autumn. Which version you need depends on the call:
- A
checkis answered at the edge with any version. A check that takes a lock, andbalances.finalize, need 2.6 or later. - The customer and entity reads need 2.3 or later.
- A
trackis recorded at the edge withx-api-version: 2.5or later. With 2.1 to 2.4, also send"async": truein the body. Earlier versions go to Autumn.
x-atom-forwarded header. A response without that header came from the edge cache itself.
The SDK falls back to Autumn for you. Over plain HTTP, do the same:
- If the edge cache doesn’t reply within 1 second, or replies with a 5xx that has no
x-atom-forwardedheader, send the same request to the Autumn API. - If a customer or entity read gets any other error without
x-atom-forwarded, send it to the Autumn API too. - Don’t resend a response that carries
x-atom-forwarded, whatever its status. Autumn has already handled that call.
- A
trackyou may resend needs anidempotency_keyin its body, a unique string per track. The edge cache and Autumn both use it, so the usage is counted once even if both receive the track. A409reply with codeduplicate_idempotency_keymeans the track is already recorded, so treat it as a success. The edge cache doesn’t read theIdempotency-Keyheader on a track. - A
checkwithsend_eventor a lock needs anIdempotency-Keyheader. Abalances.finalizeis settled once by its lock, so it is safe to send again.
One endpoint per edge cache
Each edge cache has its own endpoint URL, shown on its page under Settings → Edge cache. Pass a client theedgeURL of the edge cache it should use, usually the one closest to the servers it runs on. Every edge cache in an environment holds all of that environment’s customers, so any of them can answer for any customer.
Each environment can run up to three edge caches. Each one answers from its own copy, so a customer whose calls go to two edge caches at once can briefly be granted more than their balance; the extra lands in Autumn as overage.
What the edge cache handles
The edge cache answerscheck and records track. Tracked usage reaches Autumn in the background.
It also answers getting a customer and getting an entity (customers.get and entities.get). It answers customers.getOrCreate too, when the customer and entity already exist and the call would change nothing on them. The response is the same as Autumn’s.
Some tracks still go to Autumn, which records them as usual:
- A track for an entity (
entityId). - A track by event name (
eventName) instead of a feature. - A track with a value of zero or less.
- A track with
overageBehaviorortimestampset. - A track with
customerDataorentityData. - A track that waits for the deduction:
async: false, or an API version before 2.5 withoutasync: true. - A track the customer’s balance doesn’t cover.
trackTokens and batchTrack always go to Autumn.
A few other calls still go to Autumn, and you get the same response either way:
- Calls that create a customer or entity (
customerDataorentityData). - A
customers.getOrCreatethat would update the customer: filling in an empty name or email, changingsendEmailReceipts, creating the Stripe customer, or setting billing details. - Expands that need Autumn’s database or Stripe:
invoices,invoice_previews,payment_method,entities,rewards,referrals,trials_used,billing_details,billing_controls.auto_topups.purchase_limitandpooled_contributions. - A customer on a Stripe subscription, from a few seconds before their billing period ends until the renewed period reaches the edge cache.
- A customer within a few seconds of the end of a trial that Autumn runs itself.
- Customers with balance allocations.
- Calls made with an API version before 2.3.
- Getting an entity without a customer ID.
- Anything the edge cache doesn’t hold yet, like the first call for a new customer. It then fetches that customer, so their next calls are handled locally.
attach and every other call go straight to Autumn, as they do today.
How fresh is the edge cache?
Usage tracked through the edge cache is deducted there right away, so the next check is up-to-date. Changes made in Autumn, like a plan change or a balance edit in the dashboard, usually reach the edge cache in about 0.15 seconds. They take longer while Autumn is catching up on a backlog. So a customer read through the edge cache right after anattach can briefly show their plans from before the attach.
Changes Stripe makes to a subscription, like a renewal, a cancellation or a failed payment, reach the edge cache the same way, once Autumn has received them from Stripe.
When the edge cache or Autumn is down
- The edge cache is down or slow: the SDK sends the call to Autumn if the edge cache doesn’t reply within 1 second.
- The edge cache is overloaded: it hands calls to Autumn instead of slowing down.
- The edge cache turns down a read: if it can’t answer getting a customer or an entity, for example because it runs an older version, the SDK gets it from Autumn.
- The edge cache runs a version that doesn’t record
trackat this path yet: the SDK sends the track to Autumn. - Autumn is down: the edge cache keeps answering checks from the last balances Autumn sent it. Anything that must reach Autumn follows the SDK’s fail-open rules.
How long the edge cache keeps data
- A customer whose data hasn’t changed in Autumn for 7 days is removed from the edge cache.
- If the edge cache’s disk gets close to full, the customers whose data changed longest ago are removed first.
- A removed customer’s next call goes to Autumn as usual, and the edge cache fetches them again in the background.