Not so much a question for help, more of a "what would you use or suggest" based on Laravel performing in this scenario.
Laravel is serving as a backend and basically a user will be uploading images, this will create various different sized images and also user will be cropping images which will also make 5 different sized versions. This will be the main use of the site and most taxing.
Question is what kind of server should one use? In regards specifically based towards DigitalOceans offerings. Go with a standard all around droplet? Would you want Shared / Dedicated or a CPU-Optimized or RAM-Optimized? What I am asking basically is when processing images / manipulation / re-size cropping is that process more CPU demanding or Memory demanding operation?
Thanks, I know that I can scale up, but scale up what? Should scale up RAM / CPU / Both?
Some sites say if your handling lots of image / batch manipulation its CPU demanding, other sites say its RAM intensive. I am looking for what the community has found in their experience on what works best for them and not some blog post about hyping up some VPS
It depends, 5 users uploading at the same time verses 5000 users uploading. So you could start more basic and scale as needed. You may consider using Laravel forge as well. I suggest reading some articles on load balancing as well. Digital ocean has a bunch of articles (how to's).
Thanks for your feedback and time and i know there are unlimited cases that could come into play and endless options for theoretical uses of 10 user to 1 million users, and is the server Linux or Windows or AMD vs Intel and where are the users and whats their age and go on and on with endless if this or if that.
So make it simple and say an exam question => When selecting a server for a website thats will be heavy on graphic manipulation your best option would be to select:
A. General purpose use
B. CPU-Optimized
C. RAM-Optimized
Thanks @snapey
I currently have a decent dev setup 4 core / 8 RAM but just me simply testing the upload which makes 5 different sized images is rather slow. Code has been refactored over and over with different compression to none and still too slow for my liking. Fewer image manipulations makes things run faster but was hoping hardware could improve this process and just looking for insight from the community
@movepixels like I said scale only when needed. But uploading 5 images or changing 5 images is not going to be super fast even with one user. Even on a fast desktop app images can take a little while. I have Adobe Photoshop with a macro to web optimize images. I have 16 gig ram, but yet it still takes a little while to do a folder with say 15 images.
And what are you calling slow, a few seconds for images is expected.
Edit: You need to scale later, like I mentioned before, if you get a lot of concurrent users. That is the main reason to scale. Probably a load balance setup.
@jlrdw very true indeed.
Not going to get into to details about the code and such but basically user is expected to upload hi-quality images and the upload takes ~1-2 seconds based on a 3mb image, that image then gets resized down 5 times (using previous resized image) and thats taking ~12-15 seconds sometime and thats incredibly long (round trip from upload, processing and return images to front-end).
Hence the reason for the question. I tried dispatch a job to run it in the background after the fact but there are some cases on the site where each image is shown in 3 sizes after the upload so I can't really send it off to a job since its needed immediately. So i was looking for insight as to upping the CPU or the RAM which would be the go to option
After upload, show the first image and have a job run to finish the rest. Perhaps a spinner and message:
Your images are being processed.
I have used an online video converter (just example), and sometimes fairly fast, but others can take 30 seconds plus, so give the user feedback. The feedback assures the user that all is going okay.
Edit: Even some large images being uploaded to Google Drive can take a few seconds.