
Web App Architecture - strimp099
I built a Flask app. Some views are powered via page JavaScript calls to Flask-RestPlus APIs. Some views use the Jinja2 template system.<p>The app is backed by a Postgres database with about 10 tables constrained by foreign keys. I am using Celery as a task queue backed by Redis.<p>I&#x27;m still developing the app locally using Docker Compose - separate containers for the app, Celery, Postgres and Redis.<p>It&#x27;s time to finally move this app to a production cloud environment and I need advice on target architecture. I&#x27;m comfortable with Terraform and CloudFormation and automated testing&#x2F;deployment with CircleCI.<p>AWS ECS? EC2? Heroku? Digital Ocean? What is your experience?
======
davismwfl
The answer should always be, use what you know unless you have a need which
forces your decision to another platform.

If you don't know any, I'd say pick AWS since it is the giant, generally
pretty easy to follow and you can find lots of tutorials saving you time. I'd
say DO would be the other to consider as it is very similar and I love their
documentation & tutorials most of the time. I'd not consider GCS or Azure
generally (mainly over documentation and weirdness I have experienced) but
neither are bad, and obviously many people are super successful with both.
With AWS, use postgres on RDS and Redis from ElastiCache for now, it will save
you time.

Just my 2 cents: While I see tons of value in automated deployments, testing
and things like Terraform/Ansible etc, I'm always concerned when I see people
start building out deployment solutions before they have focused on getting
users and a basic system just running to sign those users up. It generally is
a sign to me the focus is in the wrong area at such an early stage. There are
always exceptions, but spending time anywhere other than getting a basic
system running and finding users is usually wasted early on, especially when
the complexity of the solution is/should be low. This changes as the number of
users grow, reliability becomes critical etc. Where I'd say the time is well
spent on deployment (before you have users) is in two cases: You already are
very well versed in it, are a solo show and it will take you less than a
couple of hours to setup and test. Second case would be where your product is
required to meet a high reliability metric from day 1 so you need to have it
distributed from the start (not just a load balancer and a couple of boxes but
fully distributed). In those two cases it makes a ton of sense to do it before
you get users. There are probably other times I could see it justified too but
they would be the exceptions not the rule.

What I have seen quite often (and more so in the last year or 2) as I have
talked with people is they spend 2-3 days (sometimes a week or more) setting
up deployment and testing solutions and paying for CircleCI or similar
solutions to deploy an app that has 0 users and should live on 1 box + a
hosted database at first. Generally a waste of time and money IMO.

------
beatgammit
It depends on what you need. Personally, I use Vultr for all small projects
until I know what I need. I like knowing exactly how much I'll pay each month,
and I can bump up the specs quite easily (more CPU, RAM, or add-on storage).
Linode and Digital Ocean are very similar, so pick whatever seems good to you.

I don't like AWS because the billing is more complex and I'd rather my app run
out of resources than get a huge bill if I get uncharacteristic load/behavior.
Once I'm out of the prototype phase, I reevaluate the platform given my needs.

