[译]《Grokking the System Design Interview》设计Instagram

这是一篇双语翻译的文章,原文出自 grok_system_design_interview.pdf 的一篇文章《Designing Instagram》设计 Instagram。 Let’s design a photo-sharing service like Instagram, where users can upload photos to share them with other users. Similar Services: Flickr, Picasa Difficulty Level: Medium 让我们设计一个像 Instagram 这样的照片共享服务,用户可以上传照片与其他用户共享。类似服务:Flickr、Picasa 难度级别:中 ...

2023-11-24 · 18 min · 8734 words · chensoul

[译]《Grokking the System Design Interview》设计Pastebin

这是一篇双语翻译的文章,原文出自 grok_system_design_interview.pdf 的一篇文章《Designing Pastebin》设计 Pastebin。 Let’s design a Pastebin like web service, where users can store plain text. Users of the service will enter a piece of text and get a randomly generated URL to access it. Similar Services: pastebin.com, pasted.co, chopapp.com Difficulty Level: Easy 让我们设计一个类似 Pastebin 的 Web 服务,用户可以在其中存储纯文本。该服务的用户将输入一段文本并获得一个随机生成的 URL 来访问它。类似服务:pastebin.com、pasted.co、hopapp.com 难度级别:简单 ...

2023-11-24 · 11 min · 5254 words · chensoul

[译]《Grokking the System Design Interview》域名系统

这是一篇双语翻译的文章,原文出自《Grokking the System Design Interview》教程的 Domain Name System 这篇章节。 Introduction to Domain Name System (DNS) 域名系统 (DNS) 简介 The origins of DNS DNS 的起源 Let’s consider the example of a mobile phone where a unique number is associated with each user. To make calls to friends, we can initially try to memorize some of the phone numbers. However, as the number of contacts grows, we’ll have to use a phone book to keep track of all our contacts. This way, whenever we need to make a call, we’ll refer to the phone book and dial the number we need. ...

2023-11-17 · 14 min · 6757 words · chensoul

如何设计一个短网址服务

如何生成一个短网址服务,参考 Design a URL Shortening Service / TinyURL 和 Designing a URL Shortening service like TinyURL 两篇文章,整理如下笔记。 其中主要包括以下内容: 设计一个系统有哪些步骤 需求 预估 设计 高层次设计 API 设计 细节设计 评估 设计一个短网址服务的细节 设计步骤 Requirements 需求 功能性需求 短 URL 生成:我们的服务应该能够为给定 URL 生成唯一的较短别名。 重定向:给定一个短链接,我们的系统应该能够将用户重定向到原始 URL。 自定义短链接:用户应该能够使用我们的系统为其 URL 生成自定义短链接。 删除:在赋予权限的情况下,用户应该能够删除我们系统生成的短链接。 更新:如果有适当的权限,用户应该能够更新与短链接关联的长 URL。 过期时间:短链接必须有一个默认的过期时间,但用户应该可以根据自己的需求设置过期时间。 分功能性需求:可用性、可靠性、扩展性、可维护性、容错性 可用性:我们的系统应该具有高可用性,因为即使是第二次停机的一小部分也会导致 URL 重定向失败。由于我们系统的域位于 URL 中,因此我们没有停机时间的优势,并且我们的设计必须灌输容错条件。 可扩展性:我们的系统应该能够随着需求的增加而水平扩展。 可读性:我们的系统生成的短链接应该易于阅读、区分和输入。 延迟:系统应以低延迟执行,以便为用户提供流畅的体验。 不可预测性:从安全角度来看,我们的系统生成的短链接应该是高度不可预测的。这确保了下一个短 URL 不会连续生成,从而消除了有人猜测我们的系统已经生成或将生成的所有短 URL 的可能性。 Estimation 估计 ...

2023-11-17 · 5 min · 2184 words · chensoul

[译]《Grokking the System Design Interview》系统设计主模板

这是一篇双语翻译的文章,原文出自《Grokking the System Design Interview》教程的 System Design Master Template 这篇章节。 System design interviews are unstructured by design. In these interviews, you are asked to take on an open-ended design problem that doesn’t have a standard solution. 系统设计面试在设计上是非结构化的。在这些面试中,您被要求解决一个没有标准解决方案的开放式设计问题。 ...

2023-11-16 · 17 min · 8123 words · chensoul

[译]《Grokking the System Design Interview》系统设计访谈:分步指南

这是一篇双语翻译的文章,原文出自 grok_system_design_interview.pdf 的一篇文章《System Design Interviews: A step by step guide》系统设计访谈:分步指南。 A lot of software engineers struggle with system design interviews (SDIs) primarily because of three reasons: 许多软件工程师在系统设计面试(SDI)中遇到困难,主要是因为以下三个原因: ...

2023-11-16 · 7 min · 3138 words · chensoul

[译]《Grokking the System Design Interview》设计类似 TinyURL 的 URL 缩短服务

这是一篇双语翻译的文章,原文出自 grok_system_design_interview.pdf 的一篇文章《Designing a URL Shortening service like TinyURL》设计类似 TinyURL 的 URL 缩短服务。 Let’s design a URL shortening service like TinyURL. This service will provide short aliases redirecting to long URLs. Similar services: bit.ly, goo.gl, qlink.me, etc. 让我们设计一个像 TinyURL 这样的 URL 缩短服务。该服务将提供重定向到长 URL 的短别名。类似服务:bit.ly、goo.gl、qlink.me等。 ...

2023-11-16 · 20 min · 9610 words · chensoul

分布式基础知识

什么是分布式系统? 分布式系统是指由多个独立的计算机节点(或服务器)通过网络相互连接和协作,共同完成某个任务或提供某个服务的系统。在分布式系统中,各个节点可以同时进行计算、存储和通信,并通过消息传递等方式进行协调和同步。 ...

2023-11-14 · 6 min · 2541 words · chensoul

[译]《分布式系统:为了乐趣和利益》1.高层分布式系统

《分布式系统:为了乐趣和利益》是一本广受欢迎的资源,用于理解和学习分布式系统。该书由作者 Mikito Takada 撰写,介绍了构建分布式系统的基本概念、原则和挑战。 这本书涵盖了与分布式系统相关的广泛主题,包括网络、容错性、一致性模型、分布式算法、可扩展性等等。它旨在以清晰易懂的方式解释复杂的概念,适合初学者和有经验的分布式系统从业者阅读。 ...

2023-11-10 · 11 min · 5452 words · chensoul

[译]《分布式系统:为了乐趣和利益》2.抽象层次的上下

《分布式系统:为了乐趣和利益》是一本广受欢迎的资源,用于理解和学习分布式系统。该书由作者 Mikito Takada 撰写,介绍了构建分布式系统的基本概念、原则和挑战。 这本书涵盖了与分布式系统相关的广泛主题,包括网络、容错性、一致性模型、分布式算法、可扩展性等等。它旨在以清晰易懂的方式解释复杂的概念,适合初学者和有经验的分布式系统从业者阅读。 ...

2023-11-10 · 18 min · 8599 words · chensoul