Repository navigation
feat: resolve cache stampede, encryption at rest, pool monitoring, and token refresh (#518, #519, #520, #521) - #549
Merged
ritaifeoluwa merged 1 commit intoOct 18, 2026
Conversation
…abs#520, and SmartDropLabs#521 - SmartDropLabs#518: Implement cache stampede protection with SingleFlight, distributed Redis locking, and background refresh - SmartDropLabs#519: Implement database field-level AES-256-GCM encryption at rest with blind indexing support - SmartDropLabs#520: Implement database connection pool monitoring, metrics, and Prometheus exporter - SmartDropLabs#521: Implement token refresh mechanism with Refresh Token Rotation and reuse detection
|
@ngoziimmaculatar-star 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.
Summary of Changes
This pull request resolves issues #518, #519, #520, and #521 across caching, database security, connection pool observability, and authentication.
1. Cache Stampede Protection (Closes #518)
src/cache/stampede.jsandsrc/cache/index.jswith:fetchWithLockintosrc/services/dbCache.jsto protect database queries against thundering herd stampedes on cache expiry.test/cacheStampede.test.js.2. Database Encryption at Rest (Closes #519)
src/database/encryption.js.enc:v1:<iv>:<ciphertext>:<authTag>for reliable detection and transparent legacy plaintext compatibility.encryptRecord,decryptRecord,encryptRows,decryptRows).hashBlindIndex) to allow exact-match queries on encrypted sensitive columns.DB_ENCRYPTION_KEYconfiguration tosrc/config.js.src/database/index.js.test/databaseEncryption.test.js.3. Database Connection Pool Monitoring (Closes #520)
PoolMonitorinsrc/database/poolMonitor.jstracking:acquireRequest,acquireSuccess,acquireFail,release,createRequest,createSuccess,createFail,destroyRequest,destroySuccess).healthy,warning,critical) with configurable threshold alert callbacks.toPrometheusMetrics()).src/database/index.js(getPoolStats(),getPoolMetrics(), auto-attach on pool creation).src/routes/metrics.jsfor the/metricsendpoint.test/poolMonitor.test.js.4. Token Refresh Mechanism (Closes #521)
src/auth/tokenRefresh.js.createRefreshHandlerandcreateRevokeHandlerforPOST /auth/refreshandPOST /auth/revoke.src/auth/index.jsandsrc/auth/authService.js.test/tokenRefresh.test.js.Closes #518
Closes #519
Closes #520
Closes #521