Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Can I firstly say, great how-to!
Secondly, more of a comment on the PPA. Did you know ubuntu-14.04 has redis-server bundled and can support everything you do in the tutorial with sudo apt-get install redis-server from vanilla 14.04?
I know it’s probably not the latest stable, but sometimes distro-maintained is a good thing. Unless there is a CVE the new stable release fixes, and most of the time distro-maintained will backport security patches.
Anyway, my comment is largely irrelevant, I just wondered if you knew, and wanted to say well done on the tutorial.
Does anyone have experience or data as to how this performs vs memcached or standard session handling?
Great how to! Easy to follow for a novice. Would love to see a how to for getting a php page to make redis set/get calls! I am not having much luck following what’s out on the web.
Thanks, Jason
So in a server environment with a web server and a database server, where would you advise Redis to be installed for best performance?
Also in this tutorial is redis performing object-caching?
Thanks, JL
FYI:
I had used apg to generate a 72 character-long password for my Redis Server and found that tcp:// requests were failing. The password string contained several non-alphanumeric (ie special) characters.
Solved by:
Encode the string before sending to a port. I had success with:
If you are using PHP 7.0 FPM, whether you are using Nginx or Apache, if you realise the instructions above doesn’t work for you, and redis-cli doesn’t show your saved session.
you should go to the following file
/etc/php/7.0/mods-available/redis.ini
and add the following lines
session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379?auth=supercomplexpasswordthatyousetbefore"
save and exit, and restart php fpm
sudo service php7.0-fpm restart
Your session should now show when you type keys *
I’m using Ubuntu 16.04
How do you handle cleaning up expired sessions using this method? Will allkeys-lru maxmemory-policy work, or does an explicit expiration need to be set?
@erikaheidi Hey Erika! Thanks for this much!
I am trying to setup redis in an environment, where I need wordpress to connect securely to a VPS (Digital Ocean droplet) hosting a redis server.
I have managed this:
Webserver - > SSH RSA PK AUTH - > Redis VPS
Now I need this:
Authenticated Web Server - > Redis Instance - > Object Cache - > Session Handling - > DB store
Is that doable?
All default TCP connections are blocked on the droplet Only SSH via RSA is allowed on the droplet