By gmarcilhacy
Hi! I have a basic CRUD web application that allows users to generate images, gifs, videos. The process can take a while since it can generate thousands of images/gifs/videos. Right now, I just execute a Node script in a child process and it works perfectly fine.
However, my traffic is growing and I always get worried when 2+ processes are triggered at the same time.
I’m open to recommendations here, but I would like to execute my Node script from a droplet that I create on-demand and kill when it’s done.
What is the best way to achieve this?
Thank you!
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!
Since you’re looking for suggestion, here’s mine.
If your users access your application primarily from the desktop browser (preferably Chrome), you may want to offset such image/video/gif generation onto the clients’ devices instead.
Thus, the users generate their own assets on their local device, right in the browser.
That is what I currently do on app . experienceafrica . today. I’m using FFMPEG WASM (web assembly running in browser) which allows the running of all FFMPEG commands (it’s just a port, so same use)
That way, you can save yourself of all the cloud-based architecture complexities, unless doing so is critical to your services.
Pros
Cons
You gotta weigh your options. In my use case, doing everything in browser on Desktop works.
You may just include warnings/disable the viewing of the application when on mobile or unsupported browser. It’s unfortunate, but Chrome remains the only browser that supports these cutting edge technologies.
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.