Post related -> MySQL image -> S3, CDN Cache(data close to user, low latency, 10times fast)
BottleNecks.
Read QPS » Write QPS: 500k v.s. 5k, a. read from cache, memcache/redis -> read QPS 25k,(加了read Cache, readQPS可以减少90-95%) b. Craglist: pipeline store in the DB, pipeline store the they build a pipeline -> post -> static html -> CDN server generate HTML for each region every hour from server side, 1hour latency, how to handle update?
read req -> CDB -> serve the static html page write req -> database -> only write to DB
c. deduplication, from client side?
d. data partition for each reagion? CDN
MySQL: 10k QPS for complicated Query for simple Query better
DynamoDB: infinitely horizontal scale, if you want to pay
JWT: https://zhuanlan.zhihu.com/p/70275218
Authentication: verify who someone is, confirm identity
Authentication Server: https://auth0.com/blog/what-is-an-authentication-server/
To manage access control, an authorization server will issue access tokens to the client that lists what permissions the current user has. -> JWTs authorization process depends on authentication. Authorization cannot be granted unless the identity of the user is verified.
Encryption:
Feedback:
读写分离 QPS:5k-10k 有一个DB, keep utilization under 50% 1 SQL server 500GB,
two threshold for scale
API design -> rest, rpc, psudo code api不是重点
DB backup
如果没有很了解,不要太focus on details, suppose we have end-to-end encrption/Dynamo infinite scale service
要顺着面试官的思考来,比如面试官说不用user id
TB -> 1K->10k server