Distributed Log System
How to have enough information in the log for you to search
- Request - Correction id
- Response - Unique id
- Standard log format, or have a service to transfer the logs into a standard format
- Request context
Issues
- Avoid PII data (Personally identifiable information)
- Avoid Sensitive Information: Password etc.
- 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