Carousell interview question

How would you build a scalable chat system?