Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agreed, I feel like the article didn't address the other major benefit of sync calls, namely their simplicity.

A system built on purely synchronous calls is infinitely easier to reason about and design in all aspects other than e2e latency.

I'd almost approach from the opposite direction, defaulting to sync calls till you have concrete performance reasons not to.



Every time you make an async call there is a whole state machine that has to be instantiated and managed. The only situations I would argue justify async over sync:

1. You are making an I/O bounded call and most of the CPU time would otherwise be spent idle.

2. You are making a CPU bounded call that the UI thread cannot directly await.

3. You need to propagate an asynchronous call context for one of the 2 above scenarios.

There are situations where you can put yourself in a position where it seems async needs to be everywhere (i.e., sharding a monolith to a bunch of separate networked elements).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: