a video streaming platform utilizing OAuth Google social login for user authentication, AWS S3 buckets with pre-signed URLs for secure storage, and AWS Lambda functions triggered by SNS events for server updates. Leveraged AWS CloudWatch alarms to dynamically scale an auto-scaling group of EC2 instances, configured with FFmpeg, to efficiently transcode uploaded videos into adaptive bit rates. Resulted in seamless video streaming experience for users with adaptive bit rate through MPEG-DASH, optimizing resource utilization and scaling dynamically based on workload demands.
✨ Demo
Backend :
- Express
- Mongodb
Amazon web services used :
- S3 buckets
- Simple Notification service (SNS)
- Simple Queue Service (SQS)
- Lamda function
- Cloudwatch
- EC2, Custom AMI, Launch Template, Auto scaling group
- Cloudfront
- Oauth2.0 Google social login for seamless authentication
- Decoupled Architecture using SNS, SQS and lambda
- Resource efficient step scaling of EC2 auto scaling group with Cloudwatch metrics.
- Transcoding of videos into multiple bit rate chunks to enable MPEG-DASH based Adoptive bitrate streaming through FFMPEG.
- low latency content delivery using Cloudfront
- Secure credentials mangement using Parameter store, permission access using IAM roles.
why are SNS and SQS Services used?
Utilized for decoupling services and ensuring reliability in case of failures. SNS fans out notifications to SQS and AWS Lambda, allowing SQS to be polled for metadata of ready-to-process videos.
Why use lambda?
Employed to notify the metadata server upon successful video uploads via S3 pre-signed URLs. Lambda triggers an API call to a specific URL, facilitating seamless integration and asynchronous processing.
Why EC2 Autoscaling groups and not lambda ?
Selected for resource efficiency and scalability. EC2 is Ideal for longer processes with higher computational and memory requirements when compared to Lambda. CloudWatch alarms trigger EC2 autoscaling groups to scale in or out based on SQS queue size. Additionally, EC2 instances are safeguarded with termination protection during processing to prevent accidental termination during scale-in events.
Why serve files from Cloudfront and not s3 ?
Chosen to deliver static content with lower latency to users across diverse geographical locations, enhancing global accessibility and user experience.
👤 ashlesh shenoy
- Github: @Ashlesh shenoy
- LinkedIn: @https://www.linkedin.com/in/ashlesh-shenoy/)
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
