r/leetcode • u/Dependent-Profile426 • Dec 02 '25
Question PayPal Interview Experience | System Design | Sr Software Engineer
Question
Design a notification service.
While solving the problem, for idempotency handling, I have used even-driven architecture.
The solution that I gave is publishing the messages in Kafka, and processing the messages through Flink. So that unique message gets processed exactly once, with respect to the idempotent id.
Interviewer's (Staff Software Engineer) comments
- There is no way to handle idempotency using event driven architecture.
- He was expecting solution with Redis. (Synchronous write-through caching)
I did some research, my solution is working and much-more scalable in case of burst traffic and bust notification.
I got rejected.
Was I correct?
85
Upvotes
11
u/tired_coder2024 Dec 02 '25
‘Unique message gets processed exactly once’ at what level .. what’s your notion of ‘processed’
55
u/Party-Cartographer11 Dec 03 '25
The problem here is you are using brand names instead of the specifics of how your proposed system works.
The brand names have a pile of assumptions or features and constraints that may or may not be known by the interviewer.
This sounds more like a system integrator/IT shop answer of how existing systems work. A software architect discussion should be more generic and about algorithms.
"I would use a distributed stream processing system which reads an ID field that ensures only once processing."
"Ok, and how would you handle when the producer has a bug and sends out duplicate IDs?"
Now talk about exactly how Flink handles or doesn't handle this (if you want to use Flink as a reference) and what you would do if it doesn't.
18
u/qrcode23 Dec 02 '25
I had to design a subscription service.
33
u/nsxwolf Dec 02 '25
The interviewer was wrong about your solution not working.
He had a preference for a simpler, synchronous solution with fewer moving parts - but accidentally exposed his ignorance in the process.
Not a Staff level moment for that guy.
2
u/NewEducator8402 Dec 10 '25 edited Dec 10 '25
No, you were not correct in the context of the question, and the rejection is consistent.
Your solution works technically, but it does not address the problem as it was posed in the system design interview.
1. Key confusion: idempotence ≠ exactly-once processing: your answer with: Kafka + Flink + exactly-once → guaranteed idempotence, which is conceptually incorrect.
Idempotence is a business property, not a pipeline property. Exactly-once guarantees that Flink processes an event only once in its internal state, which does not guarantee that an external notification (email, SMS, push) will not be sent twice.
Even with Kafka + Flink perfectly configured, you can send an SMS twice. Concrete examples: HTTP timeout after sending → retry → double notification
2. The real problem: synchronized deduplication at the time of the side effect
A notification service has an irreversible side effect. The only reliable way is to check and record the idempotent ID at the exact moment the effect is produced.
This involves:
Here with Redis, you can use SETNX / write-through cache, which allows:
So there is no way to manage idempotence with an event-driven architecture.
1
u/HumanAd2237 Dec 03 '25
In PayPal don't they have multiple rounds scheduled at once? How did you perform in the other rounds op? Also, could you tell your location?
1
u/InformationHungry163 Dec 03 '25
Whcih loc? How did you apply? Yoe?
1
u/Least-Gift-7646 Dec 03 '25
even i had to design a subscription service , i had 2 more rounds coming up its for san jose location
1
u/Mindless-Answer5643 Jan 19 '26
If I get offer letter and I give notice in my current company... has there been any scenario that paypal hr has then turned down the offer because of any hiring freeze or any other reason?
1
u/Subject-Pie-3907 Apr 26 '26
you had to spit out what he was prepared to listen.