https://github.com/codaea/shortener
a URL shortener written in go
https://github.com/codaea/shortener
Last synced: about 1 year ago
JSON representation
a URL shortener written in go
- Host: GitHub
- URL: https://github.com/codaea/shortener
- Owner: Codaea
- Created: 2024-11-28T06:39:32.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-28T21:16:29.000Z (over 1 year ago)
- Last Synced: 2025-02-08T05:29:07.371Z (over 1 year ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Link Shortener
a basic link shortener written in go, using postgres as a backend
# How to use
make a shortened link
```sh
curl --request POST \
--url 'https://shorten.codaea.com/api/new?url=example.com'
```
this returns a `slug`. if you visit `shorten.codaea.com/` it will redirect you.
# Performance
## Just postgres, no caching.
with just postgres and no caching, on a virtual machine running with
4vCpu
4gb ram
it would top out on the current jmeter test at 613ms to create a link, and viewing at 282ms. with 1200 new links a second and 1370 new links a second
this was mostly database usage though, and if we use in memory go and redis it would go faster.