Hello everyone,
I currently have a dedicated server for 6euros a month offering a slow atom processor with 1TB of HDD.I am using it as a image hosting server for my hosting(SaaS).However i am not satisfied with the performance(most images load fine but some take 20s).I am looking for opinions on using a dedicated server vs using cloud storage for static image hosting.
My alternative option that is affordable is using BackBlaze B2 with Cloudflare CDN.
No matter what you choose, I would stick a CDN in front of it, that'll help with performance a lot.
I would go with Cloud Storage because it's so cheap and you don't have to worry about running out of space, losing files, etc...
Personally, I'm using Google Cloud Storage with Imgix which acts as a CDN + can dynamically resize images for me.
You might also like Cloudinary.
Thanks!Those cdns look promising
Serving images should not be that slow even on an Atom server. Are you sure that’s the bottle neck? What speeds do you get if you download static files from the server? How are you serving the files? Are you transcoding them on the fly? Where is the server located?
Without some more information it’s a bit hard to help. I don’t think you have to sign up for another service just for some static images.
Hi Dewey,
No i am not sure that was the bottleneck.Downloading to and from the server i get between 500mbps and 1Gbit.
All my images are located in a single folder images/ and theres about 1500 master images and 1500 thumbnails in sub-directory thumbnails/.
They are served with try_files so no transcoding is happening.
Server is located in Paris.If you have any more questions please ask me.I have currently copied my images to backblaze and used cloudflare as a cdn and even using backblaze(their datacenter in amsterdam) i think it is more stable(all images load at the same time).
I am open to both options,currently running backblaze is cheaper since they have 10GB free storage and 0.005$/GB/m after that.
I'm not sure if it's the reason in this case but try_files has a performance impact, if you don't need it for pretty SEO URLs I'd get rid of it.
As it sounds like some OVH/Online.net server from the specs I'd assume you have a bunch of RAM you don't need on top of that so you could also give nginx some cache. Maybe you can even hold most of your images in memory then.
But maybe there's no need for another solution if you are happy with it. One alternative service would be Spaces by Digital Ocean. Which is their version of S3 (and also compatible with all S3 libraries / clients) for 5 Euros / month with 250GB of space: https://www.digitalocean.com/products/spaces/. It has a CDN included too.
I mostly went for a dedicated server since it was cheapest way.However after finding backblaze it is actually even cheaper.For now atleast,maybe after a certain GB point it makes sense again to get a dedicated server.
I migrated to Backblaze and cloudflare.Seems to work great so far.
6€ a month for an atom processor? Take a look here: https://contabo.com/?show=vps
I have the 9€ option with 6 cores, 16GB ram and SSD, and it is sufficient for my personal projects (nextcloud, homepage...)
Back to topic:
I am using AWS S3 (for the static file hosting) together with AWS Cloudfront CDN (for having a CDN)
There are maaaaany tutorials on that topic, so it should be relatively easy to setup, although AWS can get quite complex.
Well it's actually a dedicated server not a vps, although i would probably get better performance on a vps.I have heard about contabo before but there were many negative reviews and their really cheap prices seemed sketchy to me. Anyways i have hetzner as my vos provider so i am all good in that department.
I am trying to steer away from amazon(except Amazon SES) so will probably choose backblaze and cloudflare.
Thanks for your help!