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.

  •   966  
  •   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 Medium Rectangle Banner

Popular Projects

FluxBB

in Social Networks and Forums
 46k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 40k    1    1    0  

Teddit

in Social Networks and Forums
 26k    0    0    0  

Libre Translate

in Miscellaneous
 16k    0    0    0  

Dashboard

in Personal Dashboards
 15k    0    0    0  

Audiobookshelf

in Audio Streaming
 13k    0    1    0  

Libreddit

in Social Networks and Forums
 13k    0    1    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 40k    1    1    0  

Tube Archivist

in Automation
 7k    0    1    0  

OneDev

in Project Management
 5k    0    0    0  

iodine

in Proxy
 4k    0    0    0  

Alf.io

in Booking and Scheduling
 4k    0    0    0  

sysPass

in Password Managers
 2k    0    0    0  

Misskey

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

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

ReducePy logo
ReducePy cover

ReducePy

URL shortener service using Tornado and Redis runs on Docke…

shorturl logo
shorturl cover

shorturl

Simple URL shortener with very tiny URLs.

Lstu logo
Lstu cover

Lstu

Lightweight URL shortener.