documentation/content/docs/architecture/index.md

1.4 KiB

title weight summary
Architecture 4 How is Piped architectured?

How is Piped's architecture?

Piped has 3 components:

Frontend

  • Uses shaka-player for streaming.
  • Uses a router for a single page application.

Backend

  • Uses Java 17
  • Uses a JNI wrapper around Reqwest, a Rust HTTP client.
  • Uses ActiveJ to achieve maximum performance. Which is really fast
  • Supports OpenJ9
  • Each running instance should configure their own proxy, thus allowing multi-gigabit content delivery.
  • Uses ~70-130 MB of ram. (on OpenJ9)

Proxy

  • Uses Rust.
  • Has HTTP/2 support.
  • Uses actix-web and reqwest for maximum performance.
  • Low memory footprint and high throughput.

Server-Side Caching

Caching is done at a Reverse-Proxy/CDN level to reduce the load to the backend. This also makes it more scalable.

LBRY

LBRY streams are automatically used to stream content via LBRY if the same video is available there.