Skip to content

Commit 2938cdb

Browse files
committed
Add imports to articles for Mermaid image files
1 parent 49ed282 commit 2938cdb

73 files changed

Lines changed: 717 additions & 3663 deletions

File tree

  • src
    • content/articles
      • api-deprecation-sunset-headers-consumer-migration
      • api-gateway-metrics-traces-logs-debugging
      • api-usage-metering-quotas-cost-attribution
      • availability-targets-five-nines-cost-benefit-analysis
      • backpressure-load-shedding-admission-control-overload
      • blameless-postmortem-incident-analysis-systemic-causes
      • blue-green-canary-deployment-strategy-comparison
      • cdn-edge-caching-cache-keys-vary-headers
      • chaos-engineering-failure-injection-low-cost-experiments
      • circuit-breaker-retry-budget-cascade-failure-prevention
      • consumer-driven-contract-testing-pact-internal-apis
      • container-vulnerability-scanning-ci-shift-left-security
      • database-schema-migrations-continuous-deployment-zero-downtime
      • dead-letter-queue-design-replay-debugging
      • distributed-tracing-sampling-strategies-head-tail
      • eol-runtime-upgrade-dependency-hell-migration
      • ephemeral-preview-environments-cost-control-cleanup
      • flaky-test-diagnosis-race-conditions-e2e-stabilization
      • helm-release-management-drift-detection-debugging
      • idempotent-message-handlers-deduplication-retries
      • internal-developer-portal-platform-self-service-actions
      • kubernetes-decision-framework-when-not-to-use
      • kubernetes-dns-debugging-ndots-coredns-troubleshooting
      • kubernetes-hpa-autoscaling-metrics-tuning-latency
      • kubernetes-ingress-gateway-api-comparison-migration
      • kubernetes-multi-cluster-fleet-management-configuration
      • kubernetes-pod-disruption-budget-autoscaler-node-rotation
      • kubernetes-pod-resource-requests-limits-qos-classes
      • kubernetes-secrets-external-secrets-operator-csi-vault
      • legacy-code-testing-characterization-tests-seams
      • monorepo-affected-builds-remote-caching-ci-optimization
      • mtls-certificate-rotation-service-mesh-authentication
      • nginx-haproxy-reverse-proxy-production-tuning
      • on-call-rotation-small-teams-sustainable-coverage
      • opa-conftest-policy-as-code-infrastructure-guardrails
      • opentelemetry-span-design-granularity-overhead
      • performance-testing-load-models-benchmark-accuracy
      • platform-architecture-control-plane-data-plane-separation
      • postgresql-connection-pooling-saturation-sizing
      • private-networking-dns-routing-tls-debugging
      • prometheus-high-cardinality-metrics-label-design
      • rate-limiting-token-bucket-leaky-bucket-implementation
      • release-quality-gates-automated-deployment-validation
      • reverse-engineering-documentation-legacy-systems
      • slo-error-budget-practical-guide
      • slsa-build-provenance-artifact-signing-supply-chain
      • strangler-fig-migration-complete-guide
      • structured-logging-correlation-ids-log-schema-design
      • symptom-based-alerting-runbooks-alert-design
      • terraform-module-design-defaults-versioning-interfaces
      • terraform-state-locking-corruption-recovery-backend
      • workload-identity-federation-keyless-cloud-authentication
    • pages/testing/comps

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎_TODO.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ https://mermaid.js.org/config/directives.html
274274

275275
- Add a "Preview Special" item to our Download CTA that lets the user know the Deep Dive content can be previewed in HTML format, and offer a switch to it.
276276

277+
- How can we handle footnotes in List components? src/content/articles/kubernetes-multi-cluster-fleet-management-configuration/pdf.mdx line 80
278+
277279
### This file was badly mangled during refactoring, need to compare against original:
278280

279281
src/content/articles/internal-developer-portal-platform-self-service-actions/pdf.mdx

‎src/content/articles/api-deprecation-sunset-headers-consumer-migration/pdf.mdx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,7 @@ The core visualizations:
294294

295295
<Diagram
296296
title="Consumer migration status breakdown for deprecation tracking"
297-
description={
298-
`Pie chart showing the migration status of consumers using a deprecated API. The largest slice is Migrated at 45 percent, indicating that nearly half of consumers have fully moved to the new version. The next largest slice is In Progress at 25 percent, representing consumers actively using both the old and new APIs during migration. Not Started accounts for 20 percent, showing a significant minority still using only the deprecated API. The smallest slice is Blocked at 10 percent, representing consumers who have not migrated because they need additional support, approvals, or technical help. Overall, the chart shows that most consumers have either completed migration or started it, but 30 percent still require intervention before deprecation can be completed safely.`
299-
}
297+
description="Pie chart showing the migration status of consumers using a deprecated API. The largest slice is Migrated at 45 percent, indicating that nearly half of consumers have fully moved to the new version. The next largest slice is In Progress at 25 percent, representing consumers actively using both the old and new APIs during migration. Not Started accounts for 20 percent, showing a significant minority still using only the deprecated API. The smallest slice is Blocked at 10 percent, representing consumers who have not migrated because they need additional support, approvals, or technical help. Overall, the chart shows that most consumers have either completed migration or started it, but 30 percent still require intervention before deprecation can be completed safely."
300298
>
301299
```mermaid
302300
pie

‎src/content/articles/api-gateway-metrics-traces-logs-debugging/pdf.mdx‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ The fundamental difference is scope: every request passes through the gateway. W
5050
<Diagram
5151
src={apiGatewayDiagram}
5252
title="API gateway as the central observation point for all traffic"
53-
description={
54-
`Flowchart showing the API gateway positioned between a consumer and multiple downstream components. A Consumer sends requests to the API Gateway. From the gateway, traffic can go to an Auth Service, a Rate Limiter, Backend A, and Backend B. A grouped region labeled Gateway Boundary contains the API Gateway, Auth Service, and Rate Limiter, emphasizing that these components sit at the control point through which all requests pass. The diagram shows why the gateway is a unique observation point: it sees every request before it reaches the backend services and can record both control-plane decisions, such as authentication and rate limiting, and routing decisions to different backends.`
55-
}
53+
description="Flowchart showing the API gateway positioned between a consumer and multiple downstream components. A Consumer sends requests to the API Gateway. From the gateway, traffic can go to an Auth Service, a Rate Limiter, Backend A, and Backend B. A grouped region labeled Gateway Boundary contains the API Gateway, Auth Service, and Rate Limiter, emphasizing that these components sit at the control point through which all requests pass. The diagram shows why the gateway is a unique observation point: it sees every request before it reaches the backend services and can record both control-plane decisions, such as authentication and rate limiting, and routing decisions to different backends."
5654
/>
5755

5856
The gateway also adds its own latency that frequently gets blamed on backends. Authentication checks, rate limit lookups, request transformation, response transformation, TLS termination — these all take time. When users complain about slow APIs, the default assumption is that backends are slow, but I have seen gateway overhead account for 200ms+ on requests where the backend responded in 50ms.
@@ -169,9 +167,7 @@ The single most useful gateway metric is not total request duration — it is th
169167
<Diagram
170168
src={requestLifecycleDiagram}
171169
title="Request lifecycle showing gateway vs. backend latency components"
172-
description={
173-
`Flowchart showing a request moving left to right through ten stages. The sequence begins with Request Received, then passes through TLS Handshake, Request Parse, Auth Check, Rate Limit Check, Route Match, Upstream Request, Backend Processing, Response Transform, and Response Sent. Two grouped regions separate where time is spent. A Gateway Time group contains TLS Handshake, Request Parse, Auth Check, Rate Limit Check, Route Match, Upstream Request, Response Transform, and Response Sent, representing work performed or coordinated by the gateway. A separate Backend Time group contains only Backend Processing, representing the actual time spent inside the upstream service. The diagram emphasizes that total latency is a combination of gateway-side work and backend execution, and that debugging requires measuring those components separately.`
174-
}
170+
description="Flowchart showing a request moving left to right through ten stages. The sequence begins with Request Received, then passes through TLS Handshake, Request Parse, Auth Check, Rate Limit Check, Route Match, Upstream Request, Backend Processing, Response Transform, and Response Sent. Two grouped regions separate where time is spent. A Gateway Time group contains TLS Handshake, Request Parse, Auth Check, Rate Limit Check, Route Match, Upstream Request, Response Transform, and Response Sent, representing work performed or coordinated by the gateway. A separate Backend Time group contains only Backend Processing, representing the actual time spent inside the upstream service. The diagram emphasizes that total latency is a combination of gateway-side work and backend execution, and that debugging requires measuring those components separately."
175171
/>
176172

177173
At minimum, instrument these separately:
@@ -357,9 +353,7 @@ The gateway creates its own span as a child of the incoming span, then creates n
357353
<Diagram
358354
src={traceContextDiagram}
359355
title="Trace context propagation creating connected spans across gateway boundary"
360-
description={
361-
`Sequence diagram showing how a single distributed trace continues across a client, gateway, auth service, and backend. The client sends a request to the gateway with a traceparent header containing trace ID abc and span ID 123. The gateway creates its own span as a child of that incoming request. The gateway then calls the auth service with the same trace ID but a new span ID 456, receives the auth response, and forwards the request to the backend with the same trace ID and another new span ID 789. The backend returns a response to the gateway, which then responds to the client. A note across the full diagram states that all spans share the same trace ID abc, emphasizing that the trace remains connected even though each hop creates a new span.`
362-
}
356+
description="Sequence diagram showing how a single distributed trace continues across a client, gateway, auth service, and backend. The client sends a request to the gateway with a traceparent header containing trace ID abc and span ID 123. The gateway creates its own span as a child of that incoming request. The gateway then calls the auth service with the same trace ID but a new span ID 456, receives the auth response, and forwards the request to the backend with the same trace ID and another new span ID 789. The backend returns a response to the gateway, which then responds to the client. A note across the full diagram states that all spans share the same trace ID abc, emphasizing that the trace remains connected even though each hop creates a new span."
363357
/>
364358

365359
Common propagation failures I have seen:
@@ -774,9 +768,7 @@ The layout matters. Arrange panels so that related information is grouped and th
774768
<Diagram
775769
src={gatewayDashboardDiagram}
776770
title="Gateway dashboard layout with logical panel grouping"
777-
description={
778-
`Top-to-bottom flowchart showing a dashboard organized into four rows. The first row, labeled Row 1 Health Overview, contains Request Rate, Error Rate, and P99 Latency panels for immediate high-level status. The second row, labeled Row 2 Upstream Status, contains Upstream Health Map and Circuit Breaker States panels to show backend health. The third row, labeled Row 3 Traffic Breakdown, contains Top Routes, Top Consumers, and Error Distribution panels for traffic analysis. The fourth row, labeled Row 4 Latency Analysis, contains Gateway vs Backend Latency, Latency by Route, and Slow Request Percent panels for performance investigation. Arrows connect row 1 to row 2, row 2 to row 3, and row 3 to row 4, showing an intended reading order from broad health signals to detailed diagnostic panels.`
779-
}
771+
description="Top-to-bottom flowchart showing a dashboard organized into four rows. The first row, labeled Row 1 Health Overview, contains Request Rate, Error Rate, and P99 Latency panels for immediate high-level status. The second row, labeled Row 2 Upstream Status, contains Upstream Health Map and Circuit Breaker States panels to show backend health. The third row, labeled Row 3 Traffic Breakdown, contains Top Routes, Top Consumers, and Error Distribution panels for traffic analysis. The fourth row, labeled Row 4 Latency Analysis, contains Gateway vs Backend Latency, Latency by Route, and Slow Request Percent panels for performance investigation. Arrows connect row 1 to row 2, row 2 to row 3, and row 3 to row 4, showing an intended reading order from broad health signals to detailed diagnostic panels."
780772
/>
781773

782774
Row 1 gives you immediate health status — if everything is green, you can stop looking. Row 2 shows backend status, helping you quickly identify if a problem is gateway-side or upstream-side. Rows 3 and 4 provide the detail needed to narrow down issues to specific routes or consumers.

‎src/content/articles/api-usage-metering-quotas-cost-attribution/pdf.mdx‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ For storage-backed APIs (document processing, media transcoding, backup systems)
8787
<Diagram
8888
src={meteringDataDiagram}
8989
title="Metering data flow from API request to billing and enforcement systems"
90-
description={
91-
`Flowchart showing how an API request becomes billing and quota data. An API Request enters a decision point labeled Metering Points. From there, the request is measured across five dimensions: Request Count, Request Size, Response Size, Compute Duration, and Storage Delta. All five measurements feed into a single Usage Record. That usage record then flows into an Aggregation Pipeline, which distributes the aggregated data to three downstream systems: Billing System, Analytics, and Quota Enforcement. The diagram emphasizes that the same metering event supports cost reporting, product analysis, and quota control.`
92-
}
90+
description="Flowchart showing how an API request becomes billing and quota data. An API Request enters a decision point labeled Metering Points. From there, the request is measured across five dimensions: Request Count, Request Size, Response Size, Compute Duration, and Storage Delta. All five measurements feed into a single Usage Record. That usage record then flows into an Aggregation Pipeline, which distributes the aggregated data to three downstream systems: Billing System, Analytics, and Quota Enforcement. The diagram emphasizes that the same metering event supports cost reporting, product analysis, and quota control."
9391
/>
9492

9593
### Metering Architecture Patterns
@@ -294,9 +292,7 @@ Token buckets are elegant for smoothing usage. Instead of "1 million requests pe
294292
<Diagram
295293
src={quotaEnforcementDiagram}
296294
title="Quota enforcement decision flow with soft limits and burst allowance"
297-
description={
298-
`Flowchart showing how each request is checked against quota rules. A Request enters a decision point labeled Check Quota. If the request is under the limit, it is allowed and the main counter is decremented. If it reaches the soft limit, it is still allowed but also triggers an alert before the main counter is decremented. If it reaches the hard limit, a second decision checks whether burst capacity is available. If burst capacity exists, the request is allowed from the burst pool and the burst counter is decremented. If no burst capacity remains, the request is rejected with HTTP 429. The diagram shows how soft limits provide warning, hard limits enforce plan boundaries, and burst allowances absorb short traffic spikes.`
299-
}
295+
description="Flowchart showing how each request is checked against quota rules. A Request enters a decision point labeled Check Quota. If the request is under the limit, it is allowed and the main counter is decremented. If it reaches the soft limit, it is still allowed but also triggers an alert before the main counter is decremented. If it reaches the hard limit, a second decision checks whether burst capacity is available. If burst capacity exists, the request is allowed from the burst pool and the burst counter is decremented. If no burst capacity remains, the request is rejected with HTTP 429. The diagram shows how soft limits provide warning, hard limits enforce plan boundaries, and burst allowances absorb short traffic spikes."
300296
/>
301297

302298
### Rate Limiting vs. Quota Enforcement
@@ -514,9 +510,7 @@ Three common approaches:
514510
<Diagram
515511
src={costAttributionDiagram}
516512
title="Cost attribution flow from infrastructure costs to consumer invoices"
517-
description={
518-
`Flowchart showing how infrastructure spending becomes charges for consumers. Infrastructure Costs feed into a Cost Pool. That pool enters a decision point labeled Allocation Method, which branches into three pricing strategies: Direct Attribution, Proportional Allocation, and Tiered Pricing. Direct Attribution leads to Per-Request Cost, Proportional Allocation leads to Percent of Total Usage, and Tiered Pricing leads to Volume Discounts. All three calculated paths feed into a final Consumer Invoice. The diagram highlights that the same underlying operating cost can be turned into invoices through different allocation strategies depending on pricing goals, fairness, and customer behavior.`
519-
}
513+
description="Flowchart showing how infrastructure spending becomes charges for consumers. Infrastructure Costs feed into a Cost Pool. That pool enters a decision point labeled Allocation Method, which branches into three pricing strategies: Direct Attribution, Proportional Allocation, and Tiered Pricing. Direct Attribution leads to Per-Request Cost, Proportional Allocation leads to Percent of Total Usage, and Tiered Pricing leads to Volume Discounts. All three calculated paths feed into a final Consumer Invoice. The diagram highlights that the same underlying operating cost can be turned into invoices through different allocation strategies depending on pricing goals, fairness, and customer behavior."
520514
/>
521515

522516
Most internal APIs start with direct attribution (simple to explain) then move to proportional allocation once they realize different usage patterns have different costs. External APIs almost always use tiered pricing because it creates better business incentives.
@@ -704,9 +698,7 @@ The flow is consistent regardless of the destination:
704698
<Diagram
705699
src={endToEndBillingDiagram}
706700
title="End-to-end billing flow from API usage to payment processing"
707-
description={
708-
`Sequence diagram showing how API usage becomes a bill and then updates quota state. The API sends a Usage Event to Metering. Metering deduplicates the event and forwards Buffered Events to Aggregation. A note marks Aggregation as an hourly rollup job. Aggregation calculates costs and sends a Period Summary to Billing. Another note marks Billing as operating at the end of the billing period. Billing generates an invoice, charges the customer through Payment, receives a confirmation, and then updates quota limits back in the API system. The diagram emphasizes that usage collection, aggregation, invoicing, payment processing, and quota management form one connected lifecycle.`
709-
}
701+
description="Sequence diagram showing how API usage becomes a bill and then updates quota state. The API sends a Usage Event to Metering. Metering deduplicates the event and forwards Buffered Events to Aggregation. A note marks Aggregation as an hourly rollup job. Aggregation calculates costs and sends a Period Summary to Billing. Another note marks Billing as operating at the end of the billing period. Billing generates an invoice, charges the customer through Payment, receives a confirmation, and then updates quota limits back in the API system. The diagram emphasizes that usage collection, aggregation, invoicing, payment processing, and quota management form one connected lifecycle."
710702
/>
711703

712704
The key decision point is timing. Do you report usage continuously (every hour, every day) or only at the end of the billing period? Continuous reporting gives consumers real-time visibility into costs but requires more API calls to the billing platform. End-of-period reporting is simpler but consumers don't see costs until the bill arrives.
@@ -873,9 +865,7 @@ The layout matters. Put the most important information at the top — current us
873865
<Diagram
874866
src={consumerUsageDiagram}
875867
title="Consumer usage dashboard layout with logical panel grouping"
876-
description={
877-
`Left-to-right dashboard layout organized into four grouped sections. Row 1 Overview contains Monthly Usage Gauge showing 4.5 million of 10 million requests, Projected Cost showing a 450 dollar estimate, and Days Remaining showing 15 days left. Row 2 Trends contains Daily Usage Time Series for the last 30 days and Usage versus Previous Month showing a 15 percent increase. Row 3 Breakdown contains Usage by Endpoint for the top 10 routes, Usage by Region for geographic split, and Cost by Dimension for requests, compute, and egress. Row 4 Alerts contains Quota Alerts showing no alerts and Anomaly Detection showing a usage spike detected. The layout moves from current status to trends, then breakdowns, then alerting.`
878-
}
868+
description="Left-to-right dashboard layout organized into four grouped sections. Row 1 Overview contains Monthly Usage Gauge showing 4.5 million of 10 million requests, Projected Cost showing a 450 dollar estimate, and Days Remaining showing 15 days left. Row 2 Trends contains Daily Usage Time Series for the last 30 days and Usage versus Previous Month showing a 15 percent increase. Row 3 Breakdown contains Usage by Endpoint for the top 10 routes, Usage by Region for geographic split, and Cost by Dimension for requests, compute, and egress. Row 4 Alerts contains Quota Alerts showing no alerts and Anomaly Detection showing a usage spike detected. The layout moves from current status to trends, then breakdowns, then alerting."
879869
/>
880870

881871
Projected month-end usage is critical. If a consumer is at 50% of their quota with 25% of the month remaining, they're on track to use 200% of their quota. Show them this projection so they can optimize before hitting limits.

0 commit comments

Comments
 (0)