Comments (5)
I quickly tested this and switching the django cache backend "just works". Most of the work here will be packaging django_redis for debian and updating the puppet config. The dev vm will also need it added to the requirements.txt.
pip install django-redis
diff --git a/zproject/settings.py b/zproject/settings.py
index af6341d..aeeeac2 100644
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -327,8 +327,8 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
CACHES = {
'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
- 'LOCATION': '127.0.0.1:11211',
+ 'BACKEND': 'django_redis.cache.RedisCache',
+ 'LOCATION': 'redis://127.0.0.1:6379/1',
'TIMEOUT': 3600
},
'database': {
from zulip.
Zulip is using now Redis for the rate limit feature and memcached for the django backend. Do you think it worth consolidating both in a Redis cache, and reduce the number of processes? I can work in the pull request if the team thinks they can approve it.
from zulip.
I'd definitely be interested in a pull request that makes it possible to using redis for the cache; before we switch over I'd like to at least do some measurement of whether there's performance impact since we make extensive use of large multi-get queries (e.g. to fetch 1000 message objects from the cache; see the generic_bulk_cached_fetch
in zerver/views/messages.py). A few other details that will need thought:
- scripts/setup/flush-memcached
- redis configuration to manage memory usage etc.
from zulip.
(In particular, I can imagine the Django Python library for redis having a perf issue impacting our usage and I think given an implementation I can fairly easy verify whether that's the case)
from zulip.
It seems both redis and memcached are in use currently (according to the docker-compose file in the docker-zulip project)
from zulip.
Related Issues (20)
- tapping the add reaction icon fails to keep the dialog open HOT 1
- Exception in usergroupmembership table when change role HOT 8
- Include `can_create_streams`, `can_create_public_streams`, etc. fields in `/register` response only for simple clients. HOT 3
- Generate narrow links using "channel" operator, not "stream" HOT 2
- Document changing the home view via the left sidebar HOT 5
- No outline on keyboard navigation for `clear_search_button` HOT 1
- Remove tabIndex from simplebar scroll containers HOT 1
- [WIP] Add navigation buttons below messages
- Document left sidebar actions HOT 2
- Wrong translation of "read" in Italian of a one-line text HOT 1
- Follow up on regressions introduced at PR#29859 related to markdown tables in dark theme. HOT 1
- Make emoji category order in typeahead consistent HOT 4
- Follow up on dark theme regression at the #settings menu caused by PR#29859. HOT 1
- Docs: Migrate help center docs to Astro/Starlight HOT 1
- Stage 1: Migrate help center docs to starlight HOT 1
- Support having multiple examples for a schema in our API documentation generator. HOT 3
- Topic type filter should not be clickable for spectators HOT 1
- DM section has a different background color in dark theme in active narrow
- Align multi-line text in typeaheads and dropdowns HOT 1
- Quoted common words are excluded but do not say so HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zulip.