After designing the system using Kafka, Flink, and ClickHouse, the interviewer asked how I would solve the problem without using any of those technologies, building everything from scratch. He gave me a generic queue and a generic database.
Anonymous
I responded that I would use consistent hashing to organize the workers in a consumer group, which would aggregate the data from the queue and write it to the database. The data would be partitioned by ad_id
Check out your Company Bowl for anonymous work chats.