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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Where to deploy a Spring Boot app with a fixed spending cap?

5 点作者 monroewalker将近 3 年前
I have a simple Spring Boot app using Postgres that I&#x27;d like to deploy but I&#x27;m finding it to be surprisingly difficult to figure out where exactly it should be deployed. This is still just a hobby project so my biggest priorities are (1) low and capped cost and (2) ease of setup and deploy.<p>AWS was the first place I looked, but the pricing is pretty confusing so I&#x27;m not sure how I would guarantee that costs would stay below a certain amount. It also seems like there are a number of similar options to look at and it&#x27;s not clear to me which is best - EC2, Fargate, Beanstalk, App Runner...<p>Google Cloud also has a few options, the main two I&#x27;m aware of are Cloud Run and App Engine. Main concern here is again the potential for unintended costs. I&#x27;ve seen horror stories like &quot;We Burnt $72K testing Firebase + Cloud Run and almost went Bankrupt&quot; [1]. Of course that&#x27;s a fairly novel outcome, but it shouldn&#x27;t even be in the cards that charges exceed my intended cap.<p>I&#x27;ve heard good things here and elsewhere about DigitalOcean droplets and Render.com but is it really $20+&#x2F;mo for just 2gb of RAM? Not sure how much RAM I actually need though and the 512MB for the starter &#x2F; free tiers might be fine.<p>I&#x27;ve also heard a lot of praise for Heroku, though also that it&#x27;s been slowly going cold since getting acquired by Salesforce.<p>I&#x27;ve also heard people suggest just renting a dedicated server from places like https:&#x2F;&#x2F;www.hetzner.com&#x2F;, https:&#x2F;&#x2F;www.kimsufi.com&#x2F;us&#x2F;en&#x2F;index.xml, or https:&#x2F;&#x2F;lowendbox.com&#x2F;, though that seems like a good deal more work that I&#x27;m looking for as someone with minimal devops experience.<p>Right now I&#x27;m planning on just starting with the free tier for Render.com since that also seems like a convenient way to setup a cheap&#x2F;simple Postgres instance. Would otherwise go the same route with Heroku or DigitalOcean.<p>Are there any options I didn&#x27;t consider here? Anyone else have hobby&#x2F;POC&#x2F;low-scale Spring Boot deployments and like their setup?<p>[1] https:&#x2F;&#x2F;blog.tomilkieway.com&#x2F;72k-1&#x2F;

2 条评论

tedyoung将近 3 年前
I have a dozen Spring Boot apps deployed on Heroku, only a couple of which I need instant response from, so pay $7 for the hobby level for those. The rest run on the free hours that you get each month.<p>Deployment is almost trivial, as it recognizes the Maven or Gradle file, and, other than specifying the version of Java you need, it does everything else automatically.<p>I have been trying out <a href="https:&#x2F;&#x2F;railway.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;railway.app&#x2F;</a> and will be moving over a bunch of my Spring Boot projects to there. The cost is predictable (and low), and deployment is as easy as Heroku.<p>You can check out the source code for one of my main projects at <a href="https:&#x2F;&#x2F;github.com&#x2F;jitterted&#x2F;mobreg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jitterted&#x2F;mobreg</a>. <a href="https:&#x2F;&#x2F;github.com&#x2F;jitterted&#x2F;mobreg&#x2F;blob&#x2F;master&#x2F;system.properties" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jitterted&#x2F;mobreg&#x2F;blob&#x2F;master&#x2F;system.prope...</a> is the only Heroku-specific file I have. It uses GitHub actions to build and run tests, and only if the tests pass does Heroku pick it up and deploy.
评论 #31571103 未加载
rpeden将近 3 年前
If you&#x27;d be willing to run your own VPS on DO, you might also like Tornado VPS (formerly known as prgmr). It&#x27;s cheap, performance is decent, and there are no overages.<p>AWS Lightsail might be a good option as well.<p>These would have the same downsides as some of the other options you mentioned like hetzner, though. Quite a bit of manual work to get up and running.<p>Your app might work fine on the free tier of Azure App Service, though you&#x27;d probably have to pay a little for a managed Postgres database. The nice thing is that there would be no DevOps or sysadmin required. Deploy would probably be a single click in your IDE.
评论 #31571127 未加载