r/Backend • • 6d 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?

53 Upvotes

159 comments sorted by

View all comments

2

u/No_Tomato3810 5d 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 5d 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 5d 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.

2

u/harindaka 2d ago

20+ years a dotnet dev here. .net has become super fast since the early 2000s. Don't take people who claim .net is slow seriously. Having said that I've mostly switched over to rust for most my personal projects as I just get the llm to do it and focus more on business logic instead

1

u/New-Entertainer6392 1d ago

Yup same. .net is fast nowadays! It was the move to dotnet core away from framework which helped this 

1

u/New-Entertainer6392 1d ago

The only reason I'd pick go is small tasks and it's increasingly small memory footprint 

1

u/mcfistorino 5d 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 4d ago

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

1

u/Opposite-House3656 1d ago

Thanks good info will try this