skip to Main Content

I am building react app that is about video tutorials. I am planning to store around 40-60 videos around 40-50 MB each in public folder of my react app. Is that good approach, will that affect performances of react application?

If yes, what would be alternative approach? I would use Azure as cloud provider, would storing videos in Azure Storage and playing/streaming them through react-player be an good approach in terms of performances?

I would exclude youtube since it has embeded controls which I can not disable using react-player.

2

Answers


  1. Generally speaking, the only reason static files would affect app performance is if the disk was nearly full and lacked space for cache, paging, etc. Otherwise it’s not a factor.

    Most of a React app is in browser memory and cache anyway. You’re only really talking about other static files (the compiled React app) being served anyway. Video files aren’t loaded unless they’re retrieved by your app when they’re played. The only files loaded initially are the app itself.

    Login or Signup to reply.
  2. It depends on your hosting solution. Check to make sure that the tool you are using allows you to deploy and download files of that size. Most should, but you may run into issues with tools that are built on serverless platforms.

    If you plan to frequently change these files, or support this project long term, you should look into using a tool like azure file storage or amazon S3. This will be more efficient and cheaper than storing your files directly inside a platform designed for application hosting.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search