The sudden spike that bostr made in bun and nodejs is really different. Under intensive condition, Bun did 20% less on CPU than NodeJS in sudden spike.
Discussion
imagine if it was written in a proper language
If Nostr event blob is JSON, there's no reason for me to switch from JS to other to suffer the pain.
It hard to find a more proper language than JavaScript in these days. JavaScript runtimes such as Deno and Bun are very innovative.
Backend nowadays, especially Web apps are mostly relying on JSON for data and stuffs. So what is even the point to make my life hard on switching to other while the main purpose is still just this, when i could do it easier.
https://misskey.io is one of good example out here. Backend is written entirely in TypeScript and could withstand with many online users.
If a service does not have like 10 million users and 10K+ QPS, the choice of language can hardly be the bottleneck. The choice of database is usually more influential on performance.
Because it’s very easy to horizontally scale a stateless backend service and very hard to horizontally scale a database to a cluster.