Deploying a Rendering Service in Production
Last updated
Last updated
Rendering videos is a relatively expensive operation compared to most other requests served in a web app - you should therefore pay attention to which hardware and deployment setup you want to use to deploy a rendering service for your Revideo apps.
You should expect a rendering job (a function call to renderVideo()
or renderPartialVideo()
to require at least 8-10GB of RAM to run fast and without issues. When multiple rendering jobs run at the same time, they will get slower if more RAM is not available.
Below, we discuss a few possibilities of how you can deploy a rendering service in production:
To speed up rendering in production, it's useful to parallelize rendering with serverless functions using renderPartialVideo()
. When rendering a 10 minute video, parallelizing across 10 workers would spin up 10 serverless functions that each render one minute of the video. We have created example guides for parallelized rendering on AWS Lambda and Google Cloud Functions.
Note: In our experiments, parallelized Rendering on AWS Lambda performs significantly faster due to much better cold start times. We highly recommend using AWS Lambda for rendering instead of Google Cloud Functions
You can find the example project for parallelized rendering on AWS Lambda along with a setup guide .
You can find the example project for parallelized rendering with Cloud Functions along with a setup guide .
If your videos are short and / or rendering speeds are not a huge factor for you, you can render videos across a single process instead of setting up parallelized rendering. For example, here is a super simple express server for rendering a video:
You can deploy a server like this on a normal VM instance or on a serverless deployment platform like Google Cloud Run.
We are building a cloud platform that makes it easy to deploy Revideo projects and uses infrastructure optimized for fast rendering speeds.