cost of hosting omnirouter on cloudflare workers and D1

DevOps and Cloud

Hosting an Application like Omnirouter on Cloudflare Workers and D1

Hosting an application like Omnirouter, or similar proxy/routing services, on Cloudflare Workers and D1 is highly cost-effective and, in many cases, can be done entirely for free or for a flat base fee of $5 per month. Cloudflare does not charge for data transfer (bandwidth/egress), which makes it a popular choice for routing applications.

Cost Structure

The cost structure breaks down into two tiers: the Free Tier and the Paid Tier. The key features and costs of each tier are outlined in the following table:

FeatureWorkers (Free Tier)Workers (Paid Tier)
Base Monthly Cost$0Starting at $5.00 / mo
Compute Requests100,000 per day10 Million per month included (+$0.30 per additional million)
CPU Time Limit10 ms per invocationUp to 15 mins (charged $0.02 per million ms after 30M ms/mo)
D1 Rows Read5 Million per day25 Billion per month included (+$0.001 per additional million)
D1 Rows Written100,000 per day50 Million per month included (+$1.00 per additional million)
D1 Storage5 GB total5 GB included (+$0.75 per additional GB/mo)

Detailed Cost Breakdown

On the Free Tier, you get 100,000 requests per day, which is perfect for hobbyist projects, testing, or low-traffic routing. On the Paid Tier ($5/mo), you get 10 million requests per month included, with additional requests costing $0.30 per million. Cloudflare only counts active CPU time, meaning execution pauses during third-party API fetches do not count toward your CPU limits.

For D1, the Free Tier offers an incredibly generous 5 million rows read and 100,000 rows written per day. The Paid Tier scales massively, with 25 billion reads and 50 million writes a month before overages kick in. Even if you exceed these limits, overage costs are negligible (e.g., $0.001 per million reads).

Factors That Will Impact Your Final Bill

When choosing between Cloudflare Workers + D1 and OCI Ampere A1 (Always Free), consider the following factors:

FeatureCloudflare Workers + D1OCI Ampere A1 (Always Free)
ArchitectureServerless (V8 Isolates)Dedicated VPS (Virtual Machine)
Compute PowerShared, bursty, highly scalableUp to 4 ARM Cores / 24 GB RAM
Global LatencySuperior. Runs at the edge (300+ locations), closest to your users.Varies. Tied to the specific OCI data center region you select at setup.
MaintenanceZero. Cloudflare handles OS updates, scaling, and database maintenance.High. You must manage the Linux OS, security patches, Docker, and reverse proxies.
Connection LimitsScales effortlessly to thousands of concurrent requests.Limited by the single VM's RAM and network stack limits.
Back to all articles