parse-community / parse-community/parse-server

feat: Graceful Redis cache adapter fallback

Open
#9,529 3 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #9615 by @Chilldev — merged
type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Feature / Enhancement Checklist
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
  1. Running Parse Server with a Redis Cache
  2. Redis host goes down
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.