Designing High Scale Live Streaming Architecture ๐Ÿˆ


Hello Reader,

A common system design interview question for Media and Entertainment domain is designing high scale live streaming applications. We just had Super Bowl in USA, which is the highest watched event in the USA (126 Million). How do high-scale sporting events like Super Bowl, Olympics, Soccer finals, and Cricket matches get streamed to millions of viewers? And how are personalized dynamic advertisements shown to you? Here's how:

  • Live cameras in the stadium capture the action
  • AWS Elemental MediaLive takes the raw video input from the cameras into AWS, and encodes it in real-time, compressing the content into smaller, high-quality streams suitable for broadcast and internet delivery. MediaLive also translates the streams into different languages!
  • MediaPackage takes the video input and packages it into multiple streaming formats, enabling content delivery to a wide range of playback devices such as connected TVs, mobile phones, computers, tablets, and game consoles
  • These various streaming format output is fed to CloudFront. Different devices consume the stream from this CloudFront. You can enable AuthN/Z with CloudFront from the streaming app.
  • Elemental MediaPackage can also save the video in S3 bucket for VOD
  • All these services can scale automatically to support millions of viewers worldwide!

How about ads? This is how dynamic ad insertion works:

  1. CloudFront requests manifest (video clip with ads) with viewer information which is used for ad personalization
  2. MediaTailor gets manifest i.e. video clip with ad markers (which time frame to insert the ads). At this point, NO ads have been inserted
  3. MediaTailor requests personalized ads based on viewer information from ADS (Ad Decision Server). ADS is a third-party software, that can run on EC2
  4. ADS running on EC2 return ad(s) to the MediaTailor. Note that, ads returned for one viewer will vary from another based on the information gathered by the streaming platform, that was passed to MediaTailor
  5. Mediatailor inserts these ad(s) into the manifest at the ad markers
  6. MediaTailor returns this video clip with ads or manifest with ads to the CloudFront. The clip with ads is shown to the viewers consuming from the CloudFront

If this comes in your system design interview, be sure to knock it out of the park!

If you have found this newsletter helpful, and want to support me ๐Ÿ™:

Checkout my bestselling courses on AWS, System Design, Kubernetes, DevOps, and more: Max discounted linksโ€‹

AWS SA Bootcamp with Live Classes, Mock Interviews, Hands-On, Resume Improvement and more: https://www.sabootcamp.com/โ€‹

Keep learning and keep rocking ๐Ÿš€,

Raj

Fast Track To Cloud

Free Cloud Interview Guide to crush your next interview. Plus, real-world answers for cloud interviews, and system design from a top Solutions Architect at AWS.

Read more from Fast Track To Cloud

Hello Reader, Most engineers are using MCP clients and agents. But very few know how to build and host an MCP server, let alone run it remotely on the cloud. In today's edition, we will learn how to create and run a remote MCP server on Kubernetes, on Amazon EKS! I will share the code repo as well, so you can try this out yourself. But first.. ๐Ÿ”ง What is an MCP Server really? Itโ€™s not just an API that performs a task. An MCP Server is a protocol-compliant endpoint (defined by Anthropic) that...

Hello Reader, On my interactions, this question is coming up a lot - โ€œHow are AWS Strands different from Bedrock Agents?โ€. In today's newsletter, we will go over this, so you can also answer this in your interviews or real-world projects Letโ€™s break it down using a practical example: What happens when a user asks an LLM app: Whatโ€™s the time in New York? Whatโ€™s the weather there? List my S3 buckets The LLM don't have these information, hence it needs to invoke tools for time, weather, and AWS...

Hello Reader, Another day, another MCP tool. But this one is special. Today we are going to go over newly released EKS MCP server. This is the official Kubernetes MCP server released and maintained by AWS. This one will rule them all! In today's edition, we are going to go over what it is, why this one is a game changer, how you can use this to get job interviews and demand more money, and whether it will eliminate SRE jobs. There are three Ways to Manage Kubernetes : Traditional Way (Manual...