r/leetcode • • 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

  1. There is no way to handle idempotency using event driven architecture.
  2. 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

25 comments sorted by

View all comments

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.

40

u/qrcode23 Dec 02 '25

In an interviewing, interviewer is god. Make him happy. When you join a team, disagree all you want, lol.

4

u/nsxwolf Dec 02 '25

Yep. Sucks when they fail you over their hidden preferences though.

1

u/Electrical-Ask847 Dec 02 '25

yes they are not hiring machines. your job at work is not to be "correct" . That is usually the trap junior fall into and never get promoted

2

u/nsxwolf Dec 02 '25

Ok but can we admit that interviews are bad?

Let me give you this totally open ended toy problem and you can solve it however you like. But really I have a very specific solution in mind and if you don’t regurgitate it, no job for you. I won’t even give you any real hints as to what I want no matter how many clarifying questions you ask.

1

u/Electrical-Ask847 Dec 02 '25

yea i agree they shouldn't be pattern matching to what they have in mind already. but i don't belive thats what happened here though.

1

u/Adventurous-Cycle363 Dec 03 '25

Well it is not that simple. Sometimes idiots are known to deliberately mislead candidates by asking these and checking if the candidate produces the correct solution by correcting them.

0

u/NewEducator8402 Dec 10 '25 edited Dec 10 '25

This solution does not work. A side effect is an action that has a real and irreversible impact outside your program.

The real problem here is synchronized deduplication at the time of the side effect.

The solution he proposes is over-engineered for the problem.

Kafka + Flink:

✅ Highly scalable.

✅ Excellent for massive streaming.

❌ Poor response to business idempotence --> this is the issue to be resolved.

❌ Enormous cognitive cost.

❌ Operational complexity.

❌ High risk in production.