Low-level system design
In this section, we will pick some of the main microservices in our system and try to delve into their APIs and design. Note that we are not going to cover each part of our system, just some of the main services to give you a feel for the design and implementation details.
Video Service
The Video Service is a critical component of our Netflix-like architecture, responsible for handling video storage, encoding, and streaming. Let’s dive into the design and implementation details of the Video Service.
Figure 14.3 shows the high-level architecture of the service.
Figure 14.3: The Video Service architecture
Let’s first discuss the API endpoints exposed by the service:
POST /videos
: Upload a new video file:Request body
: The video file and metadata (title, description, duration, etc.).Response
: The video ID and status.
GET /videos/{videoId}
: Retrieve video metadata:Response
: Video metadata (title, description...