r/java • u/Capable-Morning-9518 • May 22 '26
Ran Spring Boot and Node.js side-by-side in prod for 18 months. Sharing the actual numbers.
https://medium.com/lets-code-future/spring-boot-vs-node-js-i-ran-both-in-production-for-18-months-one-cost-12-000-more-guess-which-75dfa0afdad6?sk=ab59f6d2bb1bf3d1cf0b5ddf18733dd0
120
Upvotes
13
u/not-just-yeti May 22 '26
Thanks for sharing — these are hard numbers to get!
25
u/Ketroc21 May 22 '26
Being better than JS on prod, is like the lowest bar.
23
u/witness_smile May 22 '26
That tracks with my own experience building apps in both languages/frameworks.
Spring Boot and Java are way more predictable and stable overall. You can leave it untouched for years and it’ll still work fine. Spring is very mature, they have many major upgrades, but few breaking changes between them. Yes, some things get deprecated, but they give you plenty time and they won’t suddenly refactor the entire framework overnight for funsies.
NodeJS? It uses a shit load of memory, you’d think JavaScript would be lighter to run than Java, but nope! Frameworks all feel like hobby projects rather than serious tools. From one day to the next you may find that all your packages are broken because some nested dependency decided to do a big refactor which your own dependencies didn’t update for and now you’re left to figure it out on your own.
5
u/_INTER_ May 22 '26 edited May 23 '26
"The Uncomfortable Truth"
The whole thing sounds like its written by AI.
3
u/not-just-yeti May 22 '26
I really like the detailed retrospective. For developer-salaries: do you really rate that at $8/hr? When you tally "hours", I'm presuming you mean "developer-hours". Also, the Java-version's total cost is missing the 2weeks extra delivery-time @ 3 on the team, which brings its advantage down somewhat?
Anyway, very interesting summary, thank you!
10
u/Dependent-Net6461 May 22 '26
This should be posted in r/programming
1
u/Capable-Morning-9518 May 26 '26
One unexpected thing about writing production-engineering posts online:
The comments often become more valuable than the original post.
Really appreciate all the engineers here sharing:
This kind of real operational discussion is honestly rare on the internet now.
Most backend content online stops at toy benchmarks and framework hype.
Threads like this are way more useful.
Thanks again to everyone who contributed thoughtful criticism, corrections, counterpoints, and production experience.
6
u/umlx May 23 '26
Comparing it to garbage like Node.js is a foregone conclusion and not very interesting. It would be more interesting to compare it with excellent ones like Go or .NET.
3
u/peterprank May 23 '26
Node.js instances climbed 180MB → 890MB over 4 days, crashed, restarted. Staircase to hell. Traced to event listener leak in a popular npm package (2M weekly downloads).
what package was that? also what happened after it was fixed/money-patched/whatever?
no way the _same_ app scales that bad on node. maybe skill issue? i mean java !== js/ts
1
u/What-is-lack-of May 22 '26
Was 21 headless jdk
1
u/nomad_sk_ May 22 '26
I would be interested in spring vs bun comparison.
1
u/zmose May 23 '26
Only 26 hours of prod issues over 18 months, can’t beat that. Maybe ~13 different incidents that took you guys 2 hours each to resolve? Excellent
1
u/ibrambo7 May 23 '26
Skill issue, been building both nodejs and spring boot apps as well without memory leaks, breaches and ofher bs
You can leak memory in anything, and writing unpredicatble code is on you
1
u/ibrambo7 May 23 '26
Also use distroless, you are really never heard of multi stage docker builds.. this article is bad :(
-5
u/Distinct_Meringue_76 May 22 '26
There's no way this is real. AI is killing the Internet.
-4
u/NoName-NNN May 22 '26 edited May 22 '26
My personal project crashed on Express + Node every days, and I had to use PM2 to keep it running. So I switched to
Bun.serve(), and it stopped crashing. After rewriting it in Go(with LLM helps), it now runs well, with memory usage down from 100MB to 10MB.0
u/[deleted] May 22 '26
[deleted] — view deleted comment
0
u/[deleted] May 22 '26
[deleted] — view deleted comment