-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis replacement for Memcached #378
Conversation
Automated message from Dropbox CLA bot @jros2300, it looks like you've already signed the Dropbox CLA. Thanks! |
Looks like the CI error is this -- probably need to add
|
Also for the production installation use case, we will need to package |
Tim, please, can you help me? The build in Travis is failing (in my dev environment it's working the Zulip server and all the tests). This is the failed log: https://travis-ci.org/zulip/zulip/jobs/97313710#L1520 In the line 1203 it finishes installing django-redis, and then it fails in the line 2990 because it cannot find the module django_redis (this is the name of the mudule in django-redis), I've tried in my dev and I can import that module name. Is there something special to do for Travis? |
Happy to help! This is actually a real issue that this branch would break
installing Zulip in production. The Zulip development environment installs
python dependencies using requirements.txt into a venv. However, the Zulip
production installation process installs the Python dependencies using apt;
they are declared in the Package blocks in the puppet manifests.
So there are two things we need to do to make this work:
(1) Package django-redis for Debian/Ubuntu and upload it to the Zulip PPA.
This is usually pretty straightforward; I'm happy to take a look at doing
that in the next couple weeks...
(2) Once that's solved, python-django-redis needs to be added as a
dependency to the puppet manifests
|
Thanks, tell me when you can add the package to your ubuntu repository and I'll do the tests. |
OK I've uploaded python-django-redis to the apt repository. |
It's still failing, now it looks like it finds an old version of redis-py, where the redis.connection.ConnectionPool has no attribute 'from_url', but in the last version it has the method: https://github.com/andymccurdy/redis-py/blob/2.10.5/redis/connection.py |
Ahh; looks like we need to backport python-redis from a newer version of Ubuntu to Trusty: http://packages.ubuntu.com/search?keywords=python-redis |
OK @jros2300 I backported the redis package to trusty and put it in this repository for now: https://launchpad.net/~tabbott/+archive/ubuntu/zulip-testing |
@timabbott I've updated the package and now all the tests passed |
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', | ||
'LOCATION': '127.0.0.1:11211', | ||
'BACKEND': 'django_redis.cache.RedisCache', | ||
'LOCATION': "redis://%s:%s/1" %(REDIS_HOST, REDIS_PORT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have a space before (REDIS_HOST in our style.
@jros2300 I pulled your changes in as best I could on top of the current head, but there were some puppet configs that I don't know if I got right due to underlying changes. Can you take a look at https://github.com/007/zulip/commit/3e4585466fb3bb46ae65e228951c40c5e1cec5e5 to see if I got it right? I also purged all of the other |
Ping @jros2300 and @timabbott, what's the best way to get this (or my version) merged so we can eliminate one extraneous dependency for a zulip deploy? We've had our |
Hi @007, there are 3 issues from my perspective still open:
|
For #1, cache eviction should be able to be handled at the For #2, Feature flipping is the bane of my existence 😆. In this case, however, I'd be happy to do the cache name refactoring as a separate merge, and then figure out what is required to implement this as a flagged feature. I think having everything named Does that last point sound reasonable regardless of memcache-vs-redis? If so I can get started later today and should have something ready later this week. I'll check my available bandwidth to see if I can tackle #2 anytime soon, and if that looks good I should have a better understanding to tackle point #1. |
@007 sorry for the slow reply; I've been a bit swamped with the flood of GSOC traffic. I'm definitely happy to take the changes to remove the hardcoding of "memcached cache" in the variable names, which will at least shrink the size of the patch to merge significantly. I think it's probably possible to do the right thing with TTL or other explicit eviction policies, and it's probably better to do that than move 2 redis instances. Let me know if you run into any questions! |
@007 If you want to talk about this pull request in realtime: We're hosting a livechat "office hour" at the open Zulip realm https://zulip.tabbott.net on Monday, August 15th, 10am-11am Pacific Time / 1pm-2pm Eastern Time / 10:30-11:30pm India time. Swing by if you want to talk about this, or about keyboard shortcuts for muting/unmuting, the experimental new desktop app, helping us figure out what new users need to know, etc. We'd be happy to see you. |
Hello @jros2300, a Zulip maintainer reviewed this pull request over a week ago, but you haven't updated your pull request since. Please take a look at the requested changes and update your pull request accordingly. Thank you for your valuable contributions to Zulip! |
Hmm, well, the bot probably shouldn't have commented on something this old :/. I think I'll close this, since we're unlikely to merge it directly given the scale of conflicts. Thanks again for working on this though @jros2300! |
(I have been having to resurrect this, this week after the sprint) |
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
This trims Zulip runtime by removing dependency on an extra remote cache, and also trims Zulip installation dependency. Based on @jros2300's zulip#378 and @007's https://github.com/007/zulip/commits/redis-only, updated to the current codebase. Fixes #16
I've consolidated all the memcache usage in Redis, replacing all the libraries and provisioning instructions with the equivalent Redis packages.