liveBook · Manning

Video streaming

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

Streaming video is audiovisual content delivered incrementally over a network for near-immediate playback.

Video streaming delivers audiovisual bytes incrementally from storage through HTTP to a browser for near-immediate playback. A minimal Express route reads an MP4 from the filesystem, sets its length and media type, and pipes a readable stream to the response. section 2.6.5

Build the basic streaming path with these pieces:

  • Expose an HTTP GET route such as /video. section 2.6.5
  • Create a readable file stream and pipe it into the HTTP response. section 2.6.5

A production-oriented path separates storage, streaming, and gateway responsibilities. Storage streams a selected video from Azure Storage; the video-streaming service forwards that stream and broadcasts a video-viewed event; the gateway forwards it to the frontend, where an HTML video element plays it. section 10.7.5

Minimal filesystem stream

An Express GET /video handler can obtain a file's size, write a 200 response with video/mp4 metadata, and call fs.createReadStream(videoPath).pipe(res).

Figure 10.11 The path of streaming video through FlixTube

Trace the complete streaming-video path from Azure Storage through the video-streaming and gateway microservices to browser playback. section 10.7.5

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Builds a runnable filesystem stream, then traces storage, forwarding, gateway, events, and browser playback without detailing streaming internals.
Examples
Demonstrates an MP4 filesystem route, Azure Storage download, service-to-service forwarding, view events, and HTML video playback.
What it assumes
Assumes basic HTTP-server and microservice familiarity while introducing streaming routes incrementally from an Express baseline.
What you can do after
Build it from scratch with Node.js and Express, then trace and operate its multi-service delivery path.
How it connects
Connects REST APIs, HTTP, Node.js streams, microservices, Azure Storage, event-driven programming, and the HTML video element.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.