知识卡片

问题卡 · 4449

短链读路径优先查缓存

理解等级:中级

短链访问通常多于创建,可缓存短码到长 URL 的映射。缓存未命中再查持久存储,不存在则按无效短码处理;缓存承担读加速,映射事实仍须在数据库中可恢复。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 短链 · 查看原书依据

      URL redirecting deep dive Figure 8-8 shows the detailed design of the URL redirecting. As there are more reads than writes, <shortURL, longURL> mapping is stored in a cache to improve performance. The flow of URL redirecting is summarized as follows: 1. A user clicks a short URL link: https://tinyurl.com/zn9edcu 2. The load balancer forwards the request to web servers. 3. If a shortURL is

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第08章《短链》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0021_split_003.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:URL redirecting deep dive Figure 8-8 shows the detailed design of the URL redirecting. As there are more reads than writes, <shortURL, longURL> mapping is stored in a cache to improve performance. The flow of URL redirecting is summarized as follows: 1. A user clicks a short URL link: https://tinyurl.com/zn9edcu 2. The load balancer forwards the request to web servers. 3. If a shortURL is