DDIA Flashcards

(13 cards)

1
Q

Fault vs Failure

“A fault is … one component deviating from its spec, whereas a failure is when the system as a whole stops providing the required service.”

A

Fault یعنی یک جزء از سیستم از مشخصاتش منحرف شود؛ Failure زمانی است که کل سیستم دیگر سرویس موردنیاز را ارائه ندهد.

مفهوم:
هدف طراحی این است که Fault به Failure تبدیل نشود.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

هدف عملی Reliability چیست؟

A

“The goal is to minimize the likelihood of failures, and to minimize the impact of failures when they do occur.”

دو محور اصلی:
کاهش احتمال + کاهش شدت اثر.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fault و Failure چه تفاوتی دارند؟

A

“A fault is usually defined as one component of the system deviating from its spec, whereas a failure is when the system as a whole stops providing the required service to the user.”

Fault در سطح جزء است؛
Failure در سطح تجربه کاربر تعریف می‌شود.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

چه زمانی ممکن است Reliability را قربانی کنیم؟

A

“We may choose to sacrifice reliability in order to reduce development cost… but we should be very conscious of when we are cutting corners.”

کاهش reliability باید تصمیم آگاهانه باشد، نه تصادفی.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Scalability تعریف ساده دارد؟

A

“Scalability is the term we use to describe a system’s ability to cope with increased load.”

Scalable بودن یک برچسب مطلق نیست.
وابسته به نوع رشد load است.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Throughput vs Response Time؟

A

“In online systems, what’s usually more important is the service’s response time.”

Batch → throughput
Online → latency مهم‌تر است.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Head-of-line blocking چیست؟

A

“A small number of slow requests [can] hold up the processing of subsequent requests.”

چند درخواست کند می‌توانند کل صف را slow کنند.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

اصل مهندسی پشت Hybrid چیست؟

A

“Your application may have very different characteristics, but you can apply similar principles to reasoning about its load.”

Load distribution را تحلیل کن، نه فقط average را.
Design باید بر اساس shape داده باشد، نه میانگین.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Fan-out on Write دقیقاً چیست؟

A

“Maintain a cache for each user’s home timeline… When a user posts a tweet, look up all the people who follow that user, and insert the new tweet into each of their home timeline caches.”

ترجمه:
«برای هر کاربر یک کش از تایم‌لاین نگه دارید… وقتی کاربری توییت می‌کند، تمام دنبال‌کنندگان او را پیدا کرده و توییت جدید را در تایم‌لاین هر کدام درج کنید.»

📌 مفهوم:
Materialization در زمان write انجام می‌شود.
خواندن ارزان، نوشتن گران.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

مزیت کلیدی Fan-out on Write چیست؟

A

“The request to read the home timeline is then cheap, because its result has been computed ahead of time.”

ترجمه:
«درخواست خواندن تایم‌لاین ارزان است، چون نتیجه از قبل محاسبه شده است.»

📌 Tail latency خواندن پایین و پایدار است.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compute on Read چیست؟

A

“When a user requests their home timeline, look up all the people they follow, find all the tweets for each of those users, and merge them (sorted by time).”

ترجمه:
«وقتی کاربر تایم‌لاین را می‌خواهد، تمام افرادی که دنبال می‌کند پیدا می‌شوند، توییت‌هایشان استخراج می‌شود و با هم ادغام و مرتب می‌گردند.»

📌 Query-time join
Write ارزان، read گران.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Fan-out vs Compute از نظر معماری چه دو فلسفه‌ای هستند؟

A

Precompute vs Lazy Compute

Push Model vs Pull Model

Materialized View vs On-demand Query

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly