reduc.io logo

reduc.io

  •  0 ratings
In category: URL Shorteners

About reduc.io

URL shortener service written in Scala, using Akka-Http and Redis.

  •   1272  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Self-host this app for $0.99/mo only!

Languages/Platforms/Technologies:
Lincenses:

More about reduc.io

❱ reduc.io ❰

URL shortener service http://reduc.io/wuXaq

Build Status Coverage Status

Tech stack

Alternative solutions

We could use following short code gen also:

substr(base62(md5(url)), 6) = 62 ^ 6 //unique short urls

Commands

Run

Run docker-compose, it will start api, redis and will expose api port to host.

docker-compose up

Sample usage

# Shorten
curl -i http://localhost:9001 -F "url=https://www.amazon.com/Star-Wars-Battlefront-II-Digital/dp/B072JZZ4XD"

# Call shortened url
for ((i=1;i<=100;i++)); do curl -i "http://localhost:9001/SEwuXHhBQw"; done

# Get Stats
curl -i "http://localhost:9001/stats/?url=https://www.amazon.com/Star-Wars-Battlefront-II-Digital/dp/B072JZZ4XD"

# returns: {"callCount":100}

Create executable

sbt packageBin

Test

sbt test

Gatling Simulation

Simulation users count can be set in application.conf in test resources.

# terminal 1
sbt run

# Run simulation in terminal 2
sbt gatling:test gatling:latestReport

Coverage with Report

sbt clean coverage test coverageReport

Improvements

  • Seperate read and write API's
  • Move statistics to different data store and API
  • Add DB support by having write master/replicas and have read replicas
  • Move hit counts to MapReduce job and generate them from the Web Server logs
  • Implement Authentication using JWT authentication protocol with OAuth2 authentication framework
  • API Documentation using swagger or similar
  • Add Host denyList
  • Add Retry policies for Redis calls using Retry or similar one
  • Add Throttling using akka-http-contrib
  • Add Metrics support using akka-http-metrics

z i λ a s a l.

Comments (0)

Please login to join the discussion on this project.

reduc.io Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

RackNerd tall Banner

Popular Projects

FluxBB

in Social Networks and Forums
 51k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 51k    1    1    0  

Teddit

in Social Networks and Forums
 28k    0    0    0  

Libre Translate

in Miscellaneous
 23k    0    0    0  

RustDesk

in Remote Access
 22k    0    0    0  

MeTube

in Automation
 18k    0    0    0  

Dashboard

in Personal Dashboards
 18k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 51k    1    1    0  

Tube Archivist

in Automation
 10k    0    1    0  

OneDev

in Project Management
 8k    0    0    0  

iodine

in Proxy
 5k    0    0    0  

Alf.io

in Booking and Scheduling
 6k    0    0    0  

sysPass

in Password Managers
 3k    0    0    0  

Misskey

in Social Networks and Forums
 7k    0    0    0  
pCloud Lifetime

Top Rated Projects

Technitium DNS Server

 1 rating
in DNS

Pydio

 1 rating
in File Transfer & Synchronization

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Gitea

 1 rating
in Project Management

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

shorturl logo
shorturl cover

shorturl

Simple URL shortener with very tiny URLs.

Shlink logo
Shlink cover

Shlink

URL shortener with REST API and command line interface. Inc…

Kutt logo
Kutt cover

Kutt

A modern URL shortener with support for custom domains.