orbi.to
orbi.to is the short url services
Another side project for me while exploring QwikJS with Cloudflare Workers. This project gives me an opportunity to learn new things in 2023.
Following the trend of serverless computing and recognizing how great Cloudflare Workers are, since Cloudflare Workers allow us to develop a JavaScript project and deploy it easily on their edge network around the world.
Project Concept
I want to create the fastest URL service based on Cloudflare Workers and other services. The Cloudflare network is fast by default and also has a D1 database and KV on the edge, which is conceptually really fast.
So I designed the proof of concept architecture as depicted in the following diagram (not really sure what type of diagram this is).
As depicted in the diagram above, each worker serves a single purpose to ensure the fastest response time possible.
- Worker A: Verifies and creates a short URL from the user request. One potential blocking point is the verification of the URL and saving it to the database. Caching is left to the queue using non-blocking function ctx.waitUntil().
- Worker B: Accesses the URL from the cache KV (one potential blocking point) and redirects the user. Tracking is left to the queue using non-blocking function ctx.waitUntil().
The API runs on Cloudflare Workers, and the front-end is built using QwikJS and runs on Cloudflare Pages.
This results in the orbi.to service. Why not check it out?
Project technology:
- Cloudflare workers
- Cloudflare D1 Database
- Cloudflare Queue
- Cloudflare KV
- Hono
- QwikJS (front end)
- Typescript
Based on the architecture and Cloudflare infrastructure, I believe orbi.to could become one of the fastest URL shortening services.
Performance benchmark
So I ran performance benchmark tests on short URLs that redirect to google.com, comparing them with six other services using the tinybench library.
The benchmark test was run on a Mac Mini M1 connected to Thailand's network with Cloudflare Warp's DNS query enabled.
The results were quite impressive to me.
Why not check out 👉 orbi.to and provide some feedback if you'd like to share your thoughts.