feat: CDN edge caching, DB query monitoring, ETag middleware, job priority management#822
Merged
Ebuka321 merged 1 commit intoJul 27, 2026
Conversation
…ority management a. CDN edge caching - app.json: add extra.cdn config (origin shield, TTLs, regions, warm paths) - metro.config.js: explicit assetExts for CDN content-hash filenames - scripts/cdn-cache-warm.sh: post-deploy surrogate-key purge + cache warming - scripts/cdn-regional-monitor.js: Fastly real-time per-region hit-rate monitoring - docs/cdn-edge-caching.md: full CDN architecture documentation b. Database query performance monitoring - backend/shared/query/queryPerformanceMonitor.ts: extends SlowQueryMonitor with EXPLAIN ANALYZE integration, seq/index scan tracking, index recommendation engine (high/medium/low severity), query plan analysis, alert ring-buffer, Prometheus metrics, and dashboard snapshot - backend/server.ts: add GET /metrics/db-performance endpoint - docs/database-performance.md: query logging, slow detection, index stats docs c. ETag caching middleware - backend/shared/middleware/etagMiddleware.ts: SHA-256 strong ETags, If-None-Match -> 304 Not Modified, per-path Cache-Control (plans 5m, features 10m, public 1h, no-store for graphql/health/metrics), stale-while-revalidate=60, auth bypass - backend/shared/middleware/index.ts: export new ETag symbols - backend/server.ts: wire applyETagToRawHandler into HTTP server - docs/etag-caching.md: ETag generation, 304 flow, TTL table, auth bypass docs d. Job priority management - backend/shared/queue/retryPolicy.ts: exponential backoff with full-jitter, per-priority max attempts (critical=10, high=7, normal=5, low=3) - backend/shared/queue/deadLetterQueue.ts: in-memory ring-buffer + BullMQ persistence, 7-day retention, replay support, onDeadLetter callback - backend/shared/queue/jobRateLimiter.ts: sliding-window token bucket per service, pre-configured defaults for Stripe/SendGrid/Twilio/Expo/blockchain-rpc - backend/shared/queue/jobScheduler.ts: 6-field cron scheduler on WeightedFairQueue, second-boundary debounce, skipIfRunning guard, manual fireNow() for testing - backend/shared/queue/jobMonitoringDashboard.ts: unified snapshot from WFQ + DLQ + rate limiter + cron scheduler, health states, Prometheus metrics export - backend/shared/queue/index.ts: export all new queue symbols - docs/job-queue.md: priority table, retry formula, DLQ replay, cron docs
|
@bulusmalaga Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #762
closes #763
closes #764
closes #765
feat: CDN edge caching, DB query monitoring, ETag middleware, job priority management
a. CDN edge caching
b. Database query performance monitoring
EXPLAIN ANALYZE integration, seq/index scan tracking, index recommendation
engine (high/medium/low severity), query plan analysis, alert ring-buffer,
Prometheus metrics, and dashboard snapshot
c. ETag caching middleware
-> 304 Not Modified, per-path Cache-Control (plans 5m, features 10m, public 1h,
no-store for graphql/health/metrics), stale-while-revalidate=60, auth bypass
d. Job priority management
per-priority max attempts (critical=10, high=7, normal=5, low=3)
persistence, 7-day retention, replay support, onDeadLetter callback
pre-configured defaults for Stripe/SendGrid/Twilio/Expo/blockchain-rpc
second-boundary debounce, skipIfRunning guard, manual fireNow() for testing