By pikachu
I’m trying to create a Udemy or Coursera like website using DigitalOcean.
I already have a e-commerce type platform on my droplet which uses nodeJS + Angular + MySQL and it doesn’t have any media files.
My next project is likely to involve more than a droplet, and it seems like using Spaces is going to be needed since videos will take up so much space (no puns intended)
I’m just trying to understand the technology and workflow of this solution, and I have list of clarifications to make.
a) I assume, my Frontend would be talking with NodeJS backend service which talks with the Spaces to stream the video.
b) Talking from my Frontend directly with the spaces seems like a bad idea for multiple reasons. 1) Authentication, some users have access to some videos 2) sending the video by section is pretty much impossible (I’m just guessing because backend service deals with sending by packets) Correct me if I’m misunderstanding and possibly this could be the right solution.
Spaces said to have a outbound limit of 1TB per month whereas my droplet has 4TB per month.
So by making my spaces the same location as my droplet, I can send outbound of 4TB data per month for free? (If using method [A] from above)
My understanding is the spaces sends 4TB to my droplet and my droplet can send those to the internet, and on the docs it says the internal transfer is free.
If i’m planning to send video data from backend to frontend by packets (meaning a few seconds worth of video at a time) can I these packet reading from spaces and send that to my frontend?
I’m assuming fetching the whole video from the backend and then sending it piece by piece to the frontend is a terrible idea.
All of your insights would be appreciated, and I’m in the middle of my research about the technology stack and feasibility.
Any other suggestions besides these would be helpful as well. Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
We do have resources on this topic which you can check here
https://www.digitalocean.com/solutions/streaming
https://www.digitalocean.com/resources/article/improve-performance-media-streaming
If you’re planning on using our Spaces product you can consider the following information.
Spaces are designed for storing and serving moderate to large files. Files 20 MB to 200 MB in size will give the best performance for both writes and reads. Additionally, combining small files into one larger file will greatly reduce the overall number of requests to your Space compared to handling many small files individually.
How Do I Implement This?
When uploading files larger than 500 MB, you should use multi-part uploads.
We recommend combining files less than 1 MB together into a single, larger file. How you do this will be specific to your particular files and use case, but one example is concatenating daily log files into a monthly file.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.