Learning pathsPricingChecking sign-in…
GUIDED PRACTICE

Core Concepts Overview

Use core concepts as tools for explaining a workload, not as vocabulary to recite.

What, why, when and how

What is it?

The core concepts are the foundations for reasoning about request paths, contracts, authoritative state, access paths and distributed trade-offs.

Why is it needed?

They let you explain why a user operation works and which boundary fails before choosing a product.

When should I use it?

Use this map when a mock reveals an unclear request, query, freshness or ownership decision.

When should I choose something else?

Do not treat the nine topics as a component checklist. A small baseline may not need a distributed cache or sharding.

How do I use it?

Follow one accepted write and one bounded read, map each decision to a foundation, then test the dominant failure and workload limit.

Can you show a concrete example?

A feed projection can still contain p7 after visibility revision 2 makes it private. Under a strict access policy, the response uses an authority that can enforce the current policy before returning content.

Commit post p7 with event e7: accepted, not in every feed; Feed candidates may lag; read a bounded ordered page; Current visibility controls what content may be returned
Core Concepts Overview: one concrete example
Read the diagram

Commit post p7 with event e7: accepted, not in every feed; Feed candidates may lag; read a bounded ordered page; Current visibility controls what content may be returned

Open original
Core Concepts Overview: worked example
Commit post p7 with event e7: accepted, not in every feed; Feed candidates may lag; read a bounded ordered page; Current visibility controls what content may be returned

Core Concepts Overview: one concrete example

Follow the detailed diagrams below to trace the additional state changes and failure cases behind these answers.

Outcome: explain how the nine foundations cooperate in one feed request, and choose the next chapter from a concrete weakness in your design.

All identifiers and rates on this page are exercise assumptions. We will design a small tenant-scoped feed: an author publishes a post, followers read their recent candidates, and a private or deleted post must not be disclosed by a stale projection. Begin with one relational owner and bounded queries. The goal is to understand why a mechanism enters the design.

Establish the contract before the components

Agree that publishing succeeds when the authoritative post and its publication record commit. Feed inclusion may lag under a declared freshness target. A candidate ID in a feed is not permission to return its content. Decide whether a visibility change must affect reads begun after that change completes; if so, specify an authorization source and read consistency that can enforce that policy. A replica or permission cache that may be stale cannot silently satisfy it.

User actionAPI promiseState that enforces it
Publish a postReturn a stable post ID after acceptance commitsPost record, operation key, outbox event
Browse recent feedReturn a bounded ordered page of eligible postsCandidate access path plus policy check
Make a post privateCommit a visibility revision under the agreed ordering policyAuthoritative post/policy version

Ask how repeated publication, equal timestamps and revoked access behave. These questions select APIs, keys and consistency before the diagram grows.

Follow the write and the read as separate paths

The API authenticates the caller and checks tenant and author scope. One transaction stores post p7 at version 1, the client operation result and event e7. Returning p7 now proves acceptance; it does not prove every follower inbox already includes it. An outbox publisher can retry e7 after a lost acknowledgement. The projector therefore upserts the applicable post revision instead of blindly adding a duplicate candidate.

For a feed read, use an access path keyed by tenant and follower, ordered by a stable sequence or by time and a tie-breaking ID. Retrieve a bounded number of candidate IDs, hydrate current data and apply authorization before returning content or snippets. If filtering removes many candidates, set a scan/work limit; do not turn a request for twenty posts into an unbounded search for twenty eligible ones. The cursor represents progress through the candidate order, not a permanent permission grant.

Accepted post p7 is projected as a candidate; visibility revision 2 later denies disclosure even if an older candidate remains.
Candidate freshness and permission authority are different boundaries.
Read the diagram

Commit p7/v1 and outbox e7; return p7; Project p7/v1 as a follower candidate; Commit visibility v2 = private; A stale candidate does not grant disclosure; Version-aware repair updates the projection

Open original
One feed, two visibility revisions: worked example
Accepted post p7 is projected as a candidate; visibility revision 2 later denies disclosure even if an older candidate remains.

Candidate freshness and permission authority are different boundaries.

Map each foundation to a question you can answer

FoundationDecision in this exampleEvidence to produceFollow-up that tests it
Networking EssentialsRequest route, connection reuse and deadlineA latency budget for the API and its dependenciesWhich retry still fits the remaining deadline?
API DesignPublish identity, acknowledgement and feed cursorOne write and one bounded read contractWhat does the same operation key return after a timeout?
Data ModelingPost truth versus inbox projectionKeys, ownership and relationshipsWhich record is authoritative after a visibility change?
Database IndexingFind one follower's recent candidatesFilter/order matched to a composite access pathHow do equal timestamps affect pagination?
CachingReuse eligible work with declared freshnessCache key, expiry, invalidation and miss policyCan a late fill restore an older candidate list?
ShardingDistribute an owner whose measured capacity is exceededRouting key, hot-key analysis and migrationDoes one celebrity concentrate fanout or reads?
Consistent HashingOne possible placement ruleKey movement and membership-version traceWhat additional protocol transfers data safely?
CAP TheoremOperation behavior while owners cannot communicateA completed-write/later-read partition historyWhich operation becomes unavailable under the required consistency?
Numbers to KnowTest fanout and candidate-read costsUnits and the threshold that changes a choiceWhat happens when incoming work exceeds completion rate?

Add scale only after the arithmetic exposes it

Assume 100 new posts/s and 200 eligible followers per ordinary post. Eager fanout produces roughly 20,000 candidate writes/s before retries and metadata overhead. A single author with one million followers creates a burst far beyond that average. These assumptions justify comparing eager, lazy and hybrid candidate construction; they do not establish that any storage system can sustain the workload.

A bounded worker queue can smooth a temporary burst, but sustained input above processing capacity increases lag. Partitioning by follower distributes inbox storage while a huge author's fanout still needs bounded expansion. A read replica or cache can help tolerant reads, but it does not repair an undefined authorization contract. Explain which load each addition reduces and which new freshness or recovery policy it introduces.

Recover a projection without weakening access control

Suppose p7's visibility becomes private at revision 2 while the projection still carries revision 1. Under our strict policy, the serving path checks a source that can observe the required policy state before disclosing p7. If that check is unavailable, choose the failure response from the policy; do not serve a stale private post merely to fill the page. Returning fewer items or an error may be acceptable, but must be declared.

Repair the projection with version-aware updates and deletion markers. For a rebuild, explain how a consistent snapshot and change-stream position fit together, replay changes after that boundary, compare results and switch to the new generation. A timestamp alone is not automatically a safe change-stream checkpoint. Preserve the old read generation only while it remains compatible with the access policy.

Diagnose and transfer

Question: A feed read is slow because it scans thousands of candidates, most of which are now ineligible. Would adding a cache of the response solve the privacy problem?

Show answer and explanation

Answer: A cache can reduce repeated work only within its authorization and freshness contract. It cannot make stale permission safe. First bound candidate scanning and measure why candidates are rejected; repair the projection and define a policy-aware cache key or revalidation path. Keep strict policy decisions at an authority that can enforce them.

Question: Transfer the same idea to restaurant search. Which responsibility remains, and which does not?

Show answer and explanation

Answer: Candidate retrieval followed by exact eligibility checks remains. A follower-inbox fanout model does not automatically belong in restaurant search. Replace it with the actual spatial/text access paths and keep the shared distinction between a derived candidate and authoritative eligibility.

Continue with the weakest demonstrated boundary

Return to Delivery Framework if the request is incomplete. Choose indexing if the query has no bounded access path, caching if freshness is unclear, and sharding if routing and skew are the demonstrated limit. Study the deeper chapters before making guarantees about their mechanisms.

Primary references: PostgreSQL transactions, multicolumn indexes, and AWS transactional outbox. The feed design and numbers above are original teaching assumptions.

Shared correctness foundations

Study replication before failover, isolation before invariant enforcement, and idempotency before retries. Continue with consensus/fencing for ownership, outbox/sagas for cross-service recovery, and overload control for finite resource budgets. Use SLOs/observability to measure the user promise and security/tenant isolation to enforce the trust boundary. Use time/ordering/identifiers for clock and event semantics, and storage-engine mechanics for physical work and recovery costs. Then return to the linked product designs.

Regional control-plane checkpoint

The shared recovery prerequisite is already taught by the Multi-region Disaster Recovery runbook. Use this checkpoint to connect that runbook to everyday control-plane design rather than creating a second, competing recovery procedure.

A control plane configures ownership, policy, placement and desired state. A data plane performs the accepted user operation using established state. The distinction is service-specific: naming something a data plane does not make it independent or safe. Inventory the actual dependencies on the serving and recovery paths.

PathOriginal design questionEvidence to produce
Existing request servingCan a compatible last-known configuration continue within its security/freshness contract while configuration publication fails?Config generation, validity boundary, permission policy and a tested degraded response
New tenant/config creationDoes it require a currently unavailable control service?Honest unavailable/pending state instead of pretending the tenant was fully provisioned
Regional promotionWhere is exclusive authority established if the primary control path is lost?Reachable ownership/fencing mechanism and destination enforcement
Recovery capacityMust the incident create resources or request quotas before essential service can resume?Pre-provisioned or verified independent capacity, credentials, artifacts and keys
FailbackCan the original region safely interpret all changes accepted by the survivor?Compatible history/checkpoint plus a new ownership generation and validation

Static stability reduces the serving/recovery actions that require changing infrastructure in the middle of an incident. It does not mean accepting new writes indefinitely from stale policy or inventing authority when a quorum is unavailable. A cached route may keep public reads working; a missing ownership decision may correctly stop a scarce-resource mutation.

Original example: region B has application capacity and a replicated order database, but its runtime boot requires a configuration API hosted only in A. Database promotion in B succeeds while the service remains unavailable. Remove that hidden dependency from the critical path by distributing compatible configuration/artifacts and verifying recovery-region authentication/key access before the incident. Do not bypass current access policy merely to make boot succeed.

Regional control-plane checkpoint: A's configuration API becomes unavailable; B loads its permitted compatible config; promotion still requires exclusive write authority; business probes validate dependencies; traffic ramps only within measured capacity
Surviving configuration loss and safely establishing write authority are separate tests.
Read the diagram

Region A configuration API becomes unavailable → Region B loads a permitted compatible configuration → Promotion still requires exclusive write authority → Business probes validate keys and dependencies → Traffic ramps within measured recovery capacity

Open original
Regional control-plane checkpoint
Regional control-plane checkpoint: A's configuration API becomes unavailable; B loads its permitted compatible config; promotion still requires exclusive write authority; business probes validate dependencies; traffic ramps only within measured capacity

Surviving configuration loss and safely establishing write authority are separate tests.

Follow the existing runbook's impact-to-service clock. Test missing keys, an expired configuration, blocked configuration updates, loss of the ownership authority and a paused old worker separately. Record which operations continue and which are refused. Compare observed RPO evidence and restoration time with the stated objective; a green process-health check is insufficient.

Review AWS static stability and reducing recovery control-plane dependencies for the design principle. The region/configuration example and checkpoint are original teaching material. This path is the C12 shared discovery entry point; it does not claim a live recovery drill or replace the existing detailed workshop.

Newly expanded foundations

These lessons deepen network request paths, database storage engines, partition ownership, consistency guarantees and messaging semantics. Bloom Filters are taught in Data Structures for Big Data and are now independently discoverable from Core Concepts.

10:00Self-guided practice timer
The timer resets when you leave this page. Save your design separately.
Your challenge

A post is still present in a follower feed projection after its author changes visibility to private. What must happen on the read path, and how does the projection recover?

Your design draft

Clarify assumptions, explain your approach, and test the difficult cases. Save your draft, then compare it with the study notes.

Read study notes

Self-review checklist

Self-guided practice. Automated AI feedback and code execution are not connected.