Slave Package š Blazing Fast S3 Powered CDN ⨠Powered By Fastify, S3 Buckets & Docker! (W.I.P)
1.5K
Blazing Fast S3 Powered CDN, Powered By Fastify, S3 Compatible Buckets & Docker!
docker-compose.ymlversion: "3.9"
services:
cdn:
image: maximking19/wasicdn-slave
build: .
network_mode: host
environment:
- name=UK # Location Name
- PORT=3005 # The Port For The CDN
- adminPassword="yg6g4byugeuybygbiygyugbyuftuftufvtufvtfytdfcytftufytfc"
- mongodb="mongodb://" # Your MongoDB Connector For The User & Files Database
- files="local" # "s3" or "local", Where the CDN files are downloaded from. (Local = Pulls From The Core Server Uploads Folder, S3 = Pulls From The S3 Bucket)
- coreServerIP="localhost:3010" # Where the core server is located (IP:PORT) (Can Find Port in Docker Compose Core Config Under adminPort. Default: 3010)
- discordWebhook="https://discord.com/webhook/" # Discord Webhook For Files Uploads and User Audit Logs
# s3 Bucket Details (If using s3)
- s3Provider="" # Amazon AWS S3 "aws", Google Cloud Storage "gcs", Microsoft Azure Blob Storage "azure", DigitalOcean Spaces "digitalocean", Wasabi Object Storage "wasabi" (Custom S3 Bucket use = "s3compatible")
# - endpoint="" # If using "s3compatible", add endpoint here
# - region="" # If using "aws" or "digitalocean"
- accessKeyID=""
- secretAccessKey=""
- bucketName=""
volumes:
- /usr/lib/cdn-slave/uploads:/usr/src/CDN/slave/uploads # Where the uploads are stored (/host/path:/container/path)
Core DockerHub: https://hub.docker.com/r/maximking19/wasicdn-coreā
Features:
⢠Fastify Powered Backend
⢠Built in Load Balancer which directs the connection to the closest server to the user
⢠Each Slave CDN pulls files from your selected S3 Bucket or local system, each slave location has a copy and distributes them to users.
⢠Directs users to the closest server by checking the IP Location and sending them to the correct way
ā ( Wasabi S3 ) ā --> Fetches files from the S3 Bucket
ā ||| ā
ā ||| ā
ā / \ ā
ā / \ ā
ā / \ ā
ā[ UK Server ][ US Server ] ā --> Replicates the files from the S3 Bucket to each server (Replicates at every location)
ā \ / ā
ā \ / ā
ā \ / ā
---------------------
ā ( Request ) ā
ā | b | ā
ā | d | ā
ā --------------------- ā
ā | Delivery System | ā --> Checks the request IP, and forwards there request to the closest server (Checks the IP's location to determine cloest server)
ā --------------------- ā
ā ||| ā
ā --------------------- ā
ā | Load Balancer | ā --> Redirects the request to the least stressed server in the location (UK1: 50%, UK2:25% - Would forward to UK2 as lowest System load)
ā --------------------- ā --> Load Balancer Not Realeased (W.I.P)
ā ||| ā
ā --------------------- ā
ā | CDN | ā --> Serves the requested file on the cloest server to them
ā --------------------- ā
ā ||| ā
ā / \ ā
ā / \ ā
ā / \ ā
ā [ Data ] [ File ] ā --> Dispatches both the Data and CDN File to the destination
ā \ / ā
ā \ / ā
ā \ / ā
ā ------------------- ā
ā Destination ā --> File received! :)
ā ------------------- ā
Content type
Image
Digest
Size
411.8 MB
Last updated
over 4 years ago
docker pull maximking19/wasicdn-slave