Live data from Hacker News

Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

news.ycombinator.com

21–30 of 79 posts

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#21
Amazon Web Services. Won't cost much.

If you want to keep it simple..

A very small EC2 box. Maybe even micro instance. That'll run your python code + sqlite.

If you want, you can use an elastic load balancer or Route53. If you don't have DNS already. Route53 is AWS's DNS service which is easy to use.

This whole setup should not cost you much. If you do it right, you can probably spend less than $10/month taking advantage of the free tier.

Later on, as a side project, you can try to make the app serverless. You're probably close to it being serverless. Doing this allows you to run it on AWS Lambda. Which makes things even cheaper, if not free. And it's just pretty cool.

But most likely you'd have to switch to a real data store. No problem since AWS has DynamoDB.

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#22
post #11

I suggest aws (probably elasticbeanstalk, maybe a raw box) simply because it's a very well trodden path. Lots of helpdocs, tutorials, instructions, etc etc etc. Assuming you're a professional in the US / west europe, etc, the diff between $20 or $30/mo and $5 or $0 per month is negligible, while the time savings just from staying on a standard path can be huge. My default suggestion would be: Elastic Load Balancer, t…

That sounds completely overkill for OPs question - without digging deeper it sounds like OP really just wants a cheap VPS perhaps with a lightweight management layer on top.

Granted, Elastic Beanstalk/Load Balancer will allow you to scale should you end up with a massive influx of traffic - but I think you'd be far faster to spin up a VPS and use where-ever your bought your domain name from to point your domain name to it's IP.

In fact - this is exactly what I do and it took well under an hour including choosing and buying a domain name and costs $5 a month.

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#23
Would definitely be looking at removing the homespun server aspect and going with a high-performance, low latency paas / serverless setup. Lets you focus on and deliver the outputs you need (i.e. user interface + data).

If I were in your shoes I'd be looking at either:

- Firebase (free tier). Probably just using their RTDB for storage. You could conceivably do away with your backend entirely here.

- Cloudflare workers + KV storage (~$5 per month?) .. this would give you killer performance and let you write your storage logic in python. You're paying a minimum fee per month here, but in reality that could cover a large number of seperate sites.

Both suggestions raise vendor lock-in considerations, but given the use-case it doesn't seem like a major concern. Of course if you're looking forward to the joys of managing a box ...

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#26
AWS has a free tier for a year after signing up. A 'tiny' instance for webserver with letsencrypt on for your free ssl/tls certificates. You can automate backups via snapshots, though make sure they delete automatically after a week or so. I would recommend you use MySQL instead of SQlite, use RDS free tier there, SQlite not so good with concurrent connections and definately not if people are adding their own information. Look into haproxy as your gateway so you can scale to multiple servers if need to but not be tied into AWS specific Route 53, if you set it up right you can basically grab the configs, site source, files etc and a database dump and run it on a Raspberry PI in your home if you need to and have a static IP. Try not to get tied into one specific cloud provider too and keep shopping around for free or better deals. You can have a web presence for no money except your DNS registration with a little bit of tinkering and looking around.

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#27
I just wanted to say since you seem unsure of yourself a little:

You have a really great approach to simple software. Turns out your strengths do include setting up backends for web development!

Many self styled experts / People 2 digit years of experience who consider themselves solution architects could learn from you and your approach here.

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#28
Check out google cloud run for running your stateless webserver, its free tier is pretty good and you can run whatever stateless container you want to.

Personally from there I would use a min-spec Postgres CloudSQL for the DB, but you can use whatever hosting you like if you want to DIY.

Re: Ask HN: Optimal cloud service to run tiny website with back end Python + SQLite?

#30
post #11

I suggest aws (probably elasticbeanstalk, maybe a raw box) simply because it's a very well trodden path. Lots of helpdocs, tutorials, instructions, etc etc etc. Assuming you're a professional in the US / west europe, etc, the diff between $20 or $30/mo and $5 or $0 per month is negligible, while the time savings just from staying on a standard path can be huge. My default suggestion would be: Elastic Load Balancer, t…

That sounds completely overkill for OPs question - without digging deeper it sounds like OP really just wants a cheap VPS perhaps with a lightweight management layer on top. Granted, Elastic Beanstalk/Load Balancer will allow you to scale should you end up with a massive influx of traffic - but I think you'd be far faster to spin up a VPS and use where-ever your bought your domain name from to point your domain name…

I didn't intend any of this to be about scale. Again, it's about ease of setup and maintenance.

For example, I spent a pile of time getting letsencrypt to work with nginx. Admittedly, this was a couple years ago, but I had to go back in and fiddle with a config I barely remembered 6-ish months ago.

My ELB + AWS Certificate + EB have kept chugging along without a peep. I also ticked the EB setting to continually upgrade linux to take care of OS-level security issues.

You may be an expert on setting up linux/nginx/puma/bundler/ruby, but I've found that running my own (which I do!) requires a full couple days of maintenance a year. Again, from a person who does not do this regularly.

My AWS EB environment just does a new deploy and the magic keeps on magicking itself.

:shrug:

Post reply on HN