amandesai01 / StorageService

A Highly Scalable Storage Service πŸ“¦ - Implemented using Consistent Hashing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StorageService

A Highly Scalable Storage Service πŸ“¦ πŸš€ - Implemented using Consistent Hashing

Problem

If we have to change the hash function every time we scale up or down and if this requires us to move not all but even half of the data, the process becomes super expensive and in longer run infeasible. So we need a way to minimize the data movement required during scale-ups or scale-downs, and this is where Consistent Hashing fits in and minimizes the required data transfer.

Solution

Consistent Hashing addresses this situation by keeping the Hash Space huge and constant, somewhere in the order of [0, 2^128 - 1] and the storage node and objects both map to one of the slots in this huge Hash Space. Unlike in the traditional system where the file was associated with storage node at index where it got hashed to, in this system the chances of a collision between a file and a storage node are infinitesimally small and hence we need a different way to define this association.

SERVICES PROVIDED:

  • UploadService βœ”οΈ
  • DownloadService
  • Authentication

CREDITS : https://arpitbhayani.me/blogs/consistent-hashing

About

A Highly Scalable Storage Service πŸ“¦ - Implemented using Consistent Hashing


Languages

Language:JavaScript 100.0%