Repository navigation
docs: add Redis usage and caching architecture reference - #297
Merged
Merged
Conversation
Catalog every Redis consumer in the backend with its key patterns, TTLs, configuration and failure behaviour, so new features have a single source of truth and a namespace convention to follow. - Consumer inventory: ETA cache, idempotency store, Redlock escrow/assignment locks, driver-location dedup, admin dashboard cache. - Documents that the socket message queue is in-process and that driver availability claims are MongoDB, not Redis. - Redlock settings, locked operations, TTL/retry semantics, and the fail-open vs fail-closed behaviour per subsystem. - Key-namespace convention, connection lifecycle, config reference and a troubleshooting table. Refs SwiftChainn#270
|
@dhikbass 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! 🚀 |
Collaborator
|
@dhikbass |
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.
Overview
Adds
backend/docs/redis.md, a reference cataloguing every Redis consumer in the backend: the keys it owns, their TTLs, the commands used, and exactly what degrades when Redis is unavailable. It also documents the Redlock usage, the key-namespace convention for new features, the connection lifecycle, and a troubleshooting table.While writing it against the source, two assumptions in older notes turned out to be wrong and are corrected in the doc: the Socket.IO message queue is an in-process
Map(not Redis), and driver availability claims are atomic MongoDBfindOneAndUpdatecalls (not Redis keys).Related Issue
Closes #270
Changes
backend/docs/redis.md— Redis usage and caching architecture reference.Documentation-only change. No runtime behaviour is modified.
Verification Results
The change is a single new Markdown file; it is not read by ESLint,
tsc, or Jest, so no runtime check is affected. Every source file cited in the doc was confirmed to exist, and every key/TTL/command was read from the implementation rather than inferred.Baseline status of the repository at the time of writing (unchanged by this PR, reproduced on a clean clone before adding the file):
Reviewers should run the same commands; this PR does not change any of those results. I did not fix the unrelated baseline errors because the issue is scoped to documentation.
backend/docs/redis.md→ "Consumer inventory" tableescrow:release:<id>,assignment:delivery:<id>)prefix:entity:id:field)initializeRedis/disconnectRedislifecycle and connection settingsCloses #<issue_id>and a work summaryTemplate reference: stellarspend/stellarspend-contracts#1055