README
Welcome to myURL 👋
A blazing fast, planet-scale, easy-to-use serverless URL shortener!
The secret sauce is deep integration with CDN and aggressively caching everything.
Homepage
🏠Install
npm i -g myurl # or
yarn global install myurl
Prerequisites
Unfortunately some things can't be automated. e.g. migrating to Route53?
Usage
npx myurl domain.name
Architecture
I was originally going to build this using Cloudflare workers + Cloudflare K/V, BUT then I found out I can't have access logs without paying for the Enterprise plan, so here's Plan B:
AWS
CloudFront allows access log to be stored in S3, and with that we can do any sort of analysis on that. An additional benefit of this approach is that you can use whatever tool you already have that analyzes access logs on S3, so you don't have to be locked in to the analytics of your link shortener!
And the plan here is to have CloudFront trigger lambdas on any URLs, the lambdas would check DynamoDB for any records, and then instruct CloudFront to cache the results!
This aggressive caching of redirects should make requests instantaneous, while the use of Lambda and DynamoDB would make it 1. serverless (you don't have to maintain anything), and 2. planet-scale!
Run tests
yarn test
Author
👤 Jane Jeon
- Github: @JaneJeon
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2019 Jane Jeon.
This project is AGPL-3.0 licensed.