Public showcase mirror of our distributed systems university project.
Mini-CDN is a student project that implements core CDN components such as origin, router, edge, and CLI tooling.
This repository is a public showcase copy. The original university submission and internal project management stayed on GitLab.
For architecture notes, meeting logs, and technical documentation, check out the Wiki.
For the development backlog, implemented features, and tracked tasks, see the Issues.
Mini-CDN ist ein von Gruppe 8 im Modul Verteilte Systeme entwickeltes vereinfachtes Content Delivery Network (CDN).
Das System besteht aus einem Origin-Server, einem Router und mehreren Edge-Servern.
Der Origin-Server speichert die Originaldateien. Edge-Server cachen Inhalte regional, um Downloads näher am Benutzer bereitzustellen. Der Router übernimmt die Weiterleitung von Anfragen und entscheidet anhand der Region, welche Edge-Instanz verwendet wird.
Benutzer können über die CLI Dateien herunterladen. Administratoren können Dateien hochladen, die Infrastruktur verwalten sowie Statistiken und Laufzeitinformationen des Systems abrufen.
Im Projekt bezeichnet der Begriff Server jeweils einen eigenständigen HTTP-Port.
Die Anwendung basiert auf einer Client-Server-Architektur und ist als Multi-Maven-Projekt umgesetzt.
java -version # Java 21
mvn -version
cp .env.example .envmvn clean verify
mvn clean package
mvn -pl cli -am package -DskipTests
mvn spotless:apply
mvn spotbugs:check
java -jar cli/target/cli-1.0-SNAPSHOT-exec.jar system initsystem login --name admin
Important
Einige Benutzerbefehle wie user stats ... setzen einen Login voraus.
lsof -i:8080 -i:8081 -i:8082
curl http://localhost:8080/api/origin/health
curl http://localhost:8082/api/cdn/health
admin file upload --region EU --path docs/a.pdf --file ./a.pdfOptional mit expliziter Router-URL:
admin file upload --router http://localhost:8082 --region EU --path docs/a.pdf --file ./a.pdf
admin file listadmin file show --path docs/a.pdfadmin file download --region EU --path docs/a.pdf --out ./a.pdfadmin file delete --region EU --path docs/a.pdfadmin stats showadmin stats show --host http://localhost:8082admin stats show --jsonadmin edge managedadmin edge start --region EU --port 8085 --origin http://localhost:8080 --auto-register=true --wait-readyadmin config origin show
admin config origin set --max-upload-bytes 1048576 admin config origin set --log-level INFOadmin config origin show --origin http://localhost:8080admin config origin spare showadmin config origin spare show --check-healthadmin config origin spare add --url http://localhost:8084admin config origin spare remove --url http://localhost:8084 admin config origin spare promote --url http://localhost:8084 admin config origin spare failover-checkadmin config edge showadmin config edge set --default-ttl-ms 120000 --max-entries 200admin config edge show --edge http://localhost:8081admin config edge set --region EU --replacement-strategy LFUadmin edge start --region EU --port 8088 --origin http://localhost:8080 --wait-readyadmin edge managedadmin edge stop edge-94371 --forceadmin edge stop-region --region EU --forceadmin user add --name alice --role 1Rollen:
- 0 = USER
- 1 = ADMIN
admin user listadmin user delete --id 3admin ping -H http://localhost:8082 -p api/cdn/healthadmin ping -H http://localhost:8080 -p api/origin/healthuser file download --region EU --path pdfTest.pdf --out ./manual3.pdf --host http://localhost:8082
user stats file --file-id 1user stats list user stats list --limit 20Gesamtstatistik des aktuell eingeloggten Benutzers anzeigen:
user stats overall
user stats overall --window-sec 7200