r/Backend • • 2d ago

Rust vs Go for web app backend

In my company having node js as backend facing issues like vulnerability update each week it making hard to maintain prod to update. So how in your companies handling this difficulty.

Planned to migrate from node to go. What does your suggestion on this. Rust is taking entire trend now. Is Rust is better then go for web apps?

37 Upvotes

137 comments sorted by

23

u/sreekanth850 2d ago edited 2d ago

First don't pick a language based on what others say without knowing your product. Check how is the ecosystem suitability. eg: if you are building an devops orchestration platform Obviously Go have several advantage with rich ecosystem. Check the maturity of library you need in your project and their coverage. in majority of use cases performance difference will not be a concern for real world between Go and rust. Unless you are working on a high level close to metal product.

8

u/widodh 2d ago

This. Go has a wide ecosystem of libraries and that makes it very useful. It performs very, very well and should be the right choice for most systems.

55

u/ray591 2d ago

Just use Go bro, don't overthink it.

5

u/Opposite-House3656 2d ago

Go is planned currently it's easier as it have support from long.. just got intrested in rust as it's hype.

Rust is good and fast I use in my day-to-day system scripts but not tried for production web app

39

u/ray591 2d ago • Bravo

Sounds good. Just use Rust bro, don't overthink it.

0

u/[deleted] 2d ago

[deleted] — view deleted comment

5

u/markojov78 2d ago

He has a point tho.

You did not specify any details but if your backed is mostly crud API with some business logic here and there, don't overthink it use whatever you're comfortable with.

1

u/Opposite-House3656 2d ago

Yeah just a joke both message is identical

2

u/unknowinm 1d ago edited 1d ago

Open claude and tell it to build sample projects in both and do some benchmarking and some requests with k6.
Also look at the build time: if go compiles in 30 seconds and rust in 5 minutes that is going to be expensive to build in a CI on the rust side.

In this age performance won’t be that much different. What’s important is to have clients and paying customers.
Also who writes the code? Humans? Then go. Ai? Then use rust IF performance is such an important thing(probably isn’t).
Heck native java with graalvm is sometimes more performant than both.

1

u/this_is_a_long_nickn 2d ago

A rust bot, commissioned by the “rewrite in rust” bros.
/s as if necessary

10

u/Any-Appointment-814 2d ago

Honestly I'd be careful rewriting a working backend just because of the weekly vuln updates, Go has CVEs too and you'll still be patching, just fewer packages. Most of that pain in Node comes from a huge dependency tree, so I'd first check what you actually pull in, drop the stuff you barely use, and let Dependabot or Renovate open the update PRs with tests running so it becomes a boring merge instead of a fire drill. If you still want to move after that, I'd pick Go over Rust for a normal web app and migrate one piece at a time, a big bang rewrite is how teams lose a year.

1

u/Opposite-House3656 2d ago

Yeah that what planned migrating api wise, with both servers running and comparing in logs.

Also legacy node is poorly coded which is slower. b By migrating we can improve performance and security too

1

u/Discordbothost 1d ago

For the side-by-side check, I'd mirror a read endpoint first. Replay writes against a separate test database. Sending a live create request to both servers can create the same thing twice.

1

u/Opposite-House3656 1d ago

Thanks for the tip will try this.. currently read only api in progress.

1

u/Any-Appointment-814 2d ago

Sounds like a solid plan. I'd also compare latency and error rates on a small share of real traffic before switching fully, logs alone can miss stuff.

5

u/jbergens 1d ago

I haven't looked at statistics recently but C# and Java are still common at companies and probably even more common than Go.

I would probably evaluate C# also but would prefer Go to Rust for web things.

1

u/Opposite-House3656 1d ago

Great actually I haven't tried C# and not used in companies so thought it's system apps language. I have used Java, Python for web as those are widely used.

Im willing to try Rust but either claude gng to write and team members easy language so Go is preferring

1

u/Effective_Occasion77 1d ago

I would stay away from Java. Oracle screwed it up. Microsoft just made c# better and better for years and continues.

8

u/FalseRegister 2d ago

I actually see Go taking more trend than Rust these days. Rust has been used more for other things. Go was specifically made for web backends / systems, so people are choosing that. Plus it is a plain, simple language, so it does well with AI.

1

u/Opposite-House3656 2d ago

Great thanks

7

u/ebykka 2d ago

It doesn't matter whether it's Rust, Go, Java or C#. Any strictly typed, compiled language will be better than Node.js.

I recommend taking a look at C# because the syntax is similar to TypeScript, and I guess your team is familiar with that, so you will be able to transfer many of your writing habits and knowledge there.

-3

u/Opposite-House3656 2d ago

C# is very old in trend for web imo. We can prefer Java right? As it has wide variety of frameworks and security handling

6

u/ebykka 2d ago

Java is great, too. You can also take a look at the market in your region. Consider how easily you can find a new developer or a new job with knowledge of the selected language.

2

u/Separate_Eye_6104 2d ago

I don’t get this. C# is very old? 😭

-4

u/Opposite-House3656 2d ago

C# is idle for system apps. For web I haven't heard of using it

2

u/ebykka 1d ago

I’m my region C# is more popular than Java.

1

u/Opposite-House3656 1d ago

Oh great.. 😃

3

u/IncomeOk7237 1d ago

Honestly the weekly dependency churn is mostly a property of how big the npm tree is, not Node itself. Before rewriting I'd check how many of those advisories actually hit code you run. npm audit is noisy, a lot of it is dev deps or some ReDoS in a CLI tool nobody calls in prod.

If you do move, Go is the boring safe pick for a web backend. net/http in the stdlib is good enough that you can get away with a router and a db driver, so the dependency list stays small. govulncheck is nice too because it only flags vulns in functions you actually call, so way less noise than npm audit.

Rust is great but you pay in compile times and the async learning curve, and a normal axum + tokio + sqlx app still pulls in well over a hundred crates. So it doesn't really fix the "too many deps to babysit" problem on its own.

1

u/Opposite-House3656 1d ago

Thanks Noted!

1

u/IncomeOk7237 1d ago

np, good luck with the backend. honestly either choice is fine, just pick the one you'll enjoy maintaining

3

u/old-and-very-bald 1d ago

Rust is really amazing with Axum + sqlx. You will get small very powerful binaries, without any kind of GC breaks. Only downside to rust really is compilation times

1

u/Opposite-House3656 1d ago

I think Rust compilation time is still better than Java 😅

5

u/BenchEmbarrassed7316 2d ago edited 2d ago

Rust vs go - it's more of a philosophical question, but it was quite relevant some 5 to 10 years ago: Rust is a "smart" language that sought to solve complex problems in an intelligent and elegant way, and, by doing so, achieve efficiency. go, on the other hand, is a "dumb" language that attempted to tackle complex problems head-on, in a naive and repetitive manner. However, with the addition of generics (including bounds in recent versions), iterators, and other features, go is no longer that simple language; it has effectively become a poor, inconsistent, less reliable, and less productive copy of Rust.

go is very error prone due to stupid decisions like null, default values ​​and a bunch of other hidden guns. Rust is the opposite, it just doesn't allow you to write bad code.

Here is a minimal code example:

package main

import (
	"encoding/json"
	"fmt"
)

type T struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
}

func main() {
	jsonWithNull := `{"name": "apples", "count": null}`
	jsonWithZero := `{"name": "bananas", "count": 0}`

	var itemNull, itemZero T

	_ = json.Unmarshal([]byte(jsonWithNull), &itemNull)
	_ = json.Unmarshal([]byte(jsonWithZero), &itemZero)

	fmt.Printf("From null: %+v\n", itemNull)
	fmt.Printf("From zero: %+v\n", itemZero)
	fmt.Printf("Counts equal? %v\n", itemNull.Count == itemZero.Count)
}

https://go.dev/play/p/JDHv8Kxo89H

It prints:

From null: {Name:apples Count:0}
From zero: {Name:bananas Count:0}
Counts equal? true

A similar operation on Rust will return an error, and will not implicitly, in the best Js traditions, convert null to 0. So go developers just have to learn this and 100 other rules and special cases. So go's simplicity is a myth.

Rust:

use serde::Deserialize;

#[derive(Debug, Deserialize)]
struct T {
    name: String,
    count: i32,
}

fn main() {
    let json_with_null = r#"{"name": "apples", "count": null}"#;
    let json_with_zero = r#"{"name": "bananas", "count": 0}"#;

    let item_null: T = serde_json::from_str(json_with_null).unwrap();
    let item_zero: T = serde_json::from_str(json_with_zero).unwrap();

    println!("From null: {item_null:?}");
    println!("From zero: {item_zero:?}");
    println!("Defaults equal? {}", item_null.count == item_zero.count);
}

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a9add2d84b93651687435c8152b6c7ef

Prints:

thread 'main' (13) panicked at src/main.rs:13:61:
called `Result::unwrap()` on an `Err` value: Error("invalid type: null, expected i32", line: 1, column: 32)

2

u/Opposite-House3656 2d ago

Thanks its solely based on good coding habit.

1

u/BenchEmbarrassed7316 2d ago

It's more about consistency: Rust introduces one clear rule that works everywhere. go has 100 special cases that contradict each other, and you just have to remember them all.

For zero values, sometimes optional fields are made pointers (which sends them to the heap and degrades performance), sometimes they add an additional bool field that indicates whether the object was created properly (just remember to check the value of this field in each place), sometimes they add some comment or documentation.

2

u/Empty-Sandwich-7092 1d ago

Thanks for your amazing answer <3

1

u/Low_Reputation_9893 1d ago

json/v2 solves this

1

u/BenchEmbarrassed7316 1d ago edited 1d ago

You are wrong:

https://go.dev/play/p/VCPU5J7Ypgo (same code but encoding/json/v2)

Or I missing something?

1

u/Low_Reputation_9893 1d ago

Yes, you ignored the unmarshal errors where the issue is reported.

1

u/BenchEmbarrassed7316 1d ago

https://go.dev/play/p/OJq-ucSvLmE

Errors are null in both cases with v2 decoder. Can you provide code example please?

1

u/Lydian-Taco 1d ago

While I agree the nil handling in Go is annoying at times and lets you introduce panics if you’re not careful, there’s something to be said for how great it can be to use a “dumb” language if you’re working in an enterprise system where lots of people need to be able to contribute who have varying levels of experience. I use it at work a lot and we just don’t really use the new features so that there’s still basically one way to do everything. When we have used Rust, it’s been more challenging to get people up to speed as they come and go.

1

u/BenchEmbarrassed7316 1d ago

It’s a double-edged sword: while it may be easier for a beginner to write code in go, you will end up spending more time either reviewing that code or fixing the bugs that inevitably arise later. This applies not only to null issues but also to data races and a host of other errors - such as the accidental copying of slices or goroutine leaks. Therefore, even in the pre-AI era, I would argue about which of these languages ​​actually allows for faster development (I mean writing code and debugging; writing in Js would be the fastest, but the code might simply not work).

2

u/Eye_NeO 1d ago

Use go if you like simplicity. You will still have DIY some things. You can easily start off by using default mux or use any router like Gin, Fiber or Echo. Do keep in mind that input binding in gin will require more boileplate compared to Fiber as fiber can bind from all sources in one call while Gin cannot do that.

Use C# if you want very rich prebuilt ecosystem. You got ASP.NET with MVC style controllers and functional controllers using MinimalAPI. You get DI out of the box, Data Annotation and FluentAPI for validations and EfCore as ORM for Db layer

1

u/Opposite-House3656 1d ago

Seems you got a experience in go web development thanks for the tip. Noted. Either way we r gng to migrate from node to go so mostly action will be done by claude 😀

2

u/No_Tomato3810 1d ago

Go, some pains you'll face, if you're used to orms, Go or Rust will be very painful, things like middleware and types(openapi), will be painful as well. You'll have to implement yhis both on the backend and frontend. unless your company was using node js as an api, then this will be nothing new.

But if it's a sacrifice you're willing to take, then Go will be perfect.

Rust is nice, but you'll spend most of the time fighting the language, not being productive...plus everything else I just mentioned above.

I'd also put C# ASP.NET core on top of the list as the most viable option, it's fast asf, battle tested, lots of very well maintained packages, which you won't find in Go or Rust, most packages from Go or Rust are either very new, or haven't been touched for the past 1 year, so you'd probably have to build most of things by yourself/team. All that said, avoid the trend train, be your own man/company.

Jump off the high dive! Pee into the wind my friend.

1

u/Opposite-House3656 1d ago

In our region .NET is seen as very old language and all our banking services using this which is slow and very old UI. But I'm not sure why are they not migrating may be code complex and security.

I'm from India here for web they mostly used Java and even Python for smaller apps.

MERN is been in trend in couple of years.

I'm not sure why in this sub recommending .NET mostly. We don't have that much devs here with that. C# is also less used imo.

3

u/MythologicalEngineer 19h ago

It’s because in many places .NET is super popular and it’s been very fast for like 10 years now. Anyone claiming that it’s slow or archaic is mistaken.

1

u/mcfistorino 1d ago

For go you can generate the server and handler layer with oapi-codegen from writing oapi specs, and then you use the same specs with orval to generate types and clients for the frontend. Never have to type api calls again

1

u/No_Tomato3810 6h ago

Exactly my point, with something like ASP.NET Core, all this is stripped away

2

u/ledatherockband_ 1d ago

For backend? Golang.

Only reason I (read: Claude) used rust so is that I would incur less cloud spend because Python is a resource hog and the packages I needed were in Rust not Go.

1

u/Opposite-House3656 1d ago

Yes packages and system apps rust is better. For web seems go is widely used.

4

u/Beagles_Are_God 1d ago

I don’t find Rust as something made for Backend development. Yeah it is possible but it’s a lot of unnecessary memory and system management for a backend.
Go is perfectly capable of this, not only that, it was made for this, however a lot of things you have to make from scratch, like auth; Good thing about go is that it has pretty much just one way of doing the same thing so the solution is always the good one, however it can be a little verbose, or more than verbose, tedious and repetitive.
If you really need something Rust is only capable of doing (i doubt), then you can always make a separate service with it.

4

u/Beagles_Are_God 1d ago

Also, consider other technologies a little more batteries included like .NET. You all coming from Typescript, C# is a really good language and .NET already has official solutions for most stuff and even if not, the vulerabilities problems of Node ecosystem is rare on .NET.

1

u/frenzied-berserk 1d ago

And .NET uses x10 resources…

2

u/Beagles_Are_God 1d ago

And is that an actual problem on OP's case? Do you know how much resources does their server have? Do you know how many processes their server is running?

That said, .NET is really not that resource heavy, it efficiently uses multithreading programming and actually beats NodeJS in resource consumption. Not only that, both Go and C# can very efficiently handle concurrency at systems level, which means that a single server with a single C# app running can scale veritcally so much better before ever needing to spin up another server for that process, this doesn't happen in NodeJS because of the single threaded environment, so you end up with "workers" which means more money and effort spent on it.

So, if you can run Node, you can run .NET.

1

u/frenzied-berserk 1d ago

I don’t know the exact situation, but I know how hard it is to sell a new tech stack to stakeholders without numbers. Go and Rust are more cost-efficient than .NET. I don’t see any advantages to using .NET here.

1

u/Beagles_Are_God 1d ago

Cost efficient in what aspect?
Paying programmers? Well yk, well matter Go, Node, Java, Rust you gonna pay em.

Runtime? Running .NET in docker or a cloud environment is just the same as in Node, unless you are doing serveless, in that case neither Rust, Go or .NET are the best options.

Writing Code? It’s easier to migrate from Typescript / JS to C# than to Go or Rust, they are so similar (both were designed by the same person) and the official libraries are a brief, also Agents are a thing now. And C# is pretty famous for having very clean code standards, so writing C# is actually fast and less verbose.

Besides that, unless Stakeholders are technical people, i highly doubt it’s their say unless expenses on tech stuff is really the main issue. I know every workplace is different, but most of the time it’s the teams who choose the technologies, not the stakeholders (unless you work at a company with a very specific tech stack for all their projects).

1

u/frenzied-berserk 1d ago

Maintaining coding standards and development speed no longer matter.
Last year, I worked on a project to migrate approximately 1K microservices from .NET to the Rust ecosystem. We completed it with a team of four + LLMs. Infrastructure costs were reduced fivefold, and all performance metrics improved.
Again, I don't see any advantages to migrate from Node to .NET.

1

u/mavenHawk 1d ago

And what about all the libraries you were using in .Net? Did you migrate those too? Do you own them now? Is the increased maintenance included in this five fold cost reduction?

1

u/Scyth3 1d ago

They're both great. Go is my "goto" for this kind of stuff if speed to market matters. Rust is what I currently use if I have a few extra weeks to shake out async behavior.

I've written golang that handles petabytes of data parsing/movement a day, and rust services that backend entire tablet infrastructure. It also depends what your team is most comfortable with.

1

u/Opposite-House3656 1d ago

Team prefer claude only. I think Rust need more engineering monitor so Go is easy for team

1

u/Scyth3 1d ago

If you're just going to claude it, then either is fine. Make sure you put really tight linting around everything you do, and have it generate tests as you go.

1

u/Nearby-Pen-4624 1d ago

Honestly based on your req you had to go and don't take anything as good

1

u/bart_88s 1d ago

Just use whichever you enjoy more. I doesn’t really matter.

1

u/MyExclusiveUsername 1d ago

I'd stay on Node. There's always Bun if Node isn't your thing. On top of that, AOT numbers aren't far off from Go, and at high load you won't notice a difference anyway.

1

u/Opposite-House3656 1d ago

Oh great.. actually we need to refactor/optimise so instead staying in node planning to change wheel

1

u/MyExclusiveUsername 23h ago

Think twice. It is the most supported and popular tech now. Also, you can compile to a binary with Bun or, experimentally, with Node. Also think about support - anyone in your team can understand Rust? And if the project is vibe-coded, then do not care about my comment; I am old corporate coder; my goal is stability for decades, so my advice is conservative.

1

u/Opposite-House3656 23h ago

With bun also we need to patch vulnerability update frequently right.

1

u/MyExclusiveUsername 22h ago

The most popular technologies receive updates more frequently. And with Rust or Go, you think you should not? Usually CI/CD pipeline does it.

1

u/mcfriendsy 1d ago

The dependency hell can quickly become a pain point. In fact, that's the whole idea behind Zuri (https://github.com/zuri-lang/zuri, formerly Blade). Though, I won't say it's generally production ready yet. I mean there are a couple of enterprise production apps running on it even for fintech products serving thousands of users, but that's because the maintainer (me) is also actively involved in those projects. Either way, worth checking out.

1

u/Opposite-House3656 1d ago

That solely based on requirement. Fintech need to system optimised and well engineered so for complex task Rust can do better with accuracy but frameworks are not easier to pick for new devs and language should be AI friendly too so for normal apps I think Go is efficient for complex programs we can use highly engineered languages

1

u/frenzied-berserk 1d ago

Go is the best choice for you. Rust has everything to build a modern backend, but the paradigm and learning curve may slow you down.

1

u/greyeye77 1d ago

go is not vulnerability free, but does few things to protect from many supply chain attacks. And you often can run everything on the distroless base image that comes with nothing. This reduces the `***2shell` attack vectors and related vulnerabilities.

also, most underappreciated factor with go is that I've never had issue rebuilding old code. (try doing that with rubygem, npm, pypi) as often it just download the source code and build from github. (almost 0 need for a platform specific pre-built binaries)

build/test runs in less than a min for the most of the time, and testing is built in to the eco system (no need for addon tests like Jest)

I still value reading code and writing a bit of Go, and it's the most `human readable` code base, (in par with maybe Python)

1

u/Opposite-House3656 1d ago

Great thanks

1

u/Temporary_Practice_2 1d ago

What exactly are you facing with Node? Just curious

3

u/Opposite-House3656 1d ago

Issue is team developed mern stack with poor backend handling. As node is not strictly typed they written whatever works so performance is bit off. So rather optimising the shit planned to change the wheel.

Also maintaining node update and testing each time is being a work all the time.

2

u/Temporary_Practice_2 1d ago

Ok. Any consideration for Java Spring Boot!?

2

u/Opposite-House3656 1d ago

Yeah I love that too. But company preferring Go for now. Java work great if well written with code standards it can run decades

1

u/Amazing-Mirror-3076 1d ago

We are moving everything to rust - it's the best choice for the ai age where DX is now irrelevant.

1

u/Opposite-House3656 1d ago

DX mean

1

u/Amazing-Mirror-3076 1d ago

Developer experience.

Pre ai, teams choose languages like python and JS because they were easy for the developer.

The DX is now irrelevant so choose a performant language with tight strict typing (this helps the ai).

Rust is probably the best candidate.

Pre ai I would advocate against rust for web backends because the extras Dev effort wasn't worth the saving in CPU and memory.

With AI, the cost of using rust has gone but it's exceptional speed and low memory usage remain.

2

u/fykup 17h ago

/remindme in 2 years, when the Rust rewrite becomes an unmaintainable mess with ridiculous build times that nobody wants to touch

1

u/UhLittleLessDum 13h ago

lol, I built Fluster with 1.4 million lines of code, most of it in Rust (if you trust the line counting library I used) on battery power. Build times suck, but they suck because you're getting something in return... safety and a well built code base. If it becomes unmaintainable, that's a you issue.

1

u/Amazing-Mirror-3076 9h ago

Ai created a 17m line lean proof. The Linux kernel (sans drivers ) it's only 13m.

I'm not convinced it's going to be a problem.

1

u/running101 19h ago

I suspect you are ahead of the curve. I believe more teams will come to this conclusion

1

u/Amazing-Mirror-3076 9h ago

I think a lot of teams are still under the illusion that they can code better than an ai and that is simply no longer true.

It's still needs improvements in being able to handle the bigger context of a whole project but I expect that will be solved.

We are shipping more features with less bugs.

We spend our time reviewing the public interfaces and writing specifications (ai assisted).

I iterate on specs whilst taking my morning walk with Dot.

1

u/SoupAccording8095 22h ago

Choose go, it's exactly what you are looking for. It has the most feature complete, batteries included standard library http package.

This is particularly helpful for your use case, reducing CVEs and easy updates and maintenance.

0

u/[deleted] 13h ago

[deleted] — view deleted comment

1

u/SoupAccording8095 12h ago

Why so bitter?

1

u/Due_Warthog749 13h ago

I'd say Go for API/microservices, but Rust will give you more control, more speed but take a lot longer to implement/learn unless you're using AI 100% of the time. In that case, probably Rust for its bare metal access vs Go.

1

u/Opposite-House3656 8h ago

My web app is mostly apis. Each task are not system heavy. Ofcourse rust would be better if heavy app.

1

u/digihmong 8h ago

Use both, each are great at their own things and work well together. AI solved the learning curve.

1

u/arivictor 7h ago

Which is better: do you like writing Go or do you like writing Rust?

Performance is a moot point unless you're one of the rare few companies where you are already hyper-optimising your code to squeeze the last 2% out.

For me, for readability and general quality of life: Go

1

u/Opposite-House3656 7h ago

Got it thanks

1

u/leon_pylo 3h ago

I'd go with what you and your team knows best, even if you generate most of the code with AI, having a tech stack you are not even able to read might go wrong and I'd not do it for anything important or business relevant.

3

u/nightm4re1911 1d ago

As someone whos used PHP all his life and im old as fuck - use Go

1

u/UhLittleLessDum 13h ago

Rust. If vulnerabilities are your concern Go would be an insane decision.

0

u/RoboErectus 2d ago

I have never really liked go at all.

There are some great frameworks for rust now that make it a real contender for backend development.

The future is rust imo.

1

u/Opposite-House3656 2d ago

Are you suggesting because of hype. Is web framework that much good for web apps?

2

u/RoboErectus 2d ago

I'm not much of a hype person I don't think. I've disliked go since release. Liked rust since release.

Go is kind of a mess with things like too much in stdlib and I think it will eventually fall. I have seen wild bugs from people learning its concurrency system. I just don't like anything about it.

Rust has consistently gotten better over the years and reading and writing it brings me joy. It moves the right stuff to the compiler and it is really fun.

These are not reasons to pick your platform. Just one old guy's feelings.

1

u/Opposite-House3656 2d ago

Sure thanks! Rust is great imo too but for web development only I'm thinking to pick or not..

1

u/BenchEmbarrassed7316 2d ago

Hype is about golang. You may have heard that go has a web server in its standard library. Many go fans have claimed that this is all you need to write web applications. However, the path-grabbing part didn't appear until 2024 (!!!): "GET /items/{id}" - now you can write like this and get access to id, before 2024 you had to manually parse url string. Wait another 10 years or so, and maybe you'll get an enum. And yet, there are a lot of people who claim that go allows you to solve problems simply and quickly.

1

u/wrd83 1d ago

perhaps reduced dependencies could help you?

but if you come from node I'd rather have go, and I don't think you'll get the benefits of rust unless you really commit to it. By this I mean seriously thinking about performance and training your staff to do so.

Go I'd say is easier to manage, but it has also issues with go routines and channels that you have to own up to.

1

u/every1sg12themovies 1d ago

My two cents. Rust is harder to learn and get your head around if you didn't program in c before. Also go has much much bigger ecosystem.

Personally tried both but stuck with rust (in a good mood at haha). Also ask the team what would they prefer.

1

u/n9iels 1d ago

Use what works for your company. If no one knows Rust for example it doesn't make sense to choose that. Do keep in mind tough that patching your application was already a common task. Go, Rust, PHP, Python, no matter what you use the dependencies need updates. Nowdays with AI this will be even more commen. Migrating to a particular language will not change this.

1

u/antoine235 1d ago

Go it's a no brainer. Performance and dev/agent exp out of the box. Yes, the right rust code will outperform go (and most other languages out there) when facing masive pressure, but seriously, do you think your project will reach such critical levels?

1

u/monta_gia 1d ago

Research before doing migration. The simplest way migrating part by part of existing backend

Don’t follow trend it just pain your ass when you write code you don’t understand.

1

u/migueln6 1d ago

None, Laravel with PHP, maybe c# with .net core but Laravel the king.

1

u/One_Fuel_4147 1d ago

go with std http router, sqlc, goose, task file.

1

u/BDer82 1d ago

pick the language you are most comfortable in, both will do nearly anything you want, both will do most of want you'll need and be very straight forward about it, both will have areas where you will go arseovertit to make something work and end up being very unhappy about doing it but, it'll work.

neither language is king or queen or even worthy of the hyper drooling rabbit dog stance some people take about them.

Pick one, neither are perfect, but can accomplish nearly everything.

1

u/vips7L 1d ago

Rust is the wrong choice for web services. 

1

u/Amilektrevitrioelis 20h ago edited 20h ago

Yes, Rust is better. Whatever libraries that are now missing, will be ported over very soon.

Rust didn't get used before for web backends for 3 main reasons:

- Slower development time.
- Higher skill needed to use it effectively
- Missing/immature libraries.

The first two have been solved by agentic coding. The 3rd one is being solved right now. The business reasons not to use it disappeared.

We have the potential to finally have well-performing backends and other stuff.

Just use Rust, forget the toy language that is Go.

1

u/Codeplex1 1d ago

Maintenance would be required for any backend: node, go, or rust.

For web, always go with node.js, because it's built for the web from the ground up. Other engines needs a lot of patching to work as web frameworks, and their code is verbose with a lot of maintenance issues.

0

u/NoName-NNN 2d ago edited 2d ago

My side project: Node.js(TS)->Bun(TS)->Go->Java。My experience:

  • Node.js:unintentionally exiting every few days.
  • Bun: Stable running.
  • TS:New tools emerge every day. However, js is single threaded and difficult to scale.
  • Go: Simple, stable, direct, but little expression. Over 100MB RSS memory usage.
  • Java: Stable, expressive. Over 200MB RSS memory usage. My VPS only runs this program, so memory usage is not a problem, and I am very satisfied with the writing experience and code readability provided by Java.

0

u/Opposite-House3656 2d ago

You are correct for big product that has high traffic Java is preferred.

0

u/zarlo5899 2d ago

my gotos for backends is C# and Go

0

u/KariKariKrigsmann 1d ago

Go for C#, it’s easier if you already use Typescript.

-1

u/Nearby-Property-8163 1d ago

Want to do web apps and don’t think about php?
Highly inappropriate.

Php is the language that was created specifically for web use and development and has a lot of frameworks and community support.

Would you also call for a plumber to fix doors for you?

1

u/Opposite-House3656 1d ago

Thanks geeky you are saying go is plumber for woods work? And php is carpenter

1

u/BenchEmbarrassed7316 1d ago

How are things going for you in 2004?

1

u/Nearby-Property-8163 1d ago

This shows exactly that you have no idea what you’re talking about. 0 fundamentals , all in on what’s trending and then you realise nothing works correctly anymore

1

u/BenchEmbarrassed7316 1d ago

Yes, I follow trends regarding the development of fast, reliable, and maintainable software. I understand that in the php world, such trends are considered harmful.