async api calls: when is it better than synchronous? dont you hate waiting for things to load? sometimes synchronous api calls are just too slow. so, when should you use async instead? lets find out.
Ulises Salazar
·16140 views
hey folks, i've been thinking a lot about API design lately, and especially how we talk between services. we often just go with synchronous request/response, but when does it make more sense to do asynchronous stuff? im talking about when one service needs to start something in another but doesnt need to wait for confirmation or a result right away. think about background jobs, long tasks, or even just making services more independent so they dont break each other. what makes you think an async approach, like using a message queue, would be better than a direct call? what are the trade-offs that really matter to you?
24 comments