EdgeGuard · Cloud Computing SS2026 · Frankfurt UAS

Edge AI Surveillance
on a Raspberry Pi Cluster

A 10-node heterogeneous cluster running real-time AI inference, Kubernetes orchestration, MPI benchmarks, and an elastic auto-scaler — built and benchmarked from scratch.

✓ All 10 Tasks Complete Prof. Dr. Christian Baun Presentation: July 16, 2026 · Room 1-234 · 14:15 github.com/nauman-iftikhar/Edgeguard
Cluster Architecture

Hardware Nodes

  • master-node (Pi 5)
    10.10.10.1 · 8GB RAM · Hailo AI HAT+ (26 TOPS)
    k3s control plane · DHCP/TFTP/NFS server · PostgreSQL · MinIO · Prometheus · Grafana · AI inference
  • sensor-node (Pi 4)
    10.10.10.40 · AI Camera Module
    ZMQ video stream publisher · Auto-scaler emergency compute node
  • pi3-01 to pi3-08 (Pi 3B+)
    10.10.10.21–28 · 1GB RAM each · 4 cores each
    7× PXE diskless boot over NFS · 1× SD card (pi3-06)
    k3s workers · MPI compute nodes · 32 total cores

Network Topology

External WiFi (wlan0) │ 192.168.x.x (hotspot) ┌─ Pi 5 — master-node ──────────────────┐ eth0 · 10.10.10.1 Hailo NPU · k3s · NFS · DHCP/TFTP └─────────────────┬─────────────────────┘ │ 100Mbit/s ┌─────────────┴──────────────────┐ │ Switch 1 │ │ pi3-01 to pi3-06 │ └────────────┬───────────────────┘ │ uplink ┌────────────┴───────────────────┐ │ Switch 2 │ │ pi3-07, pi3-08, Pi4 │ └────────────────────────────────┘
Key Results at a Glance
14–17ms
AI inference latency per frame
on Hailo NPU · 20 FPS @ 1080p
16.2×
MPI Monte Carlo Pi speedup
at 32 cores · 10B points
6.41×
Matrix Multiplication speedup
at 32 cores · N=3500
11.92
GFLOPS peak — HPL benchmark
at 32 cores · N=15000
1.93×
Task Distributor speedup
at 8 nodes · 3200×2400 POV-Ray
~90s
Auto-scaler response time
Pi4 joins k3s cluster on CPU spike
Task Overview
Task 1
Infrastructure Setup
PXE Boot NFS k3s DHCP/TFTP
Assembled a heterogeneous 10-node cluster: Pi5 as master running Hailo AI HAT+, Pi4 as camera node, and 8× Pi3 workers booting disklessly over PXE/NFS — no SD cards required on 7 of 8 workers. k3s Kubernetes deployed with pod anti-affinity for genuine high availability.
Task 2
HPL Benchmark (GFLOPS)
HPCC 1.5.0 MPI LINPACK NB=128
Measured cluster GFLOPS using the industry-standard High Performance LINPACK benchmark across 7 core counts (1–32). Problem size N scaled with available RAM per configuration. Pi3-02 power instability documented and mitigated. Peak: 11.92 GFLOPS at 32 cores (13.3% of theoretical ARM peak — typical for this class of cluster).
Task 3
MPI Deployment & Scaling Laws
OpenMPI Monte Carlo Pi Matrix Multiply Amdahl Gustafson
Deployed OpenMPI across 8 Pi3 nodes (32 cores). Two custom MPI programs in C demonstrate contrasting scaling behaviors: Monte Carlo Pi (O(1) communication, 16.2× at 32 cores) and Matrix Multiplication (O(N²) communication, 6.41× at N=3500). Both Amdahl's Law (fixed problem size) and Gustafson's Law (scaled problem size) demonstrated across 6 problem sizes and 6 core counts with 5 runs each.
Task 4
Task Distributor (Non-MPI)
POV-Ray SSH ImageMagick NFS lockfile
Used Prof. Baun's own Task Distributor tool to benchmark non-MPI parallel scaling via POV-Ray ray-tracing. Tested 4 resolutions (400×300 to 3200×2400) across 1–8 nodes with 5 runs each. Shows Amdahl's Law clearly at small resolutions (8 nodes SLOWER than 1) improving to 1.93× at 3200×2400. Memory/tmpfs limit confirmed at 4800×3600.
Task 5
Monitoring Solution
Prometheus Grafana Node Exporter
Prometheus deployed for time-series metrics from all 10 nodes. Grafana provides per-node CPU, RAM, and temperature dashboards. The EdgeGuard backend exposes a /api/system/status endpoint driving the live cluster health grid in the React dashboard. Auto-scaler reads Prometheus cluster CPU averages every 10 seconds.
Task 6
AI Object Detection (Hailo NPU)
YOLOv8n Hailo HEF ZMQ Roboflow
YOLOv8n trained for face coverage detection (suspicious behavior). Model converted PT → ONNX → HEF for the Hailo-8L NPU via Hailo Model Zoo. Inference runs at 14–17ms per frame on the Hailo AI HAT+ (vs 2–3 min/frame on CPU — ~8000× speedup). Video streamed via ZMQ PubSub at ~50ms latency replacing a laggy 2–4s HTTP MJPEG stream.
Task 7
Backend Development
Flask PostgreSQL JWT MinIO k3s
Flask REST API deployed as 2 k3s replicas with pod anti-affinity for genuine high availability. Migrated from SQLite to PostgreSQL 3-replica StatefulSet. Handles authentication, alert storage, benchmark persistence, MinIO snapshot storage, and real-time cluster status. Survives individual node failures via k3s automatic pod rescheduling.
Task 8
Frontend Dashboard
React nginx REST Dark/Light
React SPA deployed as 2 k3s replicas. Seven pages: Live Camera, Alerts, Cluster Monitoring, Auto-Scaler, Pod Distribution, Benchmark Results, and User Admin. Benchmark Results page features interactive speedup charts, MPI vs Non-MPI toggle, hover tooltips, and methodology cards. Full dark/light mode theming throughout.
Task 9
Telegram Notification Bot
Telegram Bot API Real-time alerts
Telegram Bot sends formatted real-time alerts to team group chat on suspicious event detection or cluster health events (node offline, CPU spike triggering auto-scaler). Messages include event type, timestamp, camera ID, confidence score, and MinIO snapshot link.
Task 10
Documentation & Presentation
GitHub Pages Live Demo Poster
Comprehensive GitHub Pages documentation covering all 10 tasks with code blocks, reproduce commands, and benchmark methodology. The live EdgeGuard dashboard serves as the primary demonstration artifact. Physical poster summarizing architecture and key findings. Final presentation: July 16, 2026 · Room 1-234 · 14:15–17:15.
Team
Nauman Iftikhar
Task 1 Infrastructure
Task 2 HPL
Task 3 MPI
Task 6 AI Inference
Abdur Rahim Nishad
Task 2 HPL
Task 4 Task Distributor
Task 10 Documentation
Negar Mohammadi
Task 3 MPI
Task 9 Telegram Bot
Ikbela Halili
Task 3 MPI
Task 9 Telegram Bot
Muhammad Abdullah Nagori
Task 5 Monitoring
Task 10 Documentation
Muhammad Saleem
Task 7 Backend
Task 8 Frontend
Task 10 Documentation
Muhammad Furqan Shafique
Task 7 Backend
Task 8 Frontend
Task 10 Documentation
Krish
Task 4 Task Distributor
Task 9 Telegram Bot
Task 10 Documentation
Start: Task 1 — Infrastructure →