Skip to Main Content
Patterns of Distributed Systems
book

Patterns of Distributed Systems

by Unmesh Joshi
December 2023
Intermediate to advanced content levelIntermediate to advanced
464 pages
12h 35m
English
Addison-Wesley Professional
Content preview from Patterns of Distributed Systems

Chapter 15

Idempotent Receiver

Identify requests from clients uniquely so you can ignore duplicate requests when client retries.

Problem

Clients send requests to servers but might not get a response. It’s impossible for clients to know if the response was lost or the server crashed before processing the request. To make sure its request is processed, the client has to resend the request.

If a server had already processed the request and crashed after that, servers will get duplicate requests from the client when it retries.

Solution

Identify a client uniquely by assigning a unique ID to each client. Before sending any requests, the client registers itself with the server.

class ConsistentCoreClient... private ...
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.
Start your free trial

You might also like

Designing Distributed Systems

Designing Distributed Systems

Brendan Burns