system-design-primer-skill 1.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -60
- package/SKILL.md +437 -93
- package/VERSION +1 -1
- package/evals/README.md +1022 -0
- package/evals/system-design-cases.json +414 -0
- package/package.json +46 -4
- package/references/03-data-and-storage.md +8 -2
- package/references/04-caching.md +3 -3
- package/references/05-async-and-messaging.md +4 -0
- package/references/06-distributed-systems.md +2 -2
- package/references/07-reliability-and-resilience.md +7 -3
- package/references/08-api-security-observability.md +4 -0
- package/references/10-workflows-and-checklists.md +1 -1
- package/references/13-architecture-intelligence.md +91 -0
- package/references/14-api-and-data-contracts.md +80 -0
- package/references/15-failure-analysis.md +88 -0
- package/references/16-multi-agent-architecture.md +76 -0
- package/references/17-agent-harness-and-runtime.md +87 -0
- package/references/18-mcp-architecture.md +67 -0
- package/references/19-agent-security-and-permissions.md +90 -0
- package/references/20-agent-state-and-memory.md +76 -0
- package/references/21-agent-evaluation-and-observability.md +90 -0
- package/references/22-kubernetes-and-container-platforms.md +29 -0
- package/references/23-service-mesh-and-traffic-management.md +21 -0
- package/references/24-multi-region-and-disaster-recovery.md +28 -0
- package/references/25-platform-engineering-and-developer-experience.md +26 -0
- package/references/26-finops-and-cloud-cost.md +29 -0
- package/references/27-production-observability-and-slo.md +33 -0
- package/references/28-event-streaming-and-kafka-pulsar.md +33 -0
- package/references/29-event-sourcing-and-cqrs.md +23 -0
- package/references/30-change-data-capture-and-debezium.md +27 -0
- package/references/31-data-lakehouse-and-stream-batch.md +24 -0
- package/references/32-workflow-orchestration-and-temporal.md +28 -0
- package/references/33-schema-registry-and-event-governance.md +22 -0
- package/references/34-postgresql-internals-and-performance.md +45 -0
- package/references/35-mysql-innodb-and-performance.md +29 -0
- package/references/36-sharding-and-distributed-sql.md +22 -0
- package/references/37-consensus-and-distributed-transactions.md +29 -0
- package/references/38-search-architecture-elasticsearch-opensearch.md +24 -0
- package/references/39-vector-databases-and-hybrid-retrieval.md +31 -0
- package/references/40-zero-downtime-database-migrations.md +27 -0
- package/references/41-api-gateway-and-edge-architecture.md +23 -0
- package/references/42-rest-api-design-and-lifecycle.md +23 -0
- package/references/43-graphql-architecture-and-governance.md +16 -0
- package/references/44-grpc-and-service-contracts.md +16 -0
- package/references/45-websocket-sse-and-realtime-systems.md +16 -0
- package/references/46-realtime-collaboration-ot-crdt.md +16 -0
- package/references/47-api-security-rate-limiting-and-abuse.md +16 -0
- package/references/48-oauth-oidc-and-passkeys.md +20 -0
- package/references/49-iam-rbac-abac-rebac.md +20 -0
- package/references/50-zero-trust-and-workload-identity.md +16 -0
- package/references/51-secrets-kms-pki-and-key-management.md +20 -0
- package/references/52-supply-chain-security-sbom-slsa.md +78 -0
- package/references/53-threat-modeling-stride-and-attack-trees.md +16 -0
- package/references/54-privacy-engineering-and-data-governance.md +20 -0
- package/references/55-opentelemetry-and-instrumentation.md +54 -0
- package/references/56-distributed-tracing-and-context-propagation.md +47 -0
- package/references/57-continuous-profiling-and-performance-diagnostics.md +45 -0
- package/references/58-load-stress-soak-testing-and-workload-modeling.md +44 -0
- package/references/59-capacity-planning-and-performance-modeling.md +38 -0
- package/references/60-chaos-engineering-and-resilience-experiments.md +45 -0
- package/references/61-incident-management-and-postmortems.md +38 -0
- package/references/62-dns-and-service-discovery.md +35 -0
- package/references/63-load-balancing-and-global-traffic-management.md +31 -0
- package/references/64-cdn-and-edge-caching.md +34 -0
- package/references/65-cloud-networking-and-connectivity.md +34 -0
- package/references/66-edge-computing-architecture.md +33 -0
- package/references/67-storage-infrastructure-and-storage-systems.md +34 -0
- package/references/68-tcp-quic-and-network-performance.md +27 -0
- package/references/69-task-routing-and-evidence.md +115 -0
- package/scripts/audit_chain.py +36 -0
- package/scripts/compare_reports.py +43 -0
- package/scripts/evaluate.py +475 -0
- package/scripts/evaluation_catalog.py +129 -0
- package/scripts/evaluation_fingerprints.py +20 -0
- package/scripts/evidence_archive.py +79 -0
- package/scripts/evidence_signing.py +98 -0
- package/scripts/evidence_timestamp.py +441 -0
- package/scripts/install.ps1 +12 -3
- package/scripts/install.sh +15 -8
- package/scripts/report_integrity.py +184 -0
- package/scripts/review_consensus.py +77 -0
- package/scripts/review_evidence.py +105 -0
- package/scripts/review_provenance.py +44 -0
- package/scripts/reviewer_calibration.py +215 -0
- package/scripts/rubric_compatibility.py +134 -0
- package/scripts/run_evals.py +130 -0
- package/scripts/run_manifest.py +179 -0
- package/scripts/statistical_analysis.py +308 -0
- package/scripts/tsa_attestation.py +709 -0
- package/scripts/tsa_validation_report.py +627 -0
- package/scripts/validate.py +356 -11
- package/scripts/verify_build_provenance.py +625 -0
- package/scripts/verify_tsa_ocsp.py +962 -0
- package/scripts/verify_tsa_revocation.py +782 -0
- package/scripts/windows_broker_protocol.py +274 -0
- package/scripts/windows_broker_transport.py +141 -0
- package/scripts/windows_broker_win32.py +713 -0
- package/templates/agent-evaluation-plan-template.md +57 -0
- package/templates/agent-security-review-template.md +46 -0
- package/templates/agent-system-design-template.md +74 -0
- package/templates/api-architecture-design-template.md +33 -0
- package/templates/api-security-and-rate-limit-review-template.md +29 -0
- package/templates/architecture-decision-matrix-template.md +48 -0
- package/templates/architecture-review-scorecard-template.md +36 -0
- package/templates/cdc-data-pipeline-template.md +41 -0
- package/templates/cdn-and-edge-strategy-template.md +36 -0
- package/templates/chaos-experiment-template.md +39 -0
- package/templates/cloud-cost-model-template.md +37 -0
- package/templates/database-architecture-review-template.md +33 -0
- package/templates/edge-computing-readiness-template.md +36 -0
- package/templates/event-sourcing-cqrs-template.md +41 -0
- package/templates/event-streaming-design-template.md +47 -0
- package/templates/failure-analysis-template.md +36 -0
- package/templates/identity-and-access-architecture-template.md +29 -0
- package/templates/incident-postmortem-template.md +39 -0
- package/templates/multi-region-disaster-recovery-template.md +43 -0
- package/templates/network-architecture-design-template.md +38 -0
- package/templates/observability-architecture-template.md +52 -0
- package/templates/performance-test-plan-template.md +52 -0
- package/templates/privacy-data-governance-template.md +24 -0
- package/templates/production-readiness-checklist-template.md +52 -0
- package/templates/realtime-system-design-template.md +28 -0
- package/templates/security-threat-model-template.md +26 -0
- package/templates/sharding-distributed-sql-design-template.md +34 -0
- package/templates/storage-architecture-design-template.md +35 -0
- package/templates/supply-chain-security-review-template.md +20 -0
- package/templates/zero-downtime-database-migration-template.md +32 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Identity and Access Architecture
|
|
2
|
+
|
|
3
|
+
## Context and trust boundaries
|
|
4
|
+
- User, workforce, service, and machine principals:
|
|
5
|
+
- Tenants, resources, actions, and data classes:
|
|
6
|
+
- Identity providers and trust domains:
|
|
7
|
+
- Authentication and session requirements:
|
|
8
|
+
|
|
9
|
+
## Authentication
|
|
10
|
+
- OAuth/OIDC flows and client types:
|
|
11
|
+
- Token issuer, audience, lifetime, rotation, revocation:
|
|
12
|
+
- Passkey/WebAuthn and account recovery:
|
|
13
|
+
- MFA and step-up policy:
|
|
14
|
+
|
|
15
|
+
## Authorization
|
|
16
|
+
- RBAC / ABAC / ReBAC model and rationale:
|
|
17
|
+
- Default-deny, precedence, delegation:
|
|
18
|
+
- Object/function authorization enforcement:
|
|
19
|
+
- Policy distribution, caching, invalidation, failure mode:
|
|
20
|
+
|
|
21
|
+
## Workload identity
|
|
22
|
+
- Identity issuance and federation:
|
|
23
|
+
- mTLS, trust bundles, rotation, revocation:
|
|
24
|
+
- Service permissions and egress controls:
|
|
25
|
+
|
|
26
|
+
## Operations and verification
|
|
27
|
+
- Joiner/mover/leaver and privileged access:
|
|
28
|
+
- Audit, access reviews, break-glass:
|
|
29
|
+
- Abuse cases, negative tests, owners, SLOs:
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Incident Postmortem
|
|
2
|
+
|
|
3
|
+
## 1. Summary
|
|
4
|
+
- Incident ID/severity:
|
|
5
|
+
- Start, detection, mitigation, and recovery times:
|
|
6
|
+
- Services/journeys/regions affected:
|
|
7
|
+
- Customer and business impact:
|
|
8
|
+
|
|
9
|
+
## 2. Timeline
|
|
10
|
+
| Time (timezone) | Event/decision | Evidence/source |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| | | |
|
|
13
|
+
|
|
14
|
+
## 3. Detection and response
|
|
15
|
+
- Detection source and alert quality:
|
|
16
|
+
- Roles, escalation, and communications:
|
|
17
|
+
- Mitigation actions and rollback:
|
|
18
|
+
- Recovery verification and data reconciliation:
|
|
19
|
+
|
|
20
|
+
## 4. Technical analysis
|
|
21
|
+
- Trigger:
|
|
22
|
+
- Contributing conditions:
|
|
23
|
+
- Dependency/failure propagation:
|
|
24
|
+
- Why safeguards did or did not work:
|
|
25
|
+
- Data integrity and security implications:
|
|
26
|
+
|
|
27
|
+
## 5. What went well / what was difficult
|
|
28
|
+
- Went well:
|
|
29
|
+
- Difficulties and unknowns:
|
|
30
|
+
|
|
31
|
+
## 6. Corrective actions
|
|
32
|
+
| Action | Prevention/detection/containment/recovery | Priority | Owner | Due date | Verification |
|
|
33
|
+
|---|---|---|---|---|---|
|
|
34
|
+
| | | | | | |
|
|
35
|
+
|
|
36
|
+
## 7. Learning and follow-up
|
|
37
|
+
- Cross-team/systemic lessons:
|
|
38
|
+
- Runbooks/alerts/tests/architecture to update:
|
|
39
|
+
- Review date and effectiveness criteria:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Multi-Region and Disaster Recovery Plan
|
|
2
|
+
|
|
3
|
+
## Business objectives
|
|
4
|
+
- Critical journeys:
|
|
5
|
+
- Business impact and maximum tolerable outage:
|
|
6
|
+
- RTO by journey:
|
|
7
|
+
- RPO by data domain:
|
|
8
|
+
- Residency / sovereignty constraints:
|
|
9
|
+
|
|
10
|
+
## Failure domains and topology
|
|
11
|
+
- Primary and recovery regions:
|
|
12
|
+
- Topology: backup/restore / pilot light / warm standby / active-passive / active-active
|
|
13
|
+
- Shared dependencies and correlated failure risks:
|
|
14
|
+
- Traffic steering and DNS dependencies:
|
|
15
|
+
|
|
16
|
+
## Data recovery
|
|
17
|
+
| Data domain | Source of truth | Replication mode | Lag objective | Conflict policy | Restore validation |
|
|
18
|
+
|---|---|---|---|---|---|
|
|
19
|
+
| | | | | | |
|
|
20
|
+
|
|
21
|
+
- Backup isolation, retention, and immutability:
|
|
22
|
+
- Encryption keys and KMS recovery:
|
|
23
|
+
- Fencing / split-brain prevention:
|
|
24
|
+
|
|
25
|
+
## Failover runbook
|
|
26
|
+
1. Detection and impact confirmation:
|
|
27
|
+
2. Decision authority and communications:
|
|
28
|
+
3. Fence or isolate the failed primary:
|
|
29
|
+
4. Promote data and validate consistency:
|
|
30
|
+
5. Enable writers, consumers, and scheduled jobs:
|
|
31
|
+
6. Shift traffic and validate critical journeys:
|
|
32
|
+
7. Monitor error budget, lag, and reconciliation:
|
|
33
|
+
|
|
34
|
+
## Failback
|
|
35
|
+
- Reconciliation strategy:
|
|
36
|
+
- Replication re-establishment:
|
|
37
|
+
- Safety gates and traffic switch:
|
|
38
|
+
- Rollback conditions:
|
|
39
|
+
|
|
40
|
+
## Exercise evidence
|
|
41
|
+
- Last game day / restore test:
|
|
42
|
+
- Measured RTO and RPO:
|
|
43
|
+
- Gaps, owners, remediation dates:
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Network Architecture Design
|
|
2
|
+
|
|
3
|
+
## 1. Scope and requirements
|
|
4
|
+
- Workloads, users, regions, environments:
|
|
5
|
+
- Critical journeys and latency objectives:
|
|
6
|
+
- Availability, throughput, bandwidth, and recovery targets:
|
|
7
|
+
- Compliance, data residency, and trust constraints:
|
|
8
|
+
|
|
9
|
+
## 2. Topology and addressing
|
|
10
|
+
- Accounts/projects, VPCs/VNets, zones, subnets:
|
|
11
|
+
- CIDR allocation and IPv6 strategy:
|
|
12
|
+
- Trust zones and segmentation:
|
|
13
|
+
- Routing, transit, peering, NAT, and gateways:
|
|
14
|
+
- DNS zones, resolvers, and private endpoints:
|
|
15
|
+
|
|
16
|
+
## 3. Traffic flows
|
|
17
|
+
| Source | Destination | Protocol/port | Path | Identity/policy | Expected volume |
|
|
18
|
+
|---|---|---|---|---|---|
|
|
19
|
+
| | | | | | |
|
|
20
|
+
|
|
21
|
+
## 4. Connectivity and resilience
|
|
22
|
+
- VPN/private connectivity options:
|
|
23
|
+
- Redundant paths and failure domains:
|
|
24
|
+
- Route convergence and failover:
|
|
25
|
+
- MTU, NAT ports, connection tracking, throughput limits:
|
|
26
|
+
- Egress controls and inspection:
|
|
27
|
+
|
|
28
|
+
## 5. Security and operations
|
|
29
|
+
- Firewall/network policy ownership:
|
|
30
|
+
- Workload identity and encryption:
|
|
31
|
+
- Flow logs, telemetry, and alerting:
|
|
32
|
+
- Change control, drift detection, and rollback:
|
|
33
|
+
- Cost allocation and data transfer:
|
|
34
|
+
|
|
35
|
+
## 6. Decisions and validation
|
|
36
|
+
- Alternatives and trade-offs:
|
|
37
|
+
- Failure-injection and reachability tests:
|
|
38
|
+
- Acceptance criteria and owners:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Observability Architecture Design
|
|
2
|
+
|
|
3
|
+
## 1. Scope and critical journeys
|
|
4
|
+
- System/services:
|
|
5
|
+
- Critical user journeys:
|
|
6
|
+
- Environments/regions/tenants:
|
|
7
|
+
- Owners and operational consumers:
|
|
8
|
+
|
|
9
|
+
## 2. Objectives and SLOs
|
|
10
|
+
| Journey | SLIs | SLO target | Window | Error budget policy |
|
|
11
|
+
|---|---|---|---|---|
|
|
12
|
+
| | | | | |
|
|
13
|
+
|
|
14
|
+
## 3. Telemetry coverage
|
|
15
|
+
| Signal | Instrumentation/source | Critical coverage | Owner | Known gaps |
|
|
16
|
+
|---|---|---|---|---|
|
|
17
|
+
| Metrics | | | | |
|
|
18
|
+
| Logs | | | | |
|
|
19
|
+
| Traces | | | | |
|
|
20
|
+
| Profiles | | | | |
|
|
21
|
+
|
|
22
|
+
## 4. Collection and processing
|
|
23
|
+
- SDK/agent/auto-instrumentation:
|
|
24
|
+
- Collector topology and deployment model:
|
|
25
|
+
- OTLP endpoints, authN/authZ, TLS:
|
|
26
|
+
- Batching, queues, retries, memory limits:
|
|
27
|
+
- Routing, filtering, enrichment, redaction:
|
|
28
|
+
- Backend destinations and failure behavior:
|
|
29
|
+
|
|
30
|
+
## 5. Context and correlation
|
|
31
|
+
- Trace propagation across HTTP/RPC/messaging/workflows:
|
|
32
|
+
- Resource attributes and semantic conventions:
|
|
33
|
+
- Log correlation:
|
|
34
|
+
- Baggage allowlist and trust boundaries:
|
|
35
|
+
|
|
36
|
+
## 6. Sampling, privacy, retention, and cost
|
|
37
|
+
- Head/tail sampling policies:
|
|
38
|
+
- PII/secrets minimization and redaction:
|
|
39
|
+
- Access controls and tenant isolation:
|
|
40
|
+
- Retention tiers and residency:
|
|
41
|
+
- Volume/cost budget and alert thresholds:
|
|
42
|
+
|
|
43
|
+
## 7. Reliability and validation
|
|
44
|
+
- Telemetry pipeline SLO:
|
|
45
|
+
- Drop/export failure monitoring:
|
|
46
|
+
- Synthetic validation and instrumentation tests:
|
|
47
|
+
- Collector/backend outage behavior:
|
|
48
|
+
|
|
49
|
+
## 8. Decisions and rollout
|
|
50
|
+
- Alternatives and trade-offs:
|
|
51
|
+
- Migration and rollback:
|
|
52
|
+
- Owners, milestones, acceptance criteria:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Performance Test Plan
|
|
2
|
+
|
|
3
|
+
## 1. Objective and acceptance criteria
|
|
4
|
+
- Hypothesis:
|
|
5
|
+
- User journey/service:
|
|
6
|
+
- Target SLOs and pass/fail thresholds:
|
|
7
|
+
- Test environment and owner:
|
|
8
|
+
|
|
9
|
+
## 2. Workload model
|
|
10
|
+
| Dimension | Production evidence or assumption | Test value |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Arrival rate and burst profile | | |
|
|
13
|
+
| Open/closed workload | | |
|
|
14
|
+
| Request mix/read-write ratio | | |
|
|
15
|
+
| Concurrency and think time | | |
|
|
16
|
+
| Payload and data volume | | |
|
|
17
|
+
| Tenant/key skew | | |
|
|
18
|
+
| Cache state/background jobs | | |
|
|
19
|
+
|
|
20
|
+
## 3. Test matrix
|
|
21
|
+
| Test | Load/duration | Faults/dependencies | Purpose |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| Baseline | | | |
|
|
24
|
+
| Load | | | |
|
|
25
|
+
| Stress | | | |
|
|
26
|
+
| Spike | | | |
|
|
27
|
+
| Soak | | | |
|
|
28
|
+
| Recovery | | | |
|
|
29
|
+
|
|
30
|
+
## 4. Safety controls
|
|
31
|
+
- Authorization/change window:
|
|
32
|
+
- RPS/concurrency/duration/spend caps:
|
|
33
|
+
- Abort thresholds and kill switch:
|
|
34
|
+
- On-call contacts and downstream coordination:
|
|
35
|
+
- Data isolation and cleanup:
|
|
36
|
+
|
|
37
|
+
## 5. Instrumentation and execution
|
|
38
|
+
- Generator placement and capacity validation:
|
|
39
|
+
- Warm-up and steady-state windows:
|
|
40
|
+
- Coordinated omission handling:
|
|
41
|
+
- Run IDs, build/configuration, dataset:
|
|
42
|
+
- Metrics: throughput, P50/P95/P99, errors, saturation, queue depth/age:
|
|
43
|
+
|
|
44
|
+
## 6. Results and analysis
|
|
45
|
+
| Run | Throughput | P95/P99 | Error rate | Saturation | SLO result |
|
|
46
|
+
|---|---:|---:|---:|---:|---|
|
|
47
|
+
| | | | | | |
|
|
48
|
+
|
|
49
|
+
- Bottleneck and supporting evidence:
|
|
50
|
+
- Variance/confidence and limitations:
|
|
51
|
+
- Before/after comparison:
|
|
52
|
+
- Follow-up and retest criteria:
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Privacy and Data Governance Review
|
|
2
|
+
|
|
3
|
+
## Data inventory
|
|
4
|
+
- Data subjects, categories, and sensitivity:
|
|
5
|
+
- Collection purpose and necessity:
|
|
6
|
+
- Systems, processors, regions, and recipients:
|
|
7
|
+
- Derived data, telemetry, embeddings, backups:
|
|
8
|
+
|
|
9
|
+
## Lifecycle policy
|
|
10
|
+
- Retention and legal hold:
|
|
11
|
+
- Access, correction, export, deletion:
|
|
12
|
+
- Replica, cache, index, and backup propagation:
|
|
13
|
+
- Residency and cross-border controls:
|
|
14
|
+
|
|
15
|
+
## Safeguards and accountability
|
|
16
|
+
- Minimization, encryption, pseudonymization:
|
|
17
|
+
- Access policy, audit, lineage:
|
|
18
|
+
- Data owner/steward and processor obligations:
|
|
19
|
+
- Legal/privacy review and policy exceptions:
|
|
20
|
+
|
|
21
|
+
## Verification
|
|
22
|
+
- Data discovery and access tests:
|
|
23
|
+
- Retention/deletion propagation tests:
|
|
24
|
+
- Evidence, unresolved risks, owners:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Production Readiness Review
|
|
2
|
+
|
|
3
|
+
## Service and ownership
|
|
4
|
+
- Service / version:
|
|
5
|
+
- Business owner:
|
|
6
|
+
- Engineering owner / on-call:
|
|
7
|
+
- Critical user journeys:
|
|
8
|
+
- Dependencies and upstream/downstream owners:
|
|
9
|
+
|
|
10
|
+
## Workload and capacity
|
|
11
|
+
- Expected and peak traffic:
|
|
12
|
+
- Capacity model and assumptions:
|
|
13
|
+
- Resource requests, limits, and scaling signals:
|
|
14
|
+
- Quotas, burst limits, and saturation thresholds:
|
|
15
|
+
- Load, stress, and soak test evidence:
|
|
16
|
+
|
|
17
|
+
## Reliability and recovery
|
|
18
|
+
- Availability SLO / SLIs:
|
|
19
|
+
- Latency and correctness SLOs:
|
|
20
|
+
- Error-budget policy:
|
|
21
|
+
- Timeout, retry, idempotency, and backpressure behavior:
|
|
22
|
+
- Failure isolation and graceful degradation:
|
|
23
|
+
- Backup and restore evidence:
|
|
24
|
+
- RTO / RPO and last recovery exercise:
|
|
25
|
+
- Rollback and compatibility plan:
|
|
26
|
+
|
|
27
|
+
## Security and compliance
|
|
28
|
+
- Authentication, authorization, and workload identity:
|
|
29
|
+
- Secrets, encryption, and key rotation:
|
|
30
|
+
- Network and egress boundaries:
|
|
31
|
+
- Vulnerability, image, dependency, and SBOM checks:
|
|
32
|
+
- Data classification, retention, residency, and audit:
|
|
33
|
+
- Threat model and unresolved risks:
|
|
34
|
+
|
|
35
|
+
## Operations and observability
|
|
36
|
+
- Dashboards, alerts, runbooks, and escalation:
|
|
37
|
+
- Metrics/logs/traces coverage and redaction:
|
|
38
|
+
- Deployment strategy and abort criteria:
|
|
39
|
+
- Incident roles and communication:
|
|
40
|
+
- Telemetry pipeline failure behavior:
|
|
41
|
+
|
|
42
|
+
## Cost and platform
|
|
43
|
+
- Cost forecast and unit economics:
|
|
44
|
+
- Budget owner and anomaly alerts:
|
|
45
|
+
- Platform dependencies and support model:
|
|
46
|
+
- Quotas, capacity reservations, and regional costs:
|
|
47
|
+
|
|
48
|
+
## Decision
|
|
49
|
+
- Status: Ready / Ready with actions / Not ready
|
|
50
|
+
- Blocking issues, owners, and due dates:
|
|
51
|
+
- Accepted risks and approvers:
|
|
52
|
+
- Evidence links and review date:
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Real-Time System Design
|
|
2
|
+
|
|
3
|
+
## Product semantics
|
|
4
|
+
- Interaction model and freshness target:
|
|
5
|
+
- One-way or bidirectional communication:
|
|
6
|
+
- Ordering scope and delivery guarantee:
|
|
7
|
+
- Offline/reconnect and replay requirements:
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
- Transport (SSE / WebSocket / gRPC streaming):
|
|
11
|
+
- Connection and subscription ownership:
|
|
12
|
+
- Durable event log or pub/sub:
|
|
13
|
+
- Presence versus durable state:
|
|
14
|
+
- OT / CRDT / centralized sequencing rationale:
|
|
15
|
+
|
|
16
|
+
## Capacity and controls
|
|
17
|
+
- Concurrent connections and churn:
|
|
18
|
+
- Messages/sec, fan-out, payload size:
|
|
19
|
+
- Per-connection queue and slow-consumer policy:
|
|
20
|
+
- Heartbeats, idle timeout, reconnect backoff:
|
|
21
|
+
- AuthZ, Origin, tenant isolation, quotas:
|
|
22
|
+
|
|
23
|
+
## Recovery and testing
|
|
24
|
+
- Event IDs, cursors, deduplication, snapshots:
|
|
25
|
+
- Node/broker/region failure behavior:
|
|
26
|
+
- Convergence and randomized concurrency tests:
|
|
27
|
+
- Load, soak, reconnect-storm, and security tests:
|
|
28
|
+
- SLOs, dashboards, owners, rollback:
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Security Threat Model
|
|
2
|
+
|
|
3
|
+
## System scope
|
|
4
|
+
- Business purpose and security objectives:
|
|
5
|
+
- Assets and data classifications:
|
|
6
|
+
- Actors, entry points, data flows:
|
|
7
|
+
- Trust boundaries and external dependencies:
|
|
8
|
+
|
|
9
|
+
## Threat scenarios
|
|
10
|
+
For each scenario record:
|
|
11
|
+
- STRIDE category / attacker goal:
|
|
12
|
+
- Preconditions and attack path:
|
|
13
|
+
- Affected asset and business impact:
|
|
14
|
+
- Likelihood rationale and existing controls:
|
|
15
|
+
- Residual risk and confidence:
|
|
16
|
+
|
|
17
|
+
## Mitigations
|
|
18
|
+
- Preventive controls:
|
|
19
|
+
- Detection and response:
|
|
20
|
+
- Recovery and containment:
|
|
21
|
+
- Owner, due date, verification test:
|
|
22
|
+
|
|
23
|
+
## Review and acceptance
|
|
24
|
+
- Assumptions and out-of-scope items:
|
|
25
|
+
- Accepted risks, approver, expiry:
|
|
26
|
+
- Trigger for re-review:
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Sharding and Distributed SQL Design
|
|
2
|
+
|
|
3
|
+
## Requirements and thresholds
|
|
4
|
+
- Workload and measured single-node bottleneck:
|
|
5
|
+
- Data size / growth / retention:
|
|
6
|
+
- Read/write and range-query patterns:
|
|
7
|
+
- Consistency and transaction requirements:
|
|
8
|
+
- Availability, latency, RPO/RTO:
|
|
9
|
+
- Trigger thresholds for sharding:
|
|
10
|
+
|
|
11
|
+
## Partitioning strategy
|
|
12
|
+
- Shard key and rationale:
|
|
13
|
+
- Cardinality / skew / hot-key analysis:
|
|
14
|
+
- Routing and shard-map versioning:
|
|
15
|
+
- Cross-shard query and transaction policy:
|
|
16
|
+
- Unique IDs and constraints:
|
|
17
|
+
|
|
18
|
+
## Lifecycle and operations
|
|
19
|
+
- Split / merge / rebalance procedure:
|
|
20
|
+
- Online migration and verification:
|
|
21
|
+
- Failover and fencing:
|
|
22
|
+
- Backup / restore per shard:
|
|
23
|
+
- Monitoring and capacity headroom:
|
|
24
|
+
|
|
25
|
+
## Correctness and failure cases
|
|
26
|
+
- Concurrent writes and retries:
|
|
27
|
+
- Coordinator / node / network failures:
|
|
28
|
+
- Reconciliation and rollback:
|
|
29
|
+
- Consistency guarantees:
|
|
30
|
+
|
|
31
|
+
## Decision record
|
|
32
|
+
- Baseline alternatives considered:
|
|
33
|
+
- Operational and TCO impact:
|
|
34
|
+
- Exit strategy and reevaluation triggers:
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Storage Architecture Design
|
|
2
|
+
|
|
3
|
+
## 1. Workload characterization
|
|
4
|
+
| Dataset | Access pattern | Size/growth | IOPS/throughput | Latency target | Retention |
|
|
5
|
+
|---|---|---|---|---|---|
|
|
6
|
+
| | | | | | |
|
|
7
|
+
|
|
8
|
+
## 2. Storage selection
|
|
9
|
+
- Block/file/object/local/distributed storage:
|
|
10
|
+
- Alternatives and why rejected:
|
|
11
|
+
- Consistency, atomicity, and multi-writer semantics:
|
|
12
|
+
- Performance and noisy-neighbor constraints:
|
|
13
|
+
|
|
14
|
+
## 3. Data protection and recovery
|
|
15
|
+
- Replication and failure domains:
|
|
16
|
+
- Backup/versioning/immutability:
|
|
17
|
+
- Encryption and key ownership:
|
|
18
|
+
- RPO/RTO and restore validation:
|
|
19
|
+
- Deletion, retention, and legal hold:
|
|
20
|
+
|
|
21
|
+
## 4. Capacity and performance model
|
|
22
|
+
- Capacity, growth, and headroom:
|
|
23
|
+
- IOPS, throughput, queue depth, and tail latency:
|
|
24
|
+
- Snapshot, replication, repair, and rebuild overhead:
|
|
25
|
+
- Benchmark method and representative data:
|
|
26
|
+
|
|
27
|
+
## 5. Security and governance
|
|
28
|
+
- Identity, access policies, and tenant isolation:
|
|
29
|
+
- Public access and presigned URL controls:
|
|
30
|
+
- Audit, lifecycle, tiering, and secure deletion:
|
|
31
|
+
|
|
32
|
+
## 6. Operations and economics
|
|
33
|
+
- SLOs, alerts, and ownership:
|
|
34
|
+
- Provisioned performance, requests, egress, retrieval, and backup cost:
|
|
35
|
+
- Migration, rollback, and acceptance criteria:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Software Supply Chain Security Review
|
|
2
|
+
|
|
3
|
+
## Build and dependency inventory
|
|
4
|
+
- Source repositories and protected branches:
|
|
5
|
+
- Dependencies, registries, lockfiles:
|
|
6
|
+
- Build runners, workflow permissions, secrets:
|
|
7
|
+
- Artifact stores and deployment destinations:
|
|
8
|
+
|
|
9
|
+
## Integrity controls
|
|
10
|
+
- Dependency verification and update policy:
|
|
11
|
+
- SBOM format, generation, and retention:
|
|
12
|
+
- Build provenance and attestation verification:
|
|
13
|
+
- Artifact signing, immutable promotion:
|
|
14
|
+
- Builder isolation and signing-key custody:
|
|
15
|
+
|
|
16
|
+
## Risk and response
|
|
17
|
+
- Vulnerability and license triage:
|
|
18
|
+
- Compromise detection and quarantine:
|
|
19
|
+
- Rebuild, revoke, rollback, disclosure:
|
|
20
|
+
- Exceptions, owners, remediation SLAs:
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Zero-Downtime Database Migration Plan
|
|
2
|
+
|
|
3
|
+
## Change and compatibility
|
|
4
|
+
- Current schema / application versions:
|
|
5
|
+
- Target schema:
|
|
6
|
+
- Consumers and writers:
|
|
7
|
+
- Business invariants:
|
|
8
|
+
- Compatibility window:
|
|
9
|
+
|
|
10
|
+
## Rollout stages
|
|
11
|
+
| Stage | Change | Owner | Validation gate | Rollback |
|
|
12
|
+
|---|---|---|---|---|
|
|
13
|
+
| Expand | | | | |
|
|
14
|
+
| Compatibility deploy | | | | |
|
|
15
|
+
| Backfill | | | | |
|
|
16
|
+
| Validate | | | | |
|
|
17
|
+
| Read/write cutover | | | | |
|
|
18
|
+
| Contract | | | | |
|
|
19
|
+
|
|
20
|
+
## Backfill controls
|
|
21
|
+
- Key/range strategy:
|
|
22
|
+
- Batch size and concurrency:
|
|
23
|
+
- Checkpoint and idempotency:
|
|
24
|
+
- Rate limits and replication impact:
|
|
25
|
+
- Reconciliation query/checksum:
|
|
26
|
+
|
|
27
|
+
## Operational safeguards
|
|
28
|
+
- Lock and DDL behavior:
|
|
29
|
+
- Disk/WAL/binlog headroom:
|
|
30
|
+
- Backup/PITR and restore test:
|
|
31
|
+
- Alerts and stop conditions:
|
|
32
|
+
- Irreversible steps and approval:
|