Distributed Log System

[System Design] Log System

How to have enough information in the log for you to search

  1. Request - Correction id
  2. Response - Unique id
  3. Standard log format, or have a service to transfer the logs into a standard format
  4. Request context

Issues

  1. Avoid PII data (Personally identifiable information)
  2. Avoid Sensitive Information: Password etc.
  3. Excess Logs. 大的log会影响性能,我们在产生日志的时候,要考虑这个生成的日志会不会太大,比如一条日志就是一个巨大的文本,评估这条日志可能会导致的性能影响。

Single Point of Failure

上套路:

Active passive

Active active

Ebay面试的同类问题

Design event system, that is receiving events from various client (iPad,mobile,browser) across the world. It is getting approx 1 billion events /day. At any point of time the PM comes and says , retrieve how many events occurred in last 60s and we should be able to retrieve that

相关文章: