Hello DigitalOcean community!

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.

1) Connection between Frontend, Backend, and Spaces

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.

2) The outbound streaming limit

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.

3) Streaming data between spaces and droplet

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!

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!