Back to problems

Find frequent IPs from a huge file

System Design · Asana · Medium

A log-collection system stores one IPv4 address per line, for example 198.51.100.7. The complete file is far too large to be loaded into memory at once. Outline a practical method for solving each of the following two query types under that memory restriction. Query 1: identify the single address that appears more often than every other address. Query 2: identify the K addresses with the highest occurrence counts. For each approach, describe the data structures you would…

Checking your access…