See the entire conversation

Friends, I want the cheapest and reliable way of serving data over http. Could use a a little server action, to validate the client, but an ultra cheap static http server would do. What should I use?
132 replies and sub-replies as of Oct 08 2020

do you mean cheap as in 'cheap as in free until it doesn't work anymore' or 'cheap as in get it onto a cdn as inexpensively as possible'
I want to minimize my bill :-)
the server going down because you hit your transfer allotment would minimize your bill, is that the right kind of minimize
That’s one way :-). I just want to find what is the cheapest thing i can get away with to serve static files
GitHub raw URL (or do you need mine type support?)
anyway, if you want it to stay up i would suggest just putting a cheap cdn in front of a regular httpd. i've put cloudflare and cloudfront in front of my $5/mo VPS at various points in time and had no problem with it, cloudflare is Free as long as you are okay with bad service
cloudfront charges by the byte but the costs have been super reasonable for my uses
runs Icanhazip sites on cloud flare I think .
Almost two weeks with @Cloudflare workers serving up icanhazip and I'd say things are going pretty well. (The failed requests are there because I am bad at Javascript.) 🤷‍♂️
I did! Due some DNS requirements that I have, I needed to move off the platform.
well, put it on s3, but if you really really need some backend then you can spin up an ec2 t2.micro which is free and run from there.
also GitHub pages for free tls and not agrees chargers.
How much traffic do you want to serve?
I’ve wanted to try Cloudflare Workers for static-ish content. Compare with Google Cloud Run, too.
Cc @KentonVarda re Workers (you should meet anyway, if you haven’t already)
From a file? Serving from an S3 bucket seems pretty cheap and reliable. What kind of traffic?
Just static content, I would push some json there. Just trying to avoid billing surprises
For consistency, cheapest is probably Digital Ocean droplet and nginx. S3 hosting is pretty cheap but variable, so a month with millions of hits and terabytes of transfers could be a little surprising.
Digital ocean looks quite nice price wise
is unlimited data IIRC. @genesishosting has $3/month VMs with 5TB/month included. Both are very solid in my experience. @digitalocean is good too but they're much less generous on data allowance.
Glorious! Thanks for the pointers Jeremy!
Be careful with digitalocean, a glitch in payment (their fault) resulted in all of my data, servers and configurations to be wiped out. Their policy is once it’s been wiped, it’s completely gone.
Why not take advantage of GitHub free static hosting of your repo, also supports custom domains: simple, painless & free
GitHub Pages
Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.
pages.github.com
S3 + cloudflare seems okay to me (if you are okay with those companies)
azure can help you serve static pages for small funds, but I'm not sure if it would take json files.
Aws Lightsail. For example, $5/month VM gives you 1TB of month traffic.
Oh I mean to host data and don’t want to be surprised with a fat bill
Digital ocean is dirt cheap for less than a terabyte served.
vultr if you want to use openbsd
Aren't you like a multi millionaire??
Hah, from the replies it seems "cheap" can refer to hosting cost or coding cost
lol i also thought of that same repo when Miguel asked for that but i couldnt find it anymore :D
Azure, Microsofft and google all have free tiers for various services including things like S3 that let you just straight up serve off the file system. There are _Eventually_ limits. If it's non-trivial i'll always plug google's firebase.
Indeed, but looks like he might need some server side action, let’s catch up at the backlog grooming
Or CloudFlare workers are great if you need something a little dynamic.
How about a little Hetzner dedicated server running apache?
You can probably get into a digital ocean droplet running nginx for about 5-10$ a month.
Could you just sling it on an Azure Web App free tier?
How I do: put things on an AWS S3 bucket, then host it on a domain using AWS Cloudfront and use AWS Lambda@Edge to do a few things on incoming requests.
I've never had the chance to play with lambda@edge, can you elaborate a bit more on what you do with it? maybe I can take it as a task or lab :P
basically i can run little bits of JavaScript which get access to the request or response and can do things to them. i personally do it to redirect '/' to '/index.html' and similar.
oh that, I usually do it with cloud front redirects, just redirecting everything to /index.html, well not everything but like 301, 404, etc that usually does the trick
yeah that's fine, i'm not looking for advice or anything, i'm just trying to give an example.
oh no, totally, also I'm looking for ideas to try on my own, forgot to mention that even tho I do it the way I said I'll try yours so I can test run lambda@edge. my bad haha
I would ditch Cloudfront for Fastly, but I may be a tad biased 😅
I don’t know that it’s the cheapest but it’s simple and reliable
Github Pagues + Jekyll Datafiles + CloudFlare
Could you do it with netlify or GitHub pages?
Raspberry pi and a dynamic dns updater app?
I would have a simple shared hosting plan from @HostGator or any other vendor, no big surprises at least for 3 years 😅
The only surprise you will have is I’ll buy migueldeicaza.com so hope I can get a share 🤣
For static content use @Netlify. Probably free in your use-case.
VPS at OVH, cheap, no surprises and unlimited data. I've been serving ~1TB a month for almost a year on their 5$ plan and never had any issues.
Cloudflare Worker running Rust w/Actix
Push it to GitHub pages xD
o aliyun, servicio gratis por un año
Postgres + PostgREST. Automatically exposes a REST API over your preexisting schema.
i'd go with nginx on digitalocean ($5/m) or some similar site. Heroku might also be an option for free if you don't need it up 24/7. Or now.sh, not sure about restrictions, but they have a pretty generous free plan.
Develop. Preview. Ship. For the best frontend teams – Vercel
Deploy web projects with the best frontend developer experience and highest end-user performance.
vercel.com
Where did you get that ghoulish avatar?
Cloudflare in front of your choice of web server is cheap and scalable
Or GitHub pages. Netlify can handle ssl on multiple domains and has a better ux. But GitHub is totally free.
Incidentally, @vysorapp is served off GitHub pages.
Free as in, the free tier is extremely generous. Seen production sites never get close to the quotas.
S3/Azure blob storage, just share the HTML as a file.
Firebase hosting
Github pages + Cloudflare cache!
And assets over jsdelivr
So use Github Pages for zero bill. and for authentication use so many options exist, maybe write a Azure or Firebase function to authenticate using GitHub.
CloudFront has a free tier for new AWS customers. You could use Lambda @ Edge to perform validations (no free tier for that atm according to the AWS site).
Firebase will do a lot for free
GitHub/gitlab pages + cloud flare + cloud flare workers maybe ... they are free for up to certain limits.
Firebase cloud function
GitHub pages, or Digital Ocean storage (it is @Ceph based!) are good options. Personally, I would just slap it in an AWS S3 bucket and serve it out of there if traffic level is low. You new avatar is gold by the way!
Talking my book, but you have to look at Cloudflare workers.
Use an free forever f1 micro instance on Google Cloud, and run it with nginx or your own rust based high performance servers that can handle around a remarkable 100-200 req/s on this little tiny machine for light things + put it behind a free cache like Cloudflare :D
PS. Speaking from experience of doing all of the above simultaneously for the last 2 years 😅 - only possible cost - bandwidth - if you have large GB+ files and traffic that take it above the free usage each month.
Vercel? It includes its own CDN.
Nginx with luna should work.
Azure storage accounts can serve static pages for dirt cheap. Combine with CDN to get fancy rules engine and a few other niceties.
(No comment)
Azure static site hosting. Write JSON blob under $web container, done.
I can give you an account on my shared linode Ubuntu server. Long as we’re not talking a huge bandwidth thing.
I have no idea, but I really like your new Twitter impersonation
GitHub / GitLab pages?
S3? Azure Storage?
Hack someone else’s shared Wordpress hosting and upload the files to an obscure path in their assets folder. Seems to work for the bad guys as they keep doing it 😂
Netlify is free and real quick.
Azure storage account?
But since you work at microsoft probably you already know that
No idea about hosting, just wanted to say I love your seasonal avatar.
Assuming you don't need server activity on every request you should be able to host this for free on almost any cloud service and put it behind something like Cloudflare's cache. Obviously if you need server-side logic on every request this falls down, not sure if this applies.
What kind of validation have you in mind? That aside, you could simply put everything on github.
Upload it to a GitHub issue and/or use a gist and then serve it from there.
I had the same problem here and also need a thing like a cron. My solution was under my table: a small flask server running in a raspberry 3 and exposed it using my fiber internet conexion.
AWS Amplify Console is nice way to go, relatively not expensive, but supports building your static website if you need to, hosted on CDN, supports redirect and rewrite rules and custom domains
I usually use PowerShell to create a simple and custom HTTP Server for tests and temporary use. Works like a charm with little effort.
A simple web server built with powershell.
A simple web server built with powershell. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
hi, is it remote? if yes, where would it be hosted?
Azure Blob Storage with a Cold tier. If it's fake data that never changes, you'd pay almost 0$ :)
$5 in a VM in digitalocean gets you 1TB data transfer per month. Objects smaller than 100MB can be served through Cloudflare using that VM as backend for free, which lowers your data use from the VM even further if caching is an option.
It's cheaper for unlimited data transfer and more powerful servers from BuyVM :) only issue is you'd need to wait for stock to be available. buyvm.net/kvm-dedicated-…
Been looking for something similar . I don’t want to admin a machine/vm/container/*aaS. So far will likely just use a cpanel style shared hosting service. But yeah, if high volume could be surprise $ or shutdown.
Azure Blobs or S3. Will only cost pennies per month. If you need to get fancy, you can put it behind CloudFlare using their free tier. 🤓
At what scale, availability and latency ? My first thought was a compute stick at a colo or bsiness static ip address. Fixed price.