Skip to content

Commit 0889f04

Browse files
authored
Resolve donnemartin#3: Fix broken links in exercises (donnemartin#5)
1 parent 7e9b9b2 commit 0889f04

File tree

8 files changed

+403
-403
lines changed

8 files changed

+403
-403
lines changed

solutions/system_design/mint/README.md

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

solutions/system_design/pastebin/README.md

Lines changed: 52 additions & 52 deletions
Large diffs are not rendered by default.

solutions/system_design/query_cache/README.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Design a key-value cache to save the results of the most recent web server queries
22

3-
*Note: This document links directly to relevant areas found in the [system design topics](https://github.com/donnemartin/system-design-primer-interview#index-of-system-design-topics-1) to avoid duplication. Refer to the linked content for general talking points, tradeoffs, and alternatives.*
3+
*Note: This document links directly to relevant areas found in the [system design topics](https://github.com/donnemartin/system-design-primer#index-of-system-design-topics) to avoid duplication. Refer to the linked content for general talking points, tradeoffs, and alternatives.*
44

55
## Step 1: Outline use cases and constraints
66

@@ -66,11 +66,11 @@ Handy conversion guide:
6666
6767
### Use case: User sends a request resulting in a cache hit
6868

69-
Popular queries can be served from a **Memory Cache** such as Redis or Memcached to reduce read latency and to avoid overloading the **Reverse Index Service** and **Document Service**. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.<sup><a href=https://github.com/donnemartin/system-design-primer-interview#latency-numbers-every-programmer-should-know>1</a></sup>
69+
Popular queries can be served from a **Memory Cache** such as Redis or Memcached to reduce read latency and to avoid overloading the **Reverse Index Service** and **Document Service**. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.<sup><a href=https://github.com/donnemartin/system-design-primer#latency-numbers-every-programmer-should-know>1</a></sup>
7070

7171
Since the cache has limited capacity, we'll use a least recently used (LRU) approach to expire older entries.
7272

73-
* The **Client** sends a request to the **Web Server**, running as a [reverse proxy](https://github.com/donnemartin/system-design-primer-interview#reverse-proxy-web-server)
73+
* The **Client** sends a request to the **Web Server**, running as a [reverse proxy](https://github.com/donnemartin/system-design-primer#reverse-proxy-web-server)
7474
* The **Web Server** forwards the request to the **Query API** server
7575
* The **Query API** server does the following:
7676
* Parses the query
@@ -206,7 +206,7 @@ The cache should be updated when:
206206

207207
The most straightforward way to handle these cases is to simply set a max time that a cached entry can stay in the cache before it is updated, usually referred to as time to live (TTL).
208208

209-
Refer to [When to update the cache](https://github.com/donnemartin/system-design-primer-interview#when-to-update-the-cache) for tradeoffs and alternatives. The approach above describes [cache-aside](https://github.com/donnemartin/system-design-primer-interview#cache-aside).
209+
Refer to [When to update the cache](https://github.com/donnemartin/system-design-primer#when-to-update-the-cache) for tradeoffs and alternatives. The approach above describes [cache-aside](https://github.com/donnemartin/system-design-primer#cache-aside).
210210

211211
## Step 4: Scale the design
212212

@@ -216,89 +216,89 @@ Refer to [When to update the cache](https://github.com/donnemartin/system-design
216216

217217
**Important: Do not simply jump right into the final design from the initial design!**
218218

219-
State you would 1) **Benchmark/Load Test**, 2) **Profile** for bottlenecks 3) address bottlenecks while evaluating alternatives and trade-offs, and 4) repeat. See [Design a system that scales to millions of users on AWS]() as a sample on how to iteratively scale the initial design.
219+
State you would 1) **Benchmark/Load Test**, 2) **Profile** for bottlenecks 3) address bottlenecks while evaluating alternatives and trade-offs, and 4) repeat. See [Design a system that scales to millions of users on AWS](https://github.com/donnemartin/system-design-primer/blob/master/solutions/system_design/scaling_aws/README.md) as a sample on how to iteratively scale the initial design.
220220

221221
It's important to discuss what bottlenecks you might encounter with the initial design and how you might address each of them. For example, what issues are addressed by adding a **Load Balancer** with multiple **Web Servers**? **CDN**? **Master-Slave Replicas**? What are the alternatives and **Trade-Offs** for each?
222222

223223
We'll introduce some components to complete the design and to address scalability issues. Internal load balancers are not shown to reduce clutter.
224224

225-
*To avoid repeating discussions*, refer to the following [system design topics](https://github.com/donnemartin/system-design-primer-interview#) for main talking points, tradeoffs, and alternatives:
225+
*To avoid repeating discussions*, refer to the following [system design topics](https://github.com/donnemartin/system-design-primer#index-of-system-design-topics) for main talking points, tradeoffs, and alternatives:
226226

227-
* [DNS](https://github.com/donnemartin/system-design-primer-interview#domain-name-system)
228-
* [Load balancer](https://github.com/donnemartin/system-design-primer-interview#load-balancer)
229-
* [Horizontal scaling](https://github.com/donnemartin/system-design-primer-interview#horizontal-scaling)
230-
* [Web server (reverse proxy)](https://github.com/donnemartin/system-design-primer-interview#reverse-proxy-web-server)
231-
* [API server (application layer)](https://github.com/donnemartin/system-design-primer-interview#application-layer)
232-
* [Cache](https://github.com/donnemartin/system-design-primer-interview#cache)
233-
* [Consistency patterns](https://github.com/donnemartin/system-design-primer-interview#consistency-patterns)
234-
* [Availability patterns](https://github.com/donnemartin/system-design-primer-interview#availability-patterns)
227+
* [DNS](https://github.com/donnemartin/system-design-primer#domain-name-system)
228+
* [Load balancer](https://github.com/donnemartin/system-design-primer#load-balancer)
229+
* [Horizontal scaling](https://github.com/donnemartin/system-design-primer#horizontal-scaling)
230+
* [Web server (reverse proxy)](https://github.com/donnemartin/system-design-primer#reverse-proxy-web-server)
231+
* [API server (application layer)](https://github.com/donnemartin/system-design-primer#application-layer)
232+
* [Cache](https://github.com/donnemartin/system-design-primer#cache)
233+
* [Consistency patterns](https://github.com/donnemartin/system-design-primer#consistency-patterns)
234+
* [Availability patterns](https://github.com/donnemartin/system-design-primer#availability-patterns)
235235

236236
### Expanding the Memory Cache to many machines
237237

238238
To handle the heavy request load and the large amount of memory needed, we'll scale horizontally. We have three main options on how to store the data on our **Memory Cache** cluster:
239239

240240
* **Each machine in the cache cluster has its own cache** - Simple, although it will likely result in a low cache hit rate.
241241
* **Each machine in the cache cluster has a copy of the cache** - Simple, although it is an inefficient use of memory.
242-
* **The cache is [sharded](https://github.com/donnemartin/system-design-primer-interview#sharding) across all machines in the cache cluster** - More complex, although it is likely the best option. We could use hashing to determine which machine could have the cached results of a query using `machine = hash(query)`. We'll likely want to use [consistent hashing](https://github.com/donnemartin/system-design-primer-interview#consistent-hashing).
242+
* **The cache is [sharded](https://github.com/donnemartin/system-design-primer#sharding) across all machines in the cache cluster** - More complex, although it is likely the best option. We could use hashing to determine which machine could have the cached results of a query using `machine = hash(query)`. We'll likely want to use [consistent hashing](https://github.com/donnemartin/system-design-primer#under-development).
243243

244244
## Additional talking points
245245

246246
> Additional topics to dive into, depending on the problem scope and time remaining.
247247
248248
### SQL scaling patterns
249249

250-
* [Read replicas](https://github.com/donnemartin/system-design-primer-interview#master-slave)
251-
* [Federation](https://github.com/donnemartin/system-design-primer-interview#federation)
252-
* [Sharding](https://github.com/donnemartin/system-design-primer-interview#sharding)
253-
* [Denormalization](https://github.com/donnemartin/system-design-primer-interview#denormalization)
254-
* [SQL Tuning](https://github.com/donnemartin/system-design-primer-interview#sql-tuning)
250+
* [Read replicas](https://github.com/donnemartin/system-design-primer#master-slave)
251+
* [Federation](https://github.com/donnemartin/system-design-primer#federation)
252+
* [Sharding](https://github.com/donnemartin/system-design-primer#sharding)
253+
* [Denormalization](https://github.com/donnemartin/system-design-primer#denormalization)
254+
* [SQL Tuning](https://github.com/donnemartin/system-design-primer#sql-tuning)
255255

256256
#### NoSQL
257257

258-
* [Key-value store](https://github.com/donnemartin/system-design-primer-interview#)
259-
* [Document store](https://github.com/donnemartin/system-design-primer-interview#)
260-
* [Wide column store](https://github.com/donnemartin/system-design-primer-interview#)
261-
* [Graph database](https://github.com/donnemartin/system-design-primer-interview#)
262-
* [SQL vs NoSQL](https://github.com/donnemartin/system-design-primer-interview#)
258+
* [Key-value store](https://github.com/donnemartin/system-design-primer#key-value-store)
259+
* [Document store](https://github.com/donnemartin/system-design-primer#document-store)
260+
* [Wide column store](https://github.com/donnemartin/system-design-primer#wide-column-store)
261+
* [Graph database](https://github.com/donnemartin/system-design-primer#graph-database)
262+
* [SQL vs NoSQL](https://github.com/donnemartin/system-design-primer#sql-or-nosql)
263263

264264
### Caching
265265

266266
* Where to cache
267-
* [Client caching](https://github.com/donnemartin/system-design-primer-interview#client-caching)
268-
* [CDN caching](https://github.com/donnemartin/system-design-primer-interview#cdn-caching)
269-
* [Web server caching](https://github.com/donnemartin/system-design-primer-interview#web-server-caching)
270-
* [Database caching](https://github.com/donnemartin/system-design-primer-interview#database-caching)
271-
* [Application caching](https://github.com/donnemartin/system-design-primer-interview#application-caching)
267+
* [Client caching](https://github.com/donnemartin/system-design-primer#client-caching)
268+
* [CDN caching](https://github.com/donnemartin/system-design-primer#cdn-caching)
269+
* [Web server caching](https://github.com/donnemartin/system-design-primer#web-server-caching)
270+
* [Database caching](https://github.com/donnemartin/system-design-primer#database-caching)
271+
* [Application caching](https://github.com/donnemartin/system-design-primer#application-caching)
272272
* What to cache
273-
* [Caching at the database query level](https://github.com/donnemartin/system-design-primer-interview#caching-at-the-database-query-level)
274-
* [Caching at the object level](https://github.com/donnemartin/system-design-primer-interview#caching-at-the-object-level)
273+
* [Caching at the database query level](https://github.com/donnemartin/system-design-primer#caching-at-the-database-query-level)
274+
* [Caching at the object level](https://github.com/donnemartin/system-design-primer#caching-at-the-object-level)
275275
* When to update the cache
276-
* [Cache-aside](https://github.com/donnemartin/system-design-primer-interview#cache-aside)
277-
* [Write-through](https://github.com/donnemartin/system-design-primer-interview#write-through)
278-
* [Write-behind (write-back)](https://github.com/donnemartin/system-design-primer-interview#write-behind-write-back)
279-
* [Refresh ahead](https://github.com/donnemartin/system-design-primer-interview#refresh-ahead)
276+
* [Cache-aside](https://github.com/donnemartin/system-design-primer#cache-aside)
277+
* [Write-through](https://github.com/donnemartin/system-design-primer#write-through)
278+
* [Write-behind (write-back)](https://github.com/donnemartin/system-design-primer#write-behind-write-back)
279+
* [Refresh ahead](https://github.com/donnemartin/system-design-primer#refresh-ahead)
280280

281281
### Asynchronism and microservices
282282

283-
* [Message queues](https://github.com/donnemartin/system-design-primer-interview#)
284-
* [Task queues](https://github.com/donnemartin/system-design-primer-interview#)
285-
* [Back pressure](https://github.com/donnemartin/system-design-primer-interview#)
286-
* [Microservices](https://github.com/donnemartin/system-design-primer-interview#)
283+
* [Message queues](https://github.com/donnemartin/system-design-primer#message-queues)
284+
* [Task queues](https://github.com/donnemartin/system-design-primer#task-queues)
285+
* [Back pressure](https://github.com/donnemartin/system-design-primer#back-pressure)
286+
* [Microservices](https://github.com/donnemartin/system-design-primer#microservices)
287287

288288
### Communications
289289

290290
* Discuss tradeoffs:
291-
* External communication with clients - [HTTP APIs following REST](https://github.com/donnemartin/system-design-primer-interview#representational-state-transfer-rest)
292-
* Internal communications - [RPC](https://github.com/donnemartin/system-design-primer-interview#remote-procedure-call-rpc)
293-
* [Service discovery](https://github.com/donnemartin/system-design-primer-interview#service-discovery)
291+
* External communication with clients - [HTTP APIs following REST](https://github.com/donnemartin/system-design-primer#representational-state-transfer-rest)
292+
* Internal communications - [RPC](https://github.com/donnemartin/system-design-primer#remote-procedure-call-rpc)
293+
* [Service discovery](https://github.com/donnemartin/system-design-primer#service-discovery)
294294

295295
### Security
296296

297-
Refer to the [security section](https://github.com/donnemartin/system-design-primer-interview#security).
297+
Refer to the [security section](https://github.com/donnemartin/system-design-primer#security).
298298

299299
### Latency numbers
300300

301-
See [Latency numbers every programmer should know](https://github.com/donnemartin/system-design-primer-interview#latency-numbers-every-programmer-should-know).
301+
See [Latency numbers every programmer should know](https://github.com/donnemartin/system-design-primer#latency-numbers-every-programmer-should-know).
302302

303303
### Ongoing
304304

0 commit comments

Comments
 (0)