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.

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

Deploy this app to RackNerd 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
 40k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 30k    1    1    0  

Dashboard

in Personal Dashboards
 10k    0    0    0  

Libreddit

in Social Networks and Forums
 9k    0    1    0  

Audiobookshelf

in Audio Streaming
 8k    0    1    0  

Libre Translate

in Miscellaneous
 8k    0    0    0  

CasaOS

in Self-hosting Solutions
 7k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 30k    1    1    0  

Tube Archivist

in Automation
 5k    0    1    0  

OneDev

in Project Management
 3k    0    0    0  

iodine

in Proxy
 3k    0    0    0  

Alf.io

in Booking and Scheduling
 3k    0    0    0  

sysPass

in Password Managers
 2k    0    0    0  

Misskey

in Social Networks and Forums
 3k    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

schort logo
schort cover

schort

No login, no javascript, just short links.

Shlink logo
Shlink cover

Shlink

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

Simply Shorten logo
Simply Shorten cover

Simply Shorten

A simple URL shortener that just shortens links.