• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: June 7th, 2023

help-circle

  • On the contrary, I think that the left piece of code is not building constrains prematurely and actually enables you to modularize it away when needed.

    Sure, if the logic grows, if it needs to scale, if the team increases in size… then it makes sense to modularize it. But building something from the very beginning to achieve that is going to impose constraints that make it harder to reason about and harder to refactor; you’ll have to break down the previous structures and boundaries built by the function heavy example, which will probably introduce needless indirections.



  • Aaaahh so libuv actually runs a thread pool, TIL. I’m another victim of internet propaganda I guess 😅 . You know, I never actually checked libuv docs until now and they seem quite welt built.

    The silliest thing I’ve just realized is that I knew that the first implementation of a web server in dotnet core was using libuv, and I still didn’t think twice about the single threaded meme.


  • Thousands of requests per minute can mean many things so maybe you’re referring to several hundred requests per minute, but one of our services at work gets 300 requests/second which is ~18K requests per minute and it’s really not that much. We’re using pretty cheap cloud services. Even thrice the traffic is pretty much a slow walk for your average production-grade web framework.

    Web frameworks are built to support an insane amount of incoming requests, including node. The issue with node is the single threading and having to scale with worker threads AFAIK.

    edit: our runtime is C#