TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Web App Architecture

9 点作者 strimp099超过 5 年前
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?

2 条评论

davismwfl超过 5 年前
The answer should always be, use what you know unless you have a need which forces your decision to another platform.<p>If you don&#x27;t know any, I&#x27;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&#x27;d say DO would be the other to consider as it is very similar and I love their documentation &amp; tutorials most of the time. I&#x27;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.<p>Just my 2 cents: While I see tons of value in automated deployments, testing and things like Terraform&#x2F;Ansible etc, I&#x27;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&#x2F;should be low. This changes as the number of users grow, reliability becomes critical etc. Where I&#x27;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.<p>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超过 5 年前
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&#x27;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.<p>I don&#x27;t like AWS because the billing is more complex and I&#x27;d rather my app run out of resources than get a huge bill if I get uncharacteristic load&#x2F;behavior. Once I&#x27;m out of the prototype phase, I reevaluate the platform given my needs.