Use Redis Sentinel for Caching/Async Queries
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- kubernetes, redis
- Domain
- backend, distributed-systems
Research direction
Start by tracing the existing Redis and Celery configuration introduced by PR 724, including the superset_config.py override and CeleryConfig entry points. Compare it with RedisSentinelCache and the sentinel:// workaround shown here; done means Redis Sentinel can be configured for both caching and async-query broker/results without manual overrides, including the master name.
Written by the indexing model from the issue text.
Description
Description
The PR https://github.com/stackabletech/superset-operator/pull/724 added celery worker support using Redis following the standard Superset example: https://superset.apache.org/admin-docs/configuration/async-queries-celery/
- This only works for
RedisCachenotRedisSentinelCache - The schema used is always
redis://instead ofsentinel:// - The master-name cannot be configured for sentinel nodes
So Redis in HA mode is not available without overrides (not tested).
Possible untested fix
configOverrides:
superset_config.py:
FILE_FOOTER: |
from flask_caching.backends.rediscache import RedisSentinelCache
_SENTINELS = [("redis-sentinel-0.redis-sentinel-headless", 26379),
("redis-sentinel-1.redis-sentinel-headless", 26379),
("redis-sentinel-2.redis-sentinel-headless", 26379)]
_MASTER = "mymaster"
_PW = os.environ["CELERY_RESULTS_BACKEND_DATABASE_PASSWORD"]
RESULTS_BACKEND = RedisSentinelCache(
sentinels=_SENTINELS, master=_MASTER, password=_PW, db=0,
key_prefix="superset_results",
# sentinel_password=..., only if the sentinels themselves require auth
)
_URL = ";".join(f"sentinel://:{_PW}@{h}:{p}" for h, p in _SENTINELS) + "/0"
class CeleryConfig(object):
broker_url = _URL
result_backend = _URL
broker_transport_options = {"master_name": _MASTER}
result_backend_transport_options = {"master_name": _MASTER}
imports = ("superset.sql_lab", "superset.tasks.scheduler")
worker_prefetch_multiplier = 10
task_acks_late = True
task_annotations = {"sql_lab.get_sql_results": {"rate_limit": "100/s"}}
CELERY_CONFIG = CeleryConfig
This is just a workaround and will need adaptation whenever the redis replicas change.
Issue checklist
This is a simple checklist of things to bear in mind when creating a new issue.
- Describe the use-case: As far as possible, use the pattern "As a [type of user], I would like [feature/functionality] to be able to do [specific action]." This helps identify the feature and the problem it addresses.
- Indicate importance and urgency: Use a scale (e.g., low, medium, high) to indicate the level of importance and urgency.
- Work-around: If there is a known work-around, describe it briefly.
- Environment: Describe the environment where the issue occurs (e.g., SDP version, K8S version, etc.).
- Dominant language
- Rust
- Stars
- 35
- Forks
- 4
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 10
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
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.
More from stackabletech/superset-operator
-
OPA roles are only resolved at login, so role changes and offboarding don't reach live sessionsOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stackabletech/superset-operator#748 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
stackabletech/superset-operator#667 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
stackabletech/superset-operator#661 · 4 comments ·
Maintainers usually reply within 1 day
-
type/feature-new
Difficulty 5/5 Over a week Newbie friendliness 25/100
stackabletech/superset-operator#618 · 1 comment ·
Maintainers usually reply within 1 day
-
type/feature-new
Difficulty 5/5 Over a week Newbie friendliness 25/100
stackabletech/superset-operator#616 · 2 comments ·
Maintainers usually reply within 1 day
All issues in stackabletech/superset-operator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Docs: "Work with Codex from anywhere" page still claims Windows mobile support is "coming soon"Openapp documentation remote windows-os
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oxidecomputer/dendrite#380 ·
Maintainers usually reply within 5 days
-
area:cli bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day