parse-community / parse-community/parse-server
feat: Graceful Redis cache adapter fallback
A pull request for this has already been merged.
- #9615 by @Chilldev — merged
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Current Limitation
If you are using the Redis for the Cache Adapter and your Redis instance goes down, it will crash the Parse server.
Feature / Enhancement Description
A graceful fallback for temporary Redis outages. One possible solution could be to have a configurable Redis request timeout (maybe defaults to 5 seconds) where if Redis doesn't respond fast enough, a new request is made to the database for the same information. Note that one of the biggest complicates for having a Redis cache fallback is dealing with the potentially stale Redis data when it comes back online. I don't know how we'd want to deal with that and it might be a deal breaker, but posting this anyway because @mtrezza asked me to!
Example Use Case
- Running Parse Server with a Redis Cache
- Redis host goes down
- Your Parse Server continues running (albeit in a degraded state) until either your host brings your Redis cache back online or you turn off Redis temporarily until issues can be resolved.
Alternatives / Workarounds
You can disable the Cache Adapter manually when you expect Redis downtime.
3rd Party References
https://www.michaco.net/blog/WhatIfRedisStopsWorkingHowDoIkeepMyAppRunning
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Redis cache adapter entry point and the database fallback path in Parse Server; the issue does not name specific files or tests. Define how Redis request timeouts, temporary outages, and stale data after recovery should be handled, then verify that the server continues operating while Redis is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100