This repository was archived by the owner on Apr 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdesign.fs
More file actions
40 lines (31 loc) · 1.61 KB
/
Copy pathdesign.fs
File metadata and controls
40 lines (31 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
? caching strategy for read-heavy API endpoints
|| client-side caching (browser cache headers)
-> reduces server load significantly
-> stale data risk for dynamic content ><[performance vs freshness] user experience
-> no infrastructure cost
|| Redis cache layer
-> centralized cache invalidation
-> consistent across clients
-> additional infrastructure + monitoring ><[cost vs control] operational complexity
-> battle-tested pattern
|| CDN edge caching (CloudFront)
-> geographic distribution (lower latency)
-> expensive for cache misses ><[latency vs cost] budget constraints
-> requires cache key strategy
* [decided(rationale: "hybrid approach: CDN for static assets, Redis for dynamic data", on: "2025-10-14")] hybrid CDN + Redis architecture
action: configure CloudFront for /static/* routes
action: implement Redis cache for user profile data (5min TTL)
action: add cache hit/miss monitoring to Datadog
✓ [completed(on: "2025-10-15")] CloudFront configuration deployed
✓ [completed(on: "2025-10-16")] Redis cache layer implemented
[blocked(reason: "Datadog trial expired, need license approval", since: "2025-10-16")]
action: add cache hit/miss monitoring to Datadog
thought: cache stampede risk for high-traffic endpoints
-> implement probabilistic early expiration
-> add jitter to TTL (±10% randomization)
action: update cache middleware with jitter logic
=> performance testing on staging
=> load testing with k6 (1000 RPS)
-> 95th percentile latency: 45ms (target: <50ms) ✓
-> cache hit rate: 87% (target: >80%) ✓
=> deploy to production with gradual rollout