3 ms·
I don't think this is necessarily exclusive to Serverless, rather any event-driven architecture. I work with a mostly event-driven (via GCP Pub/Sub) microservic
by Arbortheus 4y ago
I don't think this is necessarily exclusive to Serverless, rather any event-driven architecture. I work with a mostly event-driven (via GCP Pub/Sub) microservices backend, and adopting statelessness and idempotency where possible massively simplifies application logic.
Without idempotency your transient error retry logic becomes really complicated. You need to handle which stage(s) have completed successfully and which failed, which then makes your service stateful.
All this complexity comes from a lack of idempotency, if you can get rid of that, you could just Nack the message and let Pub/Sub retry it automatically with exponential backoff.