Design LinkedIn's Who Viewed Your Profile feature

by ethereal_fable351
LinkedIn
mid
system design
medium
offer
67
1.7k

LinkedIn asked about designing the "Who Viewed Your Profile" feature. Simpler than I expected for a system design round but the details matter.

The core challenge is real-time event processing at scale. Every profile view needs to be recorded, deduplicated (one viewer multiple times = one entry), and aggregated.

I proposed using Kafka for the event stream, with a Flink job for deduplication and aggregation. The aggregated data (daily/weekly/monthly viewers) gets stored in a read-optimized store like Cassandra.

The privacy angle was important. LinkedIn has different visibility levels: anonymous mode, showing industry only, or showing full profile. This needs to be checked at write time, not read time, to avoid privacy leaks.

Follow up was about trending viewers. If someone suddenly gets 10x more profile views, they should get a notification. Discussed using a sliding window counter with anomaly detection.

The second follow up was about showing mutual connections and how the viewer found your profile. This requires joining with the search/feed event stream.

Got the offer. The key was showing I understood the privacy implications, not just the technical implementation.


Markdown supported