https://github.com/pgedge/cloudflare-pgedge-latency-tests
Example application and test suite for measuring the latency of data access requests from Cloudflare Workers to pgEdge distributed PostgreSQL databases.
https://github.com/pgedge/cloudflare-pgedge-latency-tests
cloudflare-workers pgedge postgresql
Last synced: 4 months ago
JSON representation
Example application and test suite for measuring the latency of data access requests from Cloudflare Workers to pgEdge distributed PostgreSQL databases.
- Host: GitHub
- URL: https://github.com/pgedge/cloudflare-pgedge-latency-tests
- Owner: pgEdge
- License: mit
- Created: 2024-03-06T22:28:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T16:17:56.000Z (over 1 year ago)
- Last Synced: 2025-04-19T21:21:46.098Z (about 1 year ago)
- Topics: cloudflare-workers, pgedge, postgresql
- Language: HCL
- Homepage: https://www.pgedge.com
- Size: 47.9 KB
- Stars: 2
- Watchers: 14
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare to pgEdge Latency Tests
Example application and test suite for measuring the latency of data access
requests from Cloudflare Workers to pgEdge distributed PostgreSQL databases.
## The 100 ms Data Access Challenge
Can we use Cloudflare Workers and pgEdge to achieve <100 ms data access for
end-users located anywhere in the US and Europe?
See the corresponding blog post on [pgedge.com/blog](https://www.pgedge.com/blog).
## Technical Overview
- Deploy a free 3-node pgEdge PostgreSQL cluster [here](https://app.pgedge.com/).
- Deploy the Cloudflare Worker in this repository.
- Create a Cloudflare Hyperdrive associated with the pgEdge database and use
this in the Cloudflare Worker.
- Test request latencies from across the US and Europe by deploying VMs in
multiple Google Cloud regions and then running the [cmd/measure-latency](cmd/measure-latency)
tool to determine average latencies.
## Prerequisites
If you want to deploy and run this all yourself, you'll need the following:
- `npm` and `npx` installed
- Cloudflare account (free or $5/month Workers paid plan)
- pgEdge account (free Developer Edition plan)
- Terraform and Google Cloud (for measuring latencies)