Telescope is a smart adaptive bitrate (ABR) proxy system designed for streaming content over the InterPlanetary File System (IPFS). It dynamically adjusts video quality based on network conditions and cache awareness, enhancing the efficiency and user experience of decentralized video delivery.
This version of Telescope is an enhanced iteration of the NetSys Lab's Telescope project. We have rebuilt the system, replacing all emulations and simulations with real-world applications and methodologies. The ultimate objective is to deliver a stateless, scalable, and high-performance smart adaptive bitrate proxy that leverages IPFS as its storage layer.
- Dynamic ABR Logic: Rewrites DASH MPDs in real-time using IPFS, Gateway, and Client bandwidth estimations.
- Cache Awareness: Tracks segment caching status to optimize quality selection.
- Statistical Bandwidth Estimation: Dynamically adjusts bandwidth predictions by incorporating probabilistic models for replica selection, ensuring more accurate quality adaptation in multi-replica environments.
- Stateless Microservices: Replaces stateful proxy servers with scalable, stateless services.
- Modern Observability: Real-time metrics with Prometheus and distributed tracing with OpenTelemetry (Jaeger).
- DASH.js Integration: Fully compatible with DASH.js for live testing of streaming behavior.
- Improved Architecture: Clean, modular project structure with faster service using Go-Fiber.
- Scalable Proxy System: Designed to handle high traffic and large-scale deployments.
- Migration from Gin to Go-Fiber for improved performance.
- Redesigned ABR logic aligned with formal analysis and research papers.
- Enhanced observability with Prometheus metrics and OpenTelemetry tracing.
- File-based segment cache tracking system for better cache management.
- Support for stateless microservices to improve scalability and reliability.
Telescope acts as a smart proxy between a DASH video player and IPFS. It intercepts video segment requests, estimates network conditions and caching status, and dynamically rewrites the video manifest (MPD) to guide adaptive quality selection.
-
Manifest Request:
- The DASH.js player requests the
.mpdmanifest from Telescope. - Telescope fetches the segment CID list from IPFS and rewrites the MPD based on bandwidth estimations (
Tcas client estimation,Tgas gateway bandwidth,Tnas IPFS bandwidth). - The rewritten MPD is returned to the player.
- The DASH.js player requests the
-
Segment Request:
- The player requests video segments from Telescope.
- Telescope fetches the segment from IPFS (or serves it from the cache if available).
- The segment is streamed back to the player.
- Telescope updates
TgandTnfor next requests.
Client->>Proxy: GET /videos/bunny.mpd
Proxy->>IPFS: Fetch segment CID list
Proxy->>Proxy: Rewrites MPD based on Tc, Tg, Tn
Proxy-->>Client: Returns adaptive MPD
Client->>Proxy: GET /videos/bunny_128256bps/seg1.m4s
Proxy->>IPFS: Fetch segment or serve cached
Proxy-->>Client: Stream segment
Telescope provides real-time metrics and distributed tracing to support debugging, monitoring, and performance optimization.
- IPFS RTT (Round-Trip Time): Measures segment fetch latency from storage.
- Bandwidth Estimation: Calculates bandwidth based on segment size and transfer time in client, proxy server (gateway), and IPFS network.
- Throughput Tracking: Tracks client-reported throughput via HTTP headers.
- Cache Awareness: Monitors per-segment cache hit/miss ratios.
- Video Quality: Monitors the requested quality from client.
- Stall Rate: Calculates the client stall-rate.
Quality of Experience (QoE) is evaluated using two key metrics: Video Quality and Stall Rate. QoE is calculated as a balance between these metrics, aiming to optimize the trade-off between high video quality and minimal playback interruptions. The goal is to maintain QoE at an optimal level, avoiding extremes of either metric to ensure a smooth and satisfying user experience.
- Prometheus: Exposes metrics at
:9090/metrics. - OpenTelemetry: Provides distributed tracing with full support for Jaeger.
- Zap Logger: Log enhancement using zap logger.
bootstrap/ # Uploads the video content to IPFS storage
proxy/ # Telescope project
βββ cmd/ # Main entry points for the proxy
βββ internal/ # Core application logic
β βββ controllers/ # ABR logic and MPD rewriting
| βββ logr/ # Zap logger
β βββ storage/ # IPFS and Cache management
β βββ telemetry/ # Metrics and observability
public/ # Telescope's client written by DASH.js
scripts/ # Project setup scripts
services/ # IPFS, Prometheus, Bootstrap, and Proxy config files
docker-compose.yaml # Execute project using Docker
- First run the following scripts to download and encode videos.
scripts/videos/fetch.shscripts/videos/encode.sh
- Then run
docker-compose up -d ipfs0 ipfs1 ipfs2 - After that run cluster bootstrap script
scripts/cluster/bootstrap.sh - Then run
docker-compose up -d bootstrap - After that you can run other services
docker-compose up -d telescope prometheus jaeger
Or you can run setup.sh to execute these commands in order.
After a successful deployment, you should be able to see the followings:
- Telescope proxy UI at
localhost:5050 - Prometheus UI at
localhost:9090 - Jaeger UI at
localhost:16686
bootstrap: Uploads all video file inbp/idpto IPFS. It stores the results inbp/data.txt.telescope: Proxy system.jaeger: Tracing system.prometheus: Monitoring system.ipfs(0-1-2): Three instances of Kubo.
- Multi-Replica Awareness: Enhance ABR logic to account for multiple replicas in IPFS.
- Advanced Caching Policies: Implement predictive caching based on access patterns.
- Support for HLS: Extend support to HLS manifests in addition to DASH.
- Improved Load Balancing: Optimize proxy performance under high traffic.
This project is licensed under the MIT License.

