Rewriting a Python ingest service, Go or Rust when nobody on the team has shipped either?
Three backend developers, all comfortable in Python and nothing else. The service takes roughly 3k JSON messages a second off a broker, validates them and writes batches to Postgres, and it currently needs four boxes to keep up. We have about six weeks before a traffic event that will roughly double that, and our ops team already deploys other people's Go binaries so that side is solved either way. I am not asking which language is better, I am asking which one a team like mine survives shipping in six weeks.
@parquet_pile · 2mo ago
I have ported the same class of service to both, about a year apart, so I can compare rather than speculate. The Go version took a fortnight for a first working cut and was in production in a month, and the code was boring in the way you want infrastructure to be boring. The Rust version was faster in the end and used noticeably less memory under load, but the first working cut took over a month, and most of that was not the borrow checker, it was choosing between ecosystem options for every single dependency and then discovering they disagreed about async.
If the workload were CPU bound number crunching I would say Rust and mean it. For pulling messages off a queue and shovelling them at a database, Go's standard library and one database driver gets you there and the performance difference will not be the thing that decides your event.
Reply
Report