dojo.md 0.2.0 → 0.2.1
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/courses/GENERATION_LOG.md +45 -0
- package/courses/aws-lambda-debugging/course.yaml +11 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/api-gateway-integration.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cloudwatch-logs-basics.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cold-start-basics.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/environment-variable-issues.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/first-debugging-shift.yaml +73 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/handler-import-errors.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/iam-permission-errors.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/invocation-errors.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/lambda-timeout-errors.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/memory-and-oom.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/async-invocation-failures.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/cold-start-optimization.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/dynamodb-streams-debugging.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-concurrency-management.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-layers-debugging.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sam-local-debugging.yaml +74 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sqs-event-source.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/vpc-networking-issues.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/xray-tracing.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/advanced-debugging-shift.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/container-image-lambda.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/cross-account-invocation.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/eventbridge-patterns.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/iac-deployment-debugging.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/kinesis-stream-processing.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-at-edge.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-extensions-debugging.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/powertools-observability.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/step-functions-debugging.yaml +80 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/cost-optimization-strategy.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/expert-debugging-shift.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/incident-management-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/multi-region-serverless.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/observability-platform-design.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-architecture-design.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-data-architecture.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-migration-strategy.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-security-design.yaml +60 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-testing-strategy.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/board-serverless-strategy.yaml +63 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/consulting-serverless-adoption.yaml +57 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/industry-serverless-patterns.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/ma-serverless-integration.yaml +75 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/master-debugging-shift.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/organizational-serverless-transformation.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/regulatory-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-economics.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-future-technology.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-platform-design.yaml +71 -0
- package/courses/docker-container-debugging/course.yaml +11 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-exit-codes.yaml +59 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-networking-basics.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-1/docker-logs-debugging.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/dockerfile-build-failures.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-1/environment-variable-issues.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-1/first-debugging-shift.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/image-pull-failures.yaml +68 -0
- package/courses/docker-container-debugging/scenarios/level-1/port-mapping-issues.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/resource-limits-oom.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/volume-mount-problems.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/container-health-checks.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-compose-debugging.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-exec-debugging.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/image-layer-optimization.yaml +81 -0
- package/courses/docker-container-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/logging-and-log-rotation.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/multi-stage-build-debugging.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/network-debugging-tools.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-2/pid1-signal-handling.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/security-scanning-basics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/advanced-debugging-shift.yaml +77 -0
- package/courses/docker-container-debugging/scenarios/level-3/buildkit-optimization.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-filesystem-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-security-hardening.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/disk-space-management.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-api-automation.yaml +72 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-daemon-issues.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-in-docker-ci.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-3/overlay-network-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/production-container-ops.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-4/cicd-pipeline-design.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-monitoring-observability.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-orchestration-strategy.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-performance-engineering.yaml +64 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-security-architecture.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/enterprise-image-management.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-4/expert-debugging-shift.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/incident-response-containers.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-4/multi-environment-management.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-4/stateful-service-containers.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-5/board-infrastructure-strategy.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-5/consulting-container-strategy.yaml +61 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-architecture.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-economics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-technology-evolution.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/disaster-recovery-containers.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-5/industry-container-patterns.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-5/master-debugging-shift.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-5/organizational-transformation.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/regulatory-compliance-containers.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/course.yaml +12 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/configmap-secret-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/crashloopbackoff.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/deployment-rollout.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/first-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/health-probe-failures.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/imagepullbackoff.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/kubectl-debugging-basics.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/oomkilled.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/pending-pods.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/service-not-reachable.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/dns-resolution-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/helm-deployment-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/hpa-scaling-issues.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/ingress-routing-issues.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/init-container-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/intermediate-troubleshooting-shift.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/network-policy-blocking.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/persistent-volume-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/rbac-permission-denied.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/resource-quota-limits.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/advanced-troubleshooting-shift.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/cluster-upgrade-failures.yaml +71 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/gitops-drift-detection.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/job-cronjob-failures.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/monitoring-alerting-gaps.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/multi-container-debugging.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/node-pressure-evictions.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/pod-disruption-budgets.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/service-mesh-debugging.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/statefulset-troubleshooting.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/capacity-planning.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/cost-optimization.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/disaster-recovery-design.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/executive-communication.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/expert-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/incident-management-process.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-cluster-operations.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-tenancy-design.yaml +55 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/platform-engineering.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/security-hardening.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/behavioral-science.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/board-strategy.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/cloud-native-future.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/comprehensive-platform.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/consulting-engagement.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/industry-benchmarks.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/ma-integration.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/master-troubleshooting-shift.yaml +73 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/product-development.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/regulatory-compliance.yaml +76 -0
- package/courses/mysql-query-optimization/course.yaml +11 -0
- package/courses/mysql-query-optimization/scenarios/level-1/buffer-pool-basics.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/explain-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-1/innodb-index-fundamentals.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/join-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/select-star-problems.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-2/buffer-pool-tuning.yaml +64 -0
- package/courses/mysql-query-optimization/scenarios/level-2/composite-index-design.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-2/covering-and-invisible-indexes.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/cte-and-window-functions.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-2/join-optimization.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-2/performance-schema-analysis.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/query-optimizer-hints.yaml +74 -0
- package/courses/mysql-query-optimization/scenarios/level-2/subquery-optimization.yaml +70 -0
- package/courses/mysql-query-optimization/scenarios/level-2/write-optimization.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-3/connection-management.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-3/full-text-search.yaml +77 -0
- package/courses/mysql-query-optimization/scenarios/level-3/json-optimization.yaml +87 -0
- package/courses/mysql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-3/monitoring-alerting.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/online-schema-changes.yaml +79 -0
- package/courses/mysql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +83 -0
- package/courses/mysql-query-optimization/scenarios/level-3/query-profiling-deep-dive.yaml +84 -0
- package/courses/mysql-query-optimization/scenarios/level-3/replication-optimization.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-4/aurora-vs-rds-evaluation.yaml +61 -0
- package/courses/mysql-query-optimization/scenarios/level-4/data-architecture.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/database-migration-planning.yaml +59 -0
- package/courses/mysql-query-optimization/scenarios/level-4/enterprise-governance.yaml +50 -0
- package/courses/mysql-query-optimization/scenarios/level-4/executive-communication.yaml +54 -0
- package/courses/mysql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +60 -0
- package/courses/mysql-query-optimization/scenarios/level-4/optimizer-internals.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/performance-sla-design.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-4/read-replica-scaling.yaml +51 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ai-database-future.yaml +45 -0
- package/courses/mysql-query-optimization/scenarios/level-5/behavioral-science.yaml +44 -0
- package/courses/mysql-query-optimization/scenarios/level-5/benchmark-design.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/board-strategy.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/comprehensive-platform.yaml +49 -0
- package/courses/mysql-query-optimization/scenarios/level-5/consulting-engagement.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ma-database-integration.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +56 -0
- package/courses/mysql-query-optimization/scenarios/level-5/product-development.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/regulatory-compliance.yaml +48 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/comprehensive-database-system.yaml +70 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ai-future.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-board-strategy.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml +61 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ma-integration.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +66 -0
- package/courses/terraform-infrastructure-setup/course.yaml +11 -0
- package/courses/terraform-infrastructure-setup/scenarios/level-1/terraform-init-errors.yaml +72 -0
- package/dist/mcp/session-manager.d.ts +7 -4
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +23 -8
- package/dist/mcp/session-manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: aurora-vs-rds-evaluation
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Evaluate Aurora vs RDS MySQL — compare performance, cost, features, and operational trade-offs for enterprise workloads"
|
|
7
|
+
tags: [MySQL, Aurora, RDS, AWS, vendor-evaluation, TCO, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company runs 10 MySQL RDS instances and the CTO wants to
|
|
13
|
+
evaluate migrating to Aurora MySQL. The AWS sales team claims
|
|
14
|
+
"5x performance improvement and lower TCO." You need to validate
|
|
15
|
+
these claims with real analysis.
|
|
16
|
+
|
|
17
|
+
Current state (RDS MySQL):
|
|
18
|
+
- 10 instances: 5 primary + 5 read replicas
|
|
19
|
+
- Instance type: db.r6g.4xlarge ($2.46/hr per instance)
|
|
20
|
+
- Storage: 5TB gp3 across all instances
|
|
21
|
+
- IOPS: 16,000 provisioned per primary
|
|
22
|
+
- Monthly cost: $22K (compute) + $3K (storage) + $1K (IOPS) = $26K
|
|
23
|
+
- Replication lag: 5-30 seconds (async)
|
|
24
|
+
- Failover time: 60-120 seconds
|
|
25
|
+
- Backup: automated daily, 7-day retention
|
|
26
|
+
|
|
27
|
+
Aurora proposal (AWS sales):
|
|
28
|
+
- 5 instances: 1 writer + 4 readers (Aurora needs fewer due to
|
|
29
|
+
shared storage)
|
|
30
|
+
- Instance type: db.r6g.4xlarge ($3.28/hr per instance)
|
|
31
|
+
- Storage: auto-scaling, pay per GB-month ($0.10/GB)
|
|
32
|
+
- I/O: pay per million requests ($0.20 per million)
|
|
33
|
+
- Estimated monthly cost: $12K (compute) + $0.5K (storage) + $4K (I/O) = $16.5K
|
|
34
|
+
- Replication lag: <100ms (shared storage, no log replay)
|
|
35
|
+
- Failover time: <30 seconds
|
|
36
|
+
- Backup: continuous, 35-day retention
|
|
37
|
+
|
|
38
|
+
Concerns raised by the team:
|
|
39
|
+
1. Aurora's "5x faster" claim — is it real for our workload?
|
|
40
|
+
2. I/O costs are unpredictable — could they spike?
|
|
41
|
+
3. Lock-in: Aurora has proprietary storage, can we migrate away?
|
|
42
|
+
4. MySQL compatibility: are there breaking differences?
|
|
43
|
+
5. The 4-reader setup: can it handle our analytics workload?
|
|
44
|
+
|
|
45
|
+
Task: Write the evaluation report. Include: the TCO comparison (with
|
|
46
|
+
hidden costs), the performance benchmark plan, the compatibility
|
|
47
|
+
assessment, the lock-in risk analysis, and the recommendation.
|
|
48
|
+
|
|
49
|
+
assertions:
|
|
50
|
+
- type: llm_judge
|
|
51
|
+
criteria: "TCO comparison includes hidden costs — accounts for I/O costs (which can be significant and unpredictable for write-heavy workloads), data transfer costs, backup storage beyond included, and the cost of migration itself. 3-year projection shows when each option is cheaper. Validates or refutes the $26K vs $16.5K estimate"
|
|
52
|
+
weight: 0.35
|
|
53
|
+
description: "TCO with hidden costs"
|
|
54
|
+
- type: llm_judge
|
|
55
|
+
criteria: "Performance claims are critically analyzed — the '5x faster' claim applies to specific workloads (Aurora's distributed storage eliminates checkpoint stalls), not universally. Recommends benchmarking with actual workload, identifies where Aurora is genuinely faster (failover, replication lag, crash recovery) and where it may not be (single-query latency for simple queries)"
|
|
56
|
+
weight: 0.35
|
|
57
|
+
description: "Performance claims analyzed"
|
|
58
|
+
- type: llm_judge
|
|
59
|
+
criteria: "Lock-in and compatibility are honestly assessed — Aurora's proprietary storage means you can't simply pg_dump/restore back to RDS MySQL. Compatibility differences (minor SQL behavior, parameter differences, Aurora-specific features). Migration path back to RDS exists but requires downtime. Lock-in risk is quantified in terms of migration effort and cost"
|
|
60
|
+
weight: 0.30
|
|
61
|
+
description: "Lock-in and compatibility"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: data-architecture
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Design MySQL data architecture — separate OLTP from OLAP, implement sharding strategies, and plan for 10x growth"
|
|
7
|
+
tags: [MySQL, data-architecture, sharding, OLTP, OLAP, scaling, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your SaaS platform has outgrown a single MySQL cluster. The primary
|
|
13
|
+
database is 5TB, handles 100K QPS, and analytics queries are
|
|
14
|
+
degrading OLTP performance. The CTO asks you to design the data
|
|
15
|
+
architecture for the next 3 years of 10x growth.
|
|
16
|
+
|
|
17
|
+
Current state:
|
|
18
|
+
- Single Aurora MySQL cluster: 1 writer + 4 readers
|
|
19
|
+
- 5TB data, 500 tables, 100K QPS
|
|
20
|
+
- OLTP and analytics on the same cluster
|
|
21
|
+
- Largest table: events (2B rows, 2TB)
|
|
22
|
+
- Analytics queries run on readers but cause replication lag
|
|
23
|
+
|
|
24
|
+
Growth projections:
|
|
25
|
+
- Users: 5M → 50M in 3 years
|
|
26
|
+
- Data: 5TB → 50TB
|
|
27
|
+
- QPS: 100K → 1M
|
|
28
|
+
- Analytics: real-time dashboards, ML feature extraction
|
|
29
|
+
|
|
30
|
+
Architecture options:
|
|
31
|
+
A. Vertical scaling (bigger instances)
|
|
32
|
+
B. Read replicas (more readers)
|
|
33
|
+
C. Functional sharding (split by domain: users, orders, events)
|
|
34
|
+
D. Horizontal sharding (split by tenant_id or user_id)
|
|
35
|
+
E. Vitess (MySQL sharding proxy from YouTube/PlanetScale)
|
|
36
|
+
F. TiDB (MySQL-compatible distributed database)
|
|
37
|
+
G. OLTP stays MySQL + OLAP moves to ClickHouse/BigQuery
|
|
38
|
+
|
|
39
|
+
Constraints:
|
|
40
|
+
- Team knows MySQL, limited distributed systems experience
|
|
41
|
+
- Must support transactions within a single shard
|
|
42
|
+
- Cross-shard JOINs needed for some reports
|
|
43
|
+
- Data locality: some jurisdictions require data residency
|
|
44
|
+
|
|
45
|
+
Task: Design the data architecture. Write: the recommended approach
|
|
46
|
+
with justification, the sharding strategy (if applicable), the
|
|
47
|
+
OLTP/OLAP separation design, the data pipeline architecture, and
|
|
48
|
+
the migration plan from current state.
|
|
49
|
+
|
|
50
|
+
assertions:
|
|
51
|
+
- type: llm_judge
|
|
52
|
+
criteria: "Architecture addresses 10x growth — evaluates all options, recommends a phased approach (functional sharding first, then horizontal if needed), separates OLTP and OLAP workloads (MySQL for OLTP, analytical database for OLAP), and explains why each rejected option doesn't meet requirements"
|
|
53
|
+
weight: 0.35
|
|
54
|
+
description: "10x growth architecture"
|
|
55
|
+
- type: llm_judge
|
|
56
|
+
criteria: "Sharding strategy is practical — if recommending sharding, defines the shard key (tenant_id for multi-tenant SaaS), explains how cross-shard queries are handled (fan-out or analytical database), addresses data locality requirements, and considers Vitess or ProxySQL for shard routing. If recommending against sharding, explains the alternative scaling path"
|
|
57
|
+
weight: 0.35
|
|
58
|
+
description: "Practical sharding strategy"
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "OLTP/OLAP separation is designed — explains the data pipeline from MySQL to analytical database (CDC via Debezium, binlog streaming, or DMS), data freshness requirements, and how this eliminates analytics impact on OLTP. Migration plan is phased with rollback capability at each stage"
|
|
61
|
+
weight: 0.30
|
|
62
|
+
description: "OLTP/OLAP separation"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-migration-planning
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Plan a MySQL migration — migrate from MySQL 5.7 to 8.0, or from self-managed to Aurora, with near-zero downtime"
|
|
7
|
+
tags: [MySQL, migration, upgrade, Aurora, zero-downtime, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company needs to migrate from MySQL 5.7 (self-managed on EC2)
|
|
13
|
+
to MySQL 8.0 on Aurora. The database processes $30M in transactions
|
|
14
|
+
daily with a 99.95% availability SLA. MySQL 5.7 reaches end of
|
|
15
|
+
extended support, and the business needs Aurora's read scaling.
|
|
16
|
+
|
|
17
|
+
Source: MySQL 5.7.44 on EC2, 3TB, 150 tables, 80K QPS peak
|
|
18
|
+
Target: Aurora MySQL 8.0 (latest)
|
|
19
|
+
|
|
20
|
+
Challenges:
|
|
21
|
+
1. 3TB data takes ~5 hours via mysqldump
|
|
22
|
+
2. MySQL 5.7→8.0 has breaking changes:
|
|
23
|
+
- Default charset changes (latin1 → utf8mb4)
|
|
24
|
+
- GROUP BY implicit ordering removed
|
|
25
|
+
- Reserved word changes (RANK, GROUPS, etc.)
|
|
26
|
+
- JSON function behavior changes
|
|
27
|
+
- Authentication plugin changes (mysql_native_password → caching_sha2)
|
|
28
|
+
3. Application uses mysql_native_password — Aurora 8.0 defaults to
|
|
29
|
+
caching_sha2_password
|
|
30
|
+
4. 15 stored procedures using deprecated syntax
|
|
31
|
+
5. 3 applications use MySQL-specific features (GET_LOCK, FOUND_ROWS)
|
|
32
|
+
6. Read replicas serving 3 analytics dashboards must migrate too
|
|
33
|
+
7. Maximum acceptable downtime: 10 minutes
|
|
34
|
+
|
|
35
|
+
Migration approaches:
|
|
36
|
+
A. mysqldump + restore (simple, hours of downtime)
|
|
37
|
+
B. AWS DMS (managed migration, CDC for near-zero downtime)
|
|
38
|
+
C. Binlog replication (source→target, then cutover)
|
|
39
|
+
D. Percona XtraBackup + binlog replay
|
|
40
|
+
E. Blue-green with Aurora cloning
|
|
41
|
+
|
|
42
|
+
Task: Design the migration plan. Write: the compatibility assessment
|
|
43
|
+
(what breaks between 5.7 and 8.0), the chosen approach with
|
|
44
|
+
justification, the step-by-step migration procedure, the cutover
|
|
45
|
+
choreography (the 10-minute window), and the rollback plan.
|
|
46
|
+
|
|
47
|
+
assertions:
|
|
48
|
+
- type: llm_judge
|
|
49
|
+
criteria: "Compatibility assessment is thorough — identifies the key 5.7→8.0 breaking changes (charset defaults, GROUP BY ordering, reserved words, authentication plugin, deprecated syntax), provides a testing plan to validate application compatibility, and addresses the stored procedure and MySQL-specific feature issues before migration day"
|
|
50
|
+
weight: 0.35
|
|
51
|
+
description: "Thorough compatibility assessment"
|
|
52
|
+
- type: llm_judge
|
|
53
|
+
criteria: "Migration approach achieves <10 min downtime — uses DMS or binlog replication for initial data sync + ongoing CDC, then a brief cutover window (stop writes, let replication catch up, switch endpoints, verify, resume). The 3TB initial sync happens while source is live. Cutover choreography has timing estimates for each step"
|
|
54
|
+
weight: 0.35
|
|
55
|
+
description: "Near-zero downtime approach"
|
|
56
|
+
- type: llm_judge
|
|
57
|
+
criteria: "Rollback plan is viable — maintains source MySQL 5.7 as hot standby during migration, reverse replication from Aurora back to source if needed, DNS/endpoint switching allows quick rollback, and defines go/no-go criteria (data validation, application smoke tests, latency checks) before committing to the cutover"
|
|
58
|
+
weight: 0.30
|
|
59
|
+
description: "Viable rollback plan"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: enterprise-governance
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Design MySQL governance for enterprises — standardize configurations, automate query review, and implement organization-wide database health monitoring"
|
|
7
|
+
tags: [MySQL, governance, enterprise, standardization, CI-CD, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're the Director of Database Engineering at a company with 800
|
|
13
|
+
engineers and 120 MySQL databases. An audit revealed systemic issues:
|
|
14
|
+
|
|
15
|
+
- 120 databases, 25 teams, no consistent standards
|
|
16
|
+
- 40% of databases use default innodb_buffer_pool_size (128MB)
|
|
17
|
+
- 60 databases have no query-level monitoring
|
|
18
|
+
- Query performance varies 50x between teams for similar workloads
|
|
19
|
+
- 6 production incidents last year from unoptimized queries
|
|
20
|
+
- No query review before deployment
|
|
21
|
+
- Connection pooling used by only 3 teams
|
|
22
|
+
- Backups tested by 0 teams
|
|
23
|
+
|
|
24
|
+
The CTO wants a governance framework that:
|
|
25
|
+
- Standardizes MySQL configuration across all 120 databases
|
|
26
|
+
- Prevents slow queries from reaching production
|
|
27
|
+
- Ensures backup and recovery readiness
|
|
28
|
+
- Provides visibility into database health organization-wide
|
|
29
|
+
- Maintains team autonomy (no DBA bottleneck)
|
|
30
|
+
|
|
31
|
+
Your team: 4 DBAs (overwhelmed with tickets), no platform tooling.
|
|
32
|
+
|
|
33
|
+
Task: Design the governance framework. Write: the configuration
|
|
34
|
+
standards (tiered by workload size), the automated query review
|
|
35
|
+
pipeline (CI/CD integration), the monitoring standards, the backup
|
|
36
|
+
verification program, and the organizational structure.
|
|
37
|
+
|
|
38
|
+
assertions:
|
|
39
|
+
- type: llm_judge
|
|
40
|
+
criteria: "Configuration standards are tiered — defines settings for small/medium/large databases (buffer pool sizing, connection limits, innodb settings), provides a base my.cnf template, and addresses the 40% on defaults as immediate remediation. Standards are enforceable via configuration management (Ansible, Terraform) not just documentation"
|
|
41
|
+
weight: 0.35
|
|
42
|
+
description: "Tiered configuration standards"
|
|
43
|
+
- type: llm_judge
|
|
44
|
+
criteria: "Query review is automated — CI/CD pipeline captures SQL changes, runs EXPLAIN against a staging database, flags queries with full table scans or high estimated rows, blocks deployment if thresholds exceeded. Self-service: teams see results immediately without waiting for DBA review. Includes pt-query-digest analysis of test suite queries"
|
|
45
|
+
weight: 0.35
|
|
46
|
+
description: "Automated query review"
|
|
47
|
+
- type: llm_judge
|
|
48
|
+
criteria: "Monitoring and backup programs are comprehensive — unified PMM or equivalent dashboard across 120 databases, standard alerting rules (replication lag, disk space, slow queries, connections), and backup verification: automated monthly restore tests with documented RTO/RPO per database. Organizational shift from ticket-taking DBAs to platform engineering team"
|
|
49
|
+
weight: 0.30
|
|
50
|
+
description: "Monitoring and backup programs"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: executive-communication
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Communicate MySQL performance to executives — translate optimization into ROI, business impact, and strategic investment"
|
|
7
|
+
tags: [MySQL, executive-communication, ROI, business-impact, strategy, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're presenting a MySQL optimization program to the C-suite. Your
|
|
13
|
+
team spent 4 months optimizing the database infrastructure and the
|
|
14
|
+
CFO wants ROI numbers.
|
|
15
|
+
|
|
16
|
+
Optimization results:
|
|
17
|
+
1. Query optimization: Fixed 150 slow queries
|
|
18
|
+
- P99 latency: 3 seconds → 150ms (95% improvement)
|
|
19
|
+
2. Index cleanup: Removed 200 unused indexes, added 50 targeted ones
|
|
20
|
+
- Storage: reduced 15GB of unused indexes
|
|
21
|
+
- Write performance: 20% improvement
|
|
22
|
+
3. Connection pooling: Deployed ProxySQL across all services
|
|
23
|
+
- Connection-related errors: eliminated (was 500/day)
|
|
24
|
+
4. Buffer pool tuning: 128MB → 48GB
|
|
25
|
+
- Buffer pool hit ratio: 70% → 99.5%
|
|
26
|
+
- Disk reads: reduced 90%
|
|
27
|
+
5. Aurora migration for 3 clusters
|
|
28
|
+
- Failover time: 120 seconds → 30 seconds
|
|
29
|
+
- Cost increase: $5K/month
|
|
30
|
+
|
|
31
|
+
Financial context:
|
|
32
|
+
- Database infrastructure: $300K/year
|
|
33
|
+
- Engineering team (3 DBAs): $750K/year
|
|
34
|
+
- Revenue impact of downtime: $25K/minute
|
|
35
|
+
- Last year's downtime: 22 hours ($33M potential impact)
|
|
36
|
+
- This year so far: 45 minutes ($1.1M potential impact)
|
|
37
|
+
|
|
38
|
+
Task: Write the executive presentation. Include: ROI calculation,
|
|
39
|
+
technical debt assessment in business terms, scaling roadmap for 5x
|
|
40
|
+
growth, risk register, and recommended next investments.
|
|
41
|
+
|
|
42
|
+
assertions:
|
|
43
|
+
- type: llm_judge
|
|
44
|
+
criteria: "ROI is in business terms — calculates value of reduced downtime ($33M→$1.1M risk reduction), faster page loads (conversion rate impact), and compares total investment against returns. Clear ROI ratio that a CFO can understand"
|
|
45
|
+
weight: 0.35
|
|
46
|
+
description: "Business-terms ROI"
|
|
47
|
+
- type: llm_judge
|
|
48
|
+
criteria: "Technical debt is translated for executives — presents remaining optimization opportunities as business risk/cost (not technical jargon), estimates cost of inaction, and prioritizes by business impact"
|
|
49
|
+
weight: 0.35
|
|
50
|
+
description: "Executive-friendly technical debt"
|
|
51
|
+
- type: llm_judge
|
|
52
|
+
criteria: "Scaling roadmap is concrete — projects costs at 2x, 3x, 5x growth, identifies architectural inflection points (when to shard, when to add caching layer), and provides timeline with investment milestones"
|
|
53
|
+
weight: 0.30
|
|
54
|
+
description: "Concrete scaling roadmap"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: expert-optimization-shift
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Expert optimization shift — manage a multi-cluster MySQL crisis during a high-traffic event with cascading failures"
|
|
7
|
+
tags: [MySQL, shift-simulation, crisis, multi-cluster, cascading-failure, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're the database lead during Cyber Monday. Your company's MySQL
|
|
13
|
+
infrastructure spans 5 clusters. At 09:00 AM, traffic hits 5x
|
|
14
|
+
normal and cascading failures begin.
|
|
15
|
+
|
|
16
|
+
Timeline:
|
|
17
|
+
|
|
18
|
+
09:00 — Traffic starts at 5x normal. All green initially.
|
|
19
|
+
|
|
20
|
+
09:12 — Cluster A (Orders): Primary CPU 95%. ProxySQL backend
|
|
21
|
+
connection queue growing. P99 latency at 3 seconds.
|
|
22
|
+
Cause: New recommendation engine query deployed at 08:55:
|
|
23
|
+
SELECT p.* FROM products p
|
|
24
|
+
JOIN purchase_history ph ON ph.product_id = p.id
|
|
25
|
+
JOIN user_preferences up ON up.category = p.category
|
|
26
|
+
WHERE up.user_id = ?
|
|
27
|
+
ORDER BY ph.purchase_count DESC LIMIT 20;
|
|
28
|
+
Missing index on purchase_history, scanning 200M rows per request.
|
|
29
|
+
|
|
30
|
+
09:18 — Cluster B (Users): InnoDB deadlock rate 200/minute.
|
|
31
|
+
The loyalty points update is deadlocking with the cart update:
|
|
32
|
+
-- Transaction 1 (loyalty): UPDATE users SET points = points + 10...
|
|
33
|
+
-- Transaction 2 (cart): UPDATE users SET cart_total = ...
|
|
34
|
+
Both acquiring row locks on the same user rows.
|
|
35
|
+
|
|
36
|
+
09:22 — Cluster C (Inventory): Disk space at 92%. Binary logs and
|
|
37
|
+
relay logs accumulating. All 3 replicas lagging >2 minutes.
|
|
38
|
+
Cause: Massive write volume (inventory decrements for every purchase)
|
|
39
|
+
generating 2GB/hour of binlog.
|
|
40
|
+
|
|
41
|
+
09:25 — Cluster A Replica 1 removed from ProxySQL (lag > 120s).
|
|
42
|
+
All read traffic shifts to Replica 2, which also starts lagging.
|
|
43
|
+
API error rate hits 30%.
|
|
44
|
+
|
|
45
|
+
09:28 — Cluster D (Analytics): 5 long-running queries holding
|
|
46
|
+
metadata locks, blocking a scheduled ALTER TABLE that's been
|
|
47
|
+
waiting for 10 minutes. Other DDL operations queuing behind it.
|
|
48
|
+
|
|
49
|
+
09:30 — Revenue loss: $50K/minute. CEO in war room.
|
|
50
|
+
|
|
51
|
+
Task: Write the incident response. Include: immediate triage (first
|
|
52
|
+
5 minutes), stabilization plan (next 30 minutes), root cause per
|
|
53
|
+
cluster, post-incident improvements, and war-room communications.
|
|
54
|
+
|
|
55
|
+
assertions:
|
|
56
|
+
- type: llm_judge
|
|
57
|
+
criteria: "Triage is correctly prioritized — addresses the highest revenue impact first: Cluster A (kill the bad query or add emergency index, increase ProxySQL limits), then Cluster C disk space (PURGE BINARY LOGS, increase disk), then Cluster B deadlocks (separate the conflicting transactions), then Cluster D (kill waiting DDL, reschedule). Each step has a time estimate"
|
|
58
|
+
weight: 0.35
|
|
59
|
+
description: "Prioritized triage"
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "All 4 clusters are stabilized — Cluster A (add missing index or roll back deployment), Cluster B (redesign lock ordering or use optimistic locking), Cluster C (purge binlogs, add disk, tune binlog retention), Cluster D (cancel DDL, implement DDL scheduling policy). ProxySQL backend connections are restored"
|
|
62
|
+
weight: 0.35
|
|
63
|
+
description: "All clusters stabilized"
|
|
64
|
+
- type: llm_judge
|
|
65
|
+
criteria: "Post-incident improvements prevent recurrence — mandatory query review before deployment (especially before high-traffic events), deployment freeze during traffic events, binlog retention policy, disk space monitoring with 3-day projection alerts, and load testing with realistic traffic patterns before major events"
|
|
66
|
+
weight: 0.30
|
|
67
|
+
description: "Preventive improvements"
|
package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: high-availability-architecture
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Design MySQL high availability — architect InnoDB Cluster, Group Replication, and multi-region deployments for 99.99% uptime"
|
|
7
|
+
tags: [MySQL, high-availability, InnoDB-Cluster, Group-Replication, failover, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company's SLA requires 99.99% database availability (52 minutes
|
|
13
|
+
of downtime per year). Currently you have a single MySQL primary with
|
|
14
|
+
two asynchronous replicas. Last year's downtime: 22 hours.
|
|
15
|
+
|
|
16
|
+
Past incidents:
|
|
17
|
+
1. Primary disk failure (6 hours): Promoted replica manually, lost
|
|
18
|
+
45 seconds of data (async replication lag at time of failure)
|
|
19
|
+
2. Failed MySQL upgrade (8 hours): Upgraded primary, application
|
|
20
|
+
broke on MySQL 8.0 incompatibility, had to roll back
|
|
21
|
+
3. Network partition (4 hours): Primary lost connection to replicas,
|
|
22
|
+
split-brain risk, manually stopped writes until resolved
|
|
23
|
+
4. Connection storm (4 hours): 15K connections overwhelmed primary,
|
|
24
|
+
OOM kill, cascading failure to replicas
|
|
25
|
+
|
|
26
|
+
Architecture options:
|
|
27
|
+
A. InnoDB Cluster (Group Replication + MySQL Router + MySQL Shell)
|
|
28
|
+
B. Galera Cluster (synchronous multi-master)
|
|
29
|
+
C. Orchestrator + async replication (automated failover)
|
|
30
|
+
D. AWS Aurora MySQL (managed, distributed storage)
|
|
31
|
+
E. ProxySQL + async replication (read/write split, manual failover)
|
|
32
|
+
|
|
33
|
+
Requirements:
|
|
34
|
+
- 99.99% availability (<52 min/year downtime)
|
|
35
|
+
- RPO <5 seconds (max data loss)
|
|
36
|
+
- RTO <30 seconds (time to recover)
|
|
37
|
+
- Multi-AZ deployment
|
|
38
|
+
- Read scaling for analytics
|
|
39
|
+
- Zero-downtime upgrades
|
|
40
|
+
|
|
41
|
+
Current infrastructure: AWS, 3 AZs, single region.
|
|
42
|
+
|
|
43
|
+
Task: Design the HA architecture. Write: the architecture
|
|
44
|
+
recommendation with justification, the failover mechanism (automatic
|
|
45
|
+
detection and promotion), the replication topology, the zero-downtime
|
|
46
|
+
upgrade strategy, and the DR plan.
|
|
47
|
+
|
|
48
|
+
assertions:
|
|
49
|
+
- type: llm_judge
|
|
50
|
+
criteria: "Architecture is well-justified — evaluates all 5 options against requirements (availability, RPO, RTO, zero-downtime upgrades, read scaling), recommends InnoDB Cluster or Aurora with clear reasoning, and explains why async replication alone can't meet RPO <5 seconds reliably. Addresses how each past incident would be handled"
|
|
51
|
+
weight: 0.35
|
|
52
|
+
description: "Well-justified architecture"
|
|
53
|
+
- type: llm_judge
|
|
54
|
+
criteria: "Failover achieves RTO <30 seconds — automatic failure detection (health checks, consensus), automatic promotion (InnoDB Cluster election or Aurora failover), application routing (MySQL Router or Aurora endpoints), and explains the quorum mechanism that prevents split-brain (requires majority of nodes for writes)"
|
|
55
|
+
weight: 0.35
|
|
56
|
+
description: "Fast automatic failover"
|
|
57
|
+
- type: llm_judge
|
|
58
|
+
criteria: "Zero-downtime upgrades and DR are addressed — rolling upgrade strategy (upgrade secondaries, failover, upgrade old primary), or blue-green with replication. Cross-AZ deployment for local HA, with cross-region async replica for DR. RPO and RTO quantified for both local failures and regional disasters"
|
|
59
|
+
weight: 0.30
|
|
60
|
+
description: "Upgrades and DR"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: optimizer-internals
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Understand MySQL optimizer internals — learn cost-based optimization, join order selection, and how to diagnose plan instability"
|
|
7
|
+
tags: [MySQL, optimizer, cost-model, statistics, planner, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your team has a critical query that sometimes runs in 5ms and
|
|
13
|
+
sometimes in 30 seconds. The plan switches unpredictably between an
|
|
14
|
+
index scan and a full table scan. The team wants to "force" the fast
|
|
15
|
+
plan with FORCE INDEX but you want to understand root cause.
|
|
16
|
+
|
|
17
|
+
The query:
|
|
18
|
+
SELECT * FROM orders
|
|
19
|
+
WHERE status = ? AND customer_id = ?
|
|
20
|
+
ORDER BY created_at DESC LIMIT 10;
|
|
21
|
+
|
|
22
|
+
Indexes: idx_status (status), idx_customer (customer_id),
|
|
23
|
+
idx_status_customer (status, customer_id)
|
|
24
|
+
|
|
25
|
+
Fast plan (status='pending', customer_id=42):
|
|
26
|
+
- Index scan on idx_status_customer
|
|
27
|
+
- Rows examined: 15
|
|
28
|
+
- Time: 5ms
|
|
29
|
+
|
|
30
|
+
Slow plan (status='completed', customer_id=42):
|
|
31
|
+
- Full table scan with filesort
|
|
32
|
+
- Rows examined: 5,000,000
|
|
33
|
+
- Time: 30 seconds
|
|
34
|
+
|
|
35
|
+
Why the difference: 'pending' has 500 rows (0.01%), 'completed'
|
|
36
|
+
has 5M rows (50%). The optimizer estimates that scanning the index
|
|
37
|
+
for 5M rows + sorting is more expensive than a full table scan.
|
|
38
|
+
|
|
39
|
+
Additional mysteries:
|
|
40
|
+
1. ANALYZE TABLE sometimes changes the plan — why?
|
|
41
|
+
2. Histogram statistics (MySQL 8.0) — when do they help?
|
|
42
|
+
3. Optimizer trace shows different cost estimates each time — why?
|
|
43
|
+
4. Prepared statements get different plans than ad-hoc SQL — why?
|
|
44
|
+
|
|
45
|
+
Task: Explain MySQL's optimizer decision-making. Write: the cost
|
|
46
|
+
model (how MySQL estimates query cost), how statistics influence
|
|
47
|
+
estimates, why the plan switches for different parameter values,
|
|
48
|
+
when to use histograms, and best practices for plan stability.
|
|
49
|
+
|
|
50
|
+
assertions:
|
|
51
|
+
- type: llm_judge
|
|
52
|
+
criteria: "Cost model is explained — MySQL estimates cost based on disk I/O (pages to read, sequential vs random), CPU (comparisons, sorting), and memory. seq_scan cost is proportional to table size, index scan cost includes random I/O per row. When the optimizer estimates >20-30% of table rows match, it prefers full table scan over index scan because random I/O cost exceeds sequential scan cost"
|
|
53
|
+
weight: 0.35
|
|
54
|
+
description: "Cost model explained"
|
|
55
|
+
- type: llm_judge
|
|
56
|
+
criteria: "Statistics and plan instability are addressed — ANALYZE TABLE updates index cardinality estimates (InnoDB samples random pages, so estimates vary). Histograms (MySQL 8.0) provide value distribution for non-indexed columns, helping the optimizer estimate selectivity for skewed data. The plan switches because 'pending' (0.01%) vs 'completed' (50%) have vastly different selectivity"
|
|
57
|
+
weight: 0.35
|
|
58
|
+
description: "Statistics and instability"
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "Practical stability recommendations are provided — a composite index (status, customer_id, created_at) handles both cases efficiently, histogram on status column helps optimizer with skewed distributions, optimizer hints as short-term fix, and ANALYZE TABLE schedule for up-to-date statistics"
|
|
61
|
+
weight: 0.30
|
|
62
|
+
description: "Stability recommendations"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: performance-sla-design
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Design MySQL performance SLAs — define latency budgets, throughput targets, and capacity planning for enterprise workloads"
|
|
7
|
+
tags: [MySQL, SLA, performance, latency, capacity-planning, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company is formalizing database performance SLAs. The platform
|
|
13
|
+
serves 30M daily active users across 8 product teams. There are no
|
|
14
|
+
documented standards — teams say "the database should be fast" but
|
|
15
|
+
there's no definition of "fast."
|
|
16
|
+
|
|
17
|
+
Current state:
|
|
18
|
+
- 10 MySQL clusters (mix of RDS and Aurora)
|
|
19
|
+
- P50: 3ms, P95: 30ms, P99: 300ms, P99.9: 3 seconds
|
|
20
|
+
- The P99.9 tail causes user-visible timeouts
|
|
21
|
+
- No query budget per team — one team's query impacts others
|
|
22
|
+
- No capacity planning — discover limits during traffic spikes
|
|
23
|
+
|
|
24
|
+
Product teams:
|
|
25
|
+
1. Checkout (critical): Needs <5ms P99 for payment queries
|
|
26
|
+
2. Product Search: Needs <50ms P95 for search results
|
|
27
|
+
3. Analytics: 15-minute aggregation queries, needs throughput
|
|
28
|
+
4. Notifications: Burst writes 30K/sec during campaigns
|
|
29
|
+
5. User Profile: Read-heavy, needs 99.99% availability
|
|
30
|
+
|
|
31
|
+
The VP asks:
|
|
32
|
+
- "What should our database SLAs be?"
|
|
33
|
+
- "How do we prevent one team from degrading another?"
|
|
34
|
+
- "When do we need to add capacity?"
|
|
35
|
+
|
|
36
|
+
Task: Design the performance SLA framework. Write: tiered SLA
|
|
37
|
+
definitions, latency budget allocation per team, capacity planning
|
|
38
|
+
model, isolation strategy, and cost-performance trade-off analysis.
|
|
39
|
+
|
|
40
|
+
assertions:
|
|
41
|
+
- type: llm_judge
|
|
42
|
+
criteria: "SLA tiers are defined with specific metrics — at least 3 tiers (critical/standard/batch) with latency targets (P50, P95, P99), throughput limits, and availability per tier. Maps the 5 teams to appropriate tiers. Critical tier (checkout) has strictest requirements"
|
|
43
|
+
weight: 0.35
|
|
44
|
+
description: "Specific SLA tiers"
|
|
45
|
+
- type: llm_judge
|
|
46
|
+
criteria: "Isolation strategy prevents noisy neighbors — separate clusters or ProxySQL query routing per team, connection limits per team/service, query timeout enforcement (MAX_EXECUTION_TIME), and resource groups (MySQL 8.0) for CPU allocation. Explains how to detect approaching limits before incidents"
|
|
47
|
+
weight: 0.35
|
|
48
|
+
description: "Noisy neighbor isolation"
|
|
49
|
+
- type: llm_judge
|
|
50
|
+
criteria: "Capacity planning is quantified — utilization thresholds for scaling (70% CPU triggers planning, 85% triggers action), growth projections based on historical data, lead time for provisioning, and the cost of each SLA tier to help teams make informed decisions"
|
|
51
|
+
weight: 0.30
|
|
52
|
+
description: "Quantified capacity planning"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: read-replica-scaling
|
|
3
|
+
level: 4
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Scale MySQL reads — design read replica topology, implement intelligent routing, and manage replication lag for consistency"
|
|
7
|
+
tags: [MySQL, read-replicas, replication, routing, consistency, scaling, expert]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your platform serves 100K read QPS and the primary is at 90% CPU.
|
|
13
|
+
You have 3 read replicas but they're not helping enough — load is
|
|
14
|
+
uneven, some replicas are lagging, and users see stale data after
|
|
15
|
+
updates.
|
|
16
|
+
|
|
17
|
+
Current architecture:
|
|
18
|
+
- Primary: db.r6g.4xlarge, 100K QPS total (30K writes, 70K reads)
|
|
19
|
+
- Replica 1: db.r6g.4xlarge — API reads (overloaded)
|
|
20
|
+
- Replica 2: db.r6g.2xlarge — analytics (lagging 60s)
|
|
21
|
+
- Replica 3: db.r6g.2xlarge — mostly idle (recently added)
|
|
22
|
+
|
|
23
|
+
Problems:
|
|
24
|
+
1. Stale reads: User updates profile, refreshes, sees old data
|
|
25
|
+
(read went to replica lagging 5 seconds)
|
|
26
|
+
2. Uneven load: Round-robin routing sends equal traffic to all
|
|
27
|
+
replicas despite different sizes
|
|
28
|
+
3. Replica 2 lag: Analytics queries consume all CPU, SQL applier
|
|
29
|
+
can't keep up, lag grows to 60 seconds
|
|
30
|
+
4. No lag-aware routing: Application connects to replicas regardless
|
|
31
|
+
of their lag
|
|
32
|
+
5. Failover: When primary fails, which replica to promote?
|
|
33
|
+
|
|
34
|
+
Task: Design the read replica scaling architecture. Write: the
|
|
35
|
+
replica topology, the routing strategy (ProxySQL or MySQL Router),
|
|
36
|
+
the read-after-write consistency solution, the lag monitoring and
|
|
37
|
+
management, and the promotion criteria for failover.
|
|
38
|
+
|
|
39
|
+
assertions:
|
|
40
|
+
- type: llm_judge
|
|
41
|
+
criteria: "Routing strategy is intelligent — uses ProxySQL or MySQL Router with weighted distribution (larger instances get more traffic), lag-aware routing (remove replicas exceeding lag threshold from pool), and workload separation (dedicated replicas for analytics vs OLTP reads)"
|
|
42
|
+
weight: 0.35
|
|
43
|
+
description: "Intelligent routing"
|
|
44
|
+
- type: llm_judge
|
|
45
|
+
criteria: "Read-after-write consistency is solved — implements session-based routing (reads after a write go to primary for N seconds), or GTID-based routing (route to replica only if it has applied the GTID from the user's last write), or application-level cache invalidation. Explains trade-offs of each approach"
|
|
46
|
+
weight: 0.35
|
|
47
|
+
description: "Read-after-write consistency"
|
|
48
|
+
- type: llm_judge
|
|
49
|
+
criteria: "Lag management and failover are addressed — monitors Seconds_Behind_Source per replica, auto-removes lagging replicas from read pool, separates analytics to prevent lag on OLTP replicas, and defines promotion criteria (lowest lag, same instance size as primary, sync replica if available)"
|
|
50
|
+
weight: 0.30
|
|
51
|
+
description: "Lag and failover management"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: ai-database-future
|
|
3
|
+
level: 5
|
|
4
|
+
course: mysql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Explore AI-powered MySQL optimization — evaluate autonomous tuning, AI query optimization, and the evolving DBA role"
|
|
7
|
+
tags: [MySQL, AI, autonomous-tuning, machine-learning, future, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your CTO asks you to evaluate how AI will transform MySQL operations
|
|
13
|
+
and recommend which AI-powered technologies to invest in.
|
|
14
|
+
|
|
15
|
+
Current AI-database landscape:
|
|
16
|
+
1. Autonomous tuning (OtterTune/Releem): ML-based my.cnf optimization
|
|
17
|
+
2. AI query optimization: learned optimizers replacing cost-based
|
|
18
|
+
3. AI-powered indexing: automatic index recommendations
|
|
19
|
+
4. AI monitoring: anomaly detection, predictive alerting
|
|
20
|
+
5. Natural language to SQL: text-to-SQL for non-technical users
|
|
21
|
+
6. MySQL HeatWave: Oracle's ML-in-database for analytics
|
|
22
|
+
|
|
23
|
+
Evaluation criteria:
|
|
24
|
+
- Production readiness
|
|
25
|
+
- ROI vs complexity
|
|
26
|
+
- Risk when AI is wrong
|
|
27
|
+
- Team skill requirements
|
|
28
|
+
|
|
29
|
+
Task: Write the technology evaluation. Include: assessment of each
|
|
30
|
+
technology, adoption roadmap, text-to-SQL safety framework, and
|
|
31
|
+
prediction of how the DBA role evolves.
|
|
32
|
+
|
|
33
|
+
assertions:
|
|
34
|
+
- type: llm_judge
|
|
35
|
+
criteria: "Technologies are honestly assessed — autonomous tuning (semi-ready, good ROI), learned optimizers (research stage), index advisors (ready), AI monitoring (production-ready, high ROI), text-to-SQL (risky without guardrails), HeatWave (production-ready for analytics). Avoids both hype and dismissiveness"
|
|
36
|
+
weight: 0.35
|
|
37
|
+
description: "Honest assessment"
|
|
38
|
+
- type: llm_judge
|
|
39
|
+
criteria: "Adoption roadmap is practical — separates 'adopt now' (AI monitoring, index advisors), 'evaluate' (autonomous tuning, text-to-SQL), and 'watch' (learned optimizers). Each has implementation complexity and expected timeline"
|
|
40
|
+
weight: 0.35
|
|
41
|
+
description: "Practical roadmap"
|
|
42
|
+
- type: llm_judge
|
|
43
|
+
criteria: "DBA role evolution and safety are addressed — AI augments not replaces DBAs, text-to-SQL needs guardrails (read-only, query cost limits, audit logging), and the shift from manual tuning to AI supervision"
|
|
44
|
+
weight: 0.30
|
|
45
|
+
description: "DBA evolution and safety"
|