Skip to content

Commit 2a82a80

Browse files
committed
Update proximity service documentation to correct formatting and enhance clarity
- Fixed HTML entity encoding for SLO examples, replacing `&lt;` with `<` for better readability. - Ensured consistency in the presentation of SLO metrics across various sections. - Added coverage for CAP split and SLI/SLO/SLA concepts in the documentation checklist.
1 parent eba914b commit 2a82a80

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

software_system_design/proximity_service.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,18 @@ flowchart TB
151151
**Terminology (for interviews):**
152152

153153
- **SLI** (Service Level Indicator): a measurable metric (e.g., “share of successful nearby requests under 200 ms”).
154-
- **SLO** (Service Level Objective): a **target** for an SLI over a window (e.g., “99% of requests &lt; 200 ms per month”).
154+
- **SLO** (Service Level Objective): a **target** for an SLI over a window (e.g., “99% of requests < 200 ms per month”).
155155
- **SLA** (Service Agreement): a **contract** with users/partners; often includes **credits** if SLOs are missed—many internal tiers use **SLOs only** until revenue depends on them.
156156

157157
**Example SLOs** (tune to product; numbers are illustrative for a consumer maps app):
158158

159159
| Area | SLI | SLO (monthly) | Why candidates care |
160160
|------|-----|----------------|----------------------|
161-
| **Search latency** | Nearby `GET` **server-side** latency | **P99 &lt; 200 ms**, **P50 &lt; 50 ms** | Matches interactive map expectations; separates **client** paint from **backend** work. |
161+
| **Search latency** | Nearby `GET` **server-side** latency | **P99 < 200 ms**, **P50 < 50 ms** | Matches interactive map expectations; separates **client** paint from **backend** work. |
162162
| **Search availability** | Ratio of **2xx** vs all attempts (excluding client cancel) | **≥ 99.9%** monthly (tier **99.95%** if premium) | Maps feel “broken” when search fails; **degraded** (stale cache) still counts as success if defined in SLI. |
163163
| **Geospatial accuracy** | Share of returned POIs with **Haversine distance ≤ radius × (1 + ε)** after refine | **≥ 99.99%** of results within **ε = 1%** radius slack | Catches index bugs, wrong **WGS84** handling, or missing **neighbor** cells. |
164-
| **Data freshness** (new/updated businesses **visible** in nearby) | Time from **commit** in OLTP to **searchable** in index | **P95 &lt; 60 s**, **P99 &lt; 5 min** | Balances **ingest** cost vs “I just added my store” expectations. |
165-
| **Index update latency** | Lag between **change event** and **materialized** row in geo shard / Redis | **P99 &lt; 2 min** | Distinct from user-visible freshness if you batch; matters for **ops** dashboards and **replay** alerts. |
164+
| **Data freshness** (new/updated businesses **visible** in nearby) | Time from **commit** in OLTP to **searchable** in index | **P95 < 60 s**, **P99 < 5 min** | Balances **ingest** cost vs “I just added my store” expectations. |
165+
| **Index update latency** | Lag between **change event** and **materialized** row in geo shard / Redis | **P99 < 2 min** | Distinct from user-visible freshness if you batch; matters for **ops** dashboards and **replay** alerts. |
166166

167167
**Error budget policy:**
168168

@@ -822,6 +822,9 @@ func (n *Node) Search(cx, cy, rad float64, out *[]Point) {
822822
| Topic | Covered? |
823823
|-------|----------|
824824
| Functional + non-functional requirements | Yes |
825+
| CAP split: geo reads (AP), metadata (CP), aggregates (eventual) | Yes |
826+
| SLI/SLO/SLA + error budgets (latency, availability, freshness, index lag) | Yes |
827+
| DB schema: places, reviews, geo index role | Yes |
825828
| REST API + pagination | Yes |
826829
| Traffic + storage estimates | Yes |
827830
| High-level components (API, index, cache, async ingest) | Yes |

0 commit comments

Comments
 (0)