KALNET System Architecture
Level 1: Physical Network
Figure 1 — KALNET Physical Network. The ArchLinux host runs all services inside a Docker bridge network. Jellyfin, n8n, and Samba share NAS storage volumes. The Discovery service health-checks every registered service every 30 seconds. LAN clients connect via Ethernet or WiFi.
Trace ID Requirement Rationale Test Case KALNET-NET-001All services shall run within a Docker bridge network named “kalnet” Provides hostname-based service discovery and network isolation TC-KALNET-NET-001KALNET-NET-002The Discovery service shall health-check all registered services every 30 seconds Enables clients to show real-time service availability TC-KALNET-NET-002KALNET-NET-003NAS storage volumes shall be shared across Jellyfin, n8n, and Samba containers Eliminates data duplication and enables cross-service file access TC-KALNET-NET-003
Level 2: Data Flow - Media Streaming
Figure 2 — Media Streaming Data Flow. The TV requests media items from Jellyfin over HTTP. Jellyfin reads the library from the NAS storage Docker volume and streams the video back to the device.
Level 3: Data Flow - File Access (Samba)
Figure 3 — Samba File Access Data Flow. The laptop connects via SMB protocol. Samba authenticates the connection (guest mode), maps the request to the NAS storage volume, and returns the directory listing. The client can read and write files directly.
Level 4: Data Flow - Service Discovery
Figure 4 — Service Discovery Data Flow. A client queries the Discovery endpoint. The service probes each registered container over the Docker internal network (HTTP for Jellyfin and n8n, TCP for Samba) and aggregates statuses into a JSON response.
Level 5: Container Network (Internal)
Figure 5 — Docker Bridge Network. All containers share thekalnetbridge and resolve each other by hostname (e.g.jellyfin:8096). Each container receives a deterministic IP on the 172.20.0.0/16 subnet.
Level 6: Volume Architecture
Figure 6 — Volume Architecture. Four Docker volumes persist data across container restarts.nas-storageis the shared media volume consumed by Jellyfin, Samba, and n8n. Each service also has dedicated volumes for configuration and caches. Host paths map to/var/lib/docker/volumes/kalnet_*/.
Level 7: Service Dependencies
Figure 7 — Service Startup Sequence. Samba, Jellyfin, and n8n start in parallel at T=0. The Discovery service waits for all three (depends_on) before starting at ~T=15 s. Full operational readiness is reached at ~T=20 s, after which health checks begin every 30 seconds.
Level 8: Request Path Examples
Example 1: Watch a video on Living Room TV
Example 2: Backup files from Bedroom Laptop
Example 3: Living Room discovers all services
Failure Scenarios
If Jellyfin crashes
If Docker network fails
If NAS storage volume fills up
Performance Notes
Monitoring Checklist
This architecture allows:
- Isolation: Each service in own container
- Resilience: One service failure doesn’t affect others
- Discoverability: Devices know what services are available
- Scaling: Easy to add more services on same network
- Persistence: Volumes survive container restarts