Use messages and queues
A serverless application works efficiently when the application is asynchronous, but with web applications, this is not that simple, because web applications require lots of request–response interactions and lots of querying. Going back to functions not calling other functions, it’s important to point out that this is how you chain functions together. Queues act as circuit breakers in the chaining scenario, so if the function fails, we can easily drill down to the failed queue and investigate the failure, which could be the result of pushing messages that failed to a dead-letter queue.
With applications that have serverless as the backend, it would be ideal to use CQRS, which separates out the conceptual model of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access