High Level Design
1. Upload-Service
1.1 Metadata Upload and Session-URI response

1.2 Content Chunks Uploader Using Session-URI
- Users uploads chunks using Session URI.
- API-Gateway diverts the request to Upload Service.
- Upload-Service stores the chunk at Object-Storage.
- Upload-Service pushes an event to message queue signalling/requesting post-processing over uploaded chunk.
Post-Upload Chunk Processorlistens to the event.Post-Upload Chunk Processorfetches the chunk from Object-Storage and starts processing.- After processing, chunks are pushed to
CDNand location of chunks are written back toContentDb. - An event is generated to message-queue signalling upload-completion.
Notification-Servicelistens to the event.Notification-Servicenotfies the user about the completed upload.

1.3 Post-Upload Chunk Processor
As an Example, Post-Upload Chunk Processor can involve the following services:
Content Chunker Service
- Breaks the uploaded chunks into more smaller pre-defined chunk-lengths(10 secs).
- Fetches chunks from Object-Storage, breaks them and stores them back to Object-Storage and then generates an event back to MessageQ in order to picked up by next-service.
Format Creator Service
- Converts the format of videoes to mp4, mov etc.
Quality Convertor Service
- Converts the quality to predefined formats: 720p, 1080p, 240p, 4K etc.
CDN-Uploader Service
- Fetches the
processed-chunksfrom Object-Storage. - Stores them at CDN
- Stores the location of each chunk at ContentDB

2. Stream-Content

For excalidraw file, click here to download