🚀 MoEngage SDE-2 Backend Interview Experience | Loyal Customer + Rate Limiter + Retry 🔥
Hi Everyone 👋
Recently, I interviewed at MoEngage for the SDE-2 (Backend Developer) role.
Sharing my Round 1 experience — hope it helps someone preparing for backend/system design interviews 💡
🧩 Round 1 – Coding + System Design Discussion
We started with introductions, and then the interviewer jumped straight into a problem:
🧠 Problem: Loyal Customers
Let’s say we have a website and we keep track of what pages customers are viewing, for things like business metrics.
Every time somebody comes to the website, we write a record to a log file consisting of Timestamp, PageId, CustomerId.
At the end of the day we have a big log file with many entries in that format. And for every day we have a new file.
Every visit generates a log entry:
Timestamp, PageId, CustomerIdEach day generates a separate log file.
📂 File 1 (Day 1 – 2025-08-22)
timestamp pageid customerid
2025-08-22 p1 c1
2025-08-22 p2 c2
2025-08-22 p3 c1
2025-08-22 p1 c1
2025-08-22 p2 c2📂 File 2 (Day 2 – 2025-08-21)
timestamp pageid customerid
2025-08-21 p1 c1
2025-08-21 p2 c2
2025-08-21 p2 c1
2025-08-21 p1 c1
2025-08-21 p2 c2🎯 Goal
Generate a list of “Loyal Customers” who:
1️⃣ Came on both days
2️⃣ Visited at least 2 unique pages


