注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
上个月店面和VO 回馈地里。Recruiter很nice;基本都是面筋 但 integration 运气不好。。。经验/教训:
1. 遇到面筋题要装傻 但不能太傻 不然来不及写完。integration要至少做完两个part才算pass
2. debug做好懵逼的准备nk account:
4. HM
5. system design: metrics counter- ## Problem Statement
- Imagine you work at a startup with many copies of many different services
- running in production. You want to help your engineers keep track of metrics
- like number of signups, number of requests, number of errors, etc. So you
- introduce the concept of "counters". You build a `Track` library that ships
- with every service, and anyone can call `Track.increment("some-metric")`
- in their code to increment the `some-metric` counter.
- This is really useful for quickly spotting anomalies. If you graph the number
- of signups over time and it suddenly goes to zero, then we can assume that
- something is not going well. This is mostly an operational tool (for example,
- we’re not keeping track of precise dollar amounts for accounting or request
- counts for rate limiting). Imagine we want to see the number of signups per
- minute for the last 6 hours, or how many fraudulent cards were detected hourly
- for the last day, or trends in a feature's adoption over the last few weeks.
- Starting from just that interface, design everything that happens after
- `Track.increment("some-metric")` gets called on a service, from what happens
- inside the service to how the data is sent, collected, stored and accessed.
- Think about how to support accessing the data, but don’t worry too much about
- any actual graphing UI.
- ## Sample System Diagram
- ```
- +---------------+
- | login-service |--> Track.increment("new-signup")
- | |--> Track.increment("new-login")
- +---------------+
- +-----------------+
- | payment-service |
- | |--> Track.increment("fraudulent-card")
- +-----------------+
- +--------------------+
- | some-other-service |--> Track.increment("some-metric")
- | |--> Track.increment("some-other-metric")
- +--------------------+
- ```
复制代码 |