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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do I deploy a backend?

3 点作者 a6h超过 4 年前
Hey guys, I&#x27;m kind of inexperienced in backend web stuff.<p>How do I deploy a backend that will eventually be scalable and easy to maintain? Or, where should I go to learn?<p>I want to: - deploy a REST API, with WebSockets that should be able to handle potentially many concurrent connections - be able to store user sessions in Redis - store data in a scalable SQL database - be able to continuously deploy as I push code<p>I&#x27;m confused by the number of services and options I have. - I&#x27;m not interested in Firebase, or similar services, because I don&#x27;t want to be locked in. - I&#x27;m not interested in cloud functions, or lambda functions, I don&#x27;t want to deal with cold starts - I&#x27;m not sure about Heroku, I don&#x27;t want everything done for me. I feel like this will inhibit learning and growth rather than encourage it.<p>Do I: - Use Amazon EC2, or some other container service? I&#x27;m not sure if this is what they&#x27;re even for. Would these services help me spread connections and requests across multiple containers? - Use a managed SQL database like RDS, or DigitalOcean managed databases? Will this be cost-effective in the long run? What other ways do I have to handle my database? - Use something like Elasticache for Redis? Is there something else I can do here too? - How can I implement a CI&#x2F;CD pipeline along with all this?<p>Any advice would be greatly appreciated. Any recommendations for books or other resources to learn what to learn would also be appreciated.

2 条评论

whoisjuan超过 4 年前
Yes. Probably the best way to go about this is to use some container technology through a semi-managed service or a fully managed service.<p>I would start with something like DigitalOcean. The managed database it&#x27;s a nice thing but hat&#x27;s really not necessary starting. You could start with a database in the same container and then migrate to a managed database when needed. That&#x27;s literally the easiest swap in a tech stack as long as you&#x27;re migrating the same database engine (e.g: MySQL).<p>For a CI&#x2F;CD pipeline probably GitLab is the best choice out there and in my opinion is really easy to learn and comes with a free version with free runner minutes.
new_guy超过 4 年前
&gt; I don&#x27;t want everything done for me. I feel like this will inhibit learning and growth rather than encourage it<p>But then you promptly discard a bunch of services you haven&#x27;t even evaluated. I would agree that vendor lock-in is bad, but I&#x27;d also suggest you take a few hours and get familiar with services and products before dismissing them.<p>I would recommend using the AWS free tier and learn the basics, that&#x27;s more than enough to get started. You can apply to their startup program for free credits as well if required.