User can post a file
Managing permission
User can download a file
User Authentication
update file
Highly Availabilit - User needs to get files and share without any downtime as possible
Low Latency - User should be able to download the files quickly
User DAU - 100M
File upload per user per day - 1
File size average - 100MB
100MB * 100m * 365 * 10 - expected storage required for 10 year service
36TB
/api/postfile
Req Body:
{
raw file
UID
}
Res Body :
{
URL for storing file
}
/api/getfile
Req Body:
{
URL for storing file
UID
}
Res Body :
{
raw file
}
/api/grantPermission
Req Body:
{
UID
URL
granted Uid
}
Res Body:
{
status
}
/api/updateonFile
Req Body:
{
UID
URL
Raw File
}
Res Body:
{
status
}
we can skip auth api endpoint but will go over it on HLD
File data
{
hashedURL (PK: String)
UID (FK: String)
Created By (date)
File URL
}
Permission
{
PermissionID (PK: String)
hashedURL (FK: String)
UID (FK: String)
}
User Data
{
Uid (PK : String)
User name
}
User Service can hold User table from RDBMS meta data
Client can move through Load Balancer and rout to multiple service
Object Storage will be connected to file service for accessing file