A Newsletter About Everything Redis

BOY Edition #61
January 14th, 2016

# include “e;i.h”e;

My sincerest apologies, but this edition is packed front to back with quality content that is surely to keep you busy throughout the weekend. Let’s kick it off!



Tony Million @tonymillion > Putting some redis in my redis so I can redis while I redis <- @saniul > @tonymillion


Redis Trivia: Pictures from Abou Redis (also see fact #8): https://instagram.com/explore/locations/261831538/

Be social, tweet about the first edition of Redis Watch for 2016: I’m reading Redis Watch #61: https://redislabs.com/redis-watch-archive/60

int main(int argc, char **argv) {

New security feature: Redis protected mode (2 minutes to read)

The unhappy outcome of Redis’ approach to security (“it’s totally insecure to let untrusted clients access the system, please protect it from the outside world yourself” [source]), its historical defaults (bind and the non-RTFMness of most (if not all) of us is the existence of too many unprotected servers that are open to the entire world.

While newer versions bind to the loopback interface by default, this alone still isn’t quite enough to protect against accidentally leaving the door open because most deployments will override this configuration setting (Redis is, after all, a REmote [DIctionary] Server). To overcome this, protected-mode is a compromise that changes very little of the current behavior but requires twice the effort to become exposed to risks. However, since it does break existing deployments, it will not be backported to earlier versions.

ZeroBrane Studio plugin for Redis Lua Scripts (5 minutes to read + 10:27m to watch) #Lua

ZeroBrane Studio is THE Lua IDE for me: it is open source, lightweight, cross-platform, portable, rock stable and passionately maintained by Paul Kulchenko @zerobrane. It also boasts a very handy integrated debugger that now, thanks to Paul’s work and Redis Labs’ sponsorship, plays very nicely with Redis’ LDB. Check out the screencast for an introduction, or follow these steps to get to Lua debugging heaven:

  1. Download, install and start an LDB-enabled Redis server (right now, that’s the release candidate for v3.2).
  2. Download and install ZeroBrane Studio v1.20 or above – the project is entirely free but if you benefit from using it, please consider supporting it.
  3. Get yourself the ZeroBrane Studio interpreter plugin for Redis from the ZeroBranePackage repository, aptly named redis.lua.
  4. To install the plugin for all users, drop it in the packages directory of your ZeroBrane Studio installation (e.g. /opt/zbstudio/packages/), or put it in your ~/.zbstudio/packages directory to savor it alone.

Develop and debug Redis Lua scripts with ZeroBrane Studio

OH Redsmin {Redis GUI} @redsmin > Looking for an easy way to use #Redis LUA scripting? Well, it’s now integrated in Redsmin. Next step: the debugger!

Lua scripting with Redis (8 minutes to read)

A nice example/introduction of/to Redis’ Lua from Dan Young @danoyoung, who shows how to move some crunching server-side. Useful when faced with fuzzy requirements and the need for fast prototyping, but also valid as an approach for long-term performance optimizations.

Using Redis As a Time Series Database: Why and How (14 minutes to read) #MustRead

The Why? and How? of storing and querying time series data in Redis by Josiah Carlson @dr_josiah via @InfoQ. The ideas are clearly explained and are accompanied, as per usual with the good doctor, with runnable (#Python) code to put you immediately on the right track. Find the time to internalize and assimilate this knowledge.

Disque 1.0 RC1 is out! (3 minutes to read)

About 1.1589 Sol years (or 423 days) after git init, Redis’ little brother (or is it a sister?) makes a formal debut with its first release candidate – an in-memory, distributed job queue/message broker by Salvatore Sanfilippo @antirez that supports both at-least-once as well as at-most-once message delivery semantics and makes the best attempt to keep messages order.

OH Mathias Verraes @mathiasverraes > There are only two hard problems in distributed systems: 2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery

How we increased our click-through rates using bandits in Python and Redis (10 minutes to read)

“We want to be as real-time as possible…which gives us a convenient excuse to use Redis.” – this quote alone is convenient excuse for a reference 🙂 Marios @papercruncher‘s explains how an ad-serving system was optimized to tackle the multi-armed bandit problem in real time.

Building Web Analytics at SpiderOak (7 minutes to read) #RealtimeAnalytics

Quentin Donnellan @qdonnellan tells how @SpiderOak decided to build their own analytics solution despite his own brother’s advice. The end result features two of Redis’ popular use cases – firstly it is an event ingestion buffer in front of #PostgreSQL, from which the data is periodically scraped and stored. Secondly, after ETLing, it stores and serves the snappy data that’s needed for the dashboards. Hey, Quentin, can you share more of the details?

danieleteti/delphiredisclient #Delphi #foss #ExoticLanguages

Daniele Teti @danieleteti made a Redis client for a language/platform that I believed (with no apparent basis) had long passed from this veil of tears. I wonder whether #TurboPascal is still used out there…

Uploading and serving images from Redis with Node.js (3 minutes to read) #NodeJS

After an hiatus, Kyle Davis @stockholmux‘s back with a short 17th post that whirls through turning Redis into imgur. Aptly opens with “With Redis, you think small”. Ends with “so many possibilities.” #CliffHanger

Understanding the Magic of Bloom Filters With Node.js & Redis (12 minutes to read) #howto

Speaking of the Davis and until Redis boasts a first-order Bloom Filter data structure, Kyle Davis @stockholmux shows how you can still magic your way with a little help from #NodeJS.

luin/medis #GUI #foss #MacOSX

Hailed by its very own author Zihua Li @luinlee as beautiful and easy-to-use, Medis @medisclient is a local MacOSX-only-but-soon™-for-Linux-and-Windows client that does look pretty and simple. Bonus points for scoping-out KEYS and the built-in JSON/MessagePack parsers, but OTOH not every one uses an Apple and the lack of cluster support leave a lot of room for improvement.

Under the Hood of Redis: Hash [Part 1] (Reading time ~10 minutes), Hash [Part 2] & List (~12 minutes)

Nikolay Bondarenko @misterionkell keeps his blog fresh with two new articles that dig deep into Redis’ data structures. If you like them #InfernalInternals or just want to broaden your understanding of Redis’ inner workings, that’s where you should [rh]ead next.

Introduction to Redis Data Structures: Hashes (5 minutes to read)

Complementing the item above, Vaibhaw Pandey @_Vaibhaw from the MongoDB hosting service MongoDirector.com gives his insights about Redis’ Hashes and introduces (at least to me) another meaning the most confounding acronym CAS.

Discussion: /r/redis

AurumAS/DoubleCache #CSharp #foss

A cache aside implementation using Redis combined with an in-heap “L1” cache by Harald S. Ulriksen @hsulriksen – recommended pattern for pracachetioners regardless of their choice of language.

jonathanong/redis-cache-decorator #NodeJS #foss

And while on the topic of caching and patterns, I really appreciate the elegance in wrapping function caching and locking with decorators – by Jonathan Ong @jongleberry.

Hacking Redis To Save Money (7 minutes to read)

“Throwing Redis at all my problems” by Peter Bui @paydro from @8tracks remembers how he once forked Redis and changed it to do his bidding (namely, expiry on slaves) so he can offload an expensive operation (set intersection) from the master. Because open source, duh. AFAIR this wasn’t discussed/PRed in the community, so now that the fork is abandonware it is of little value, which is a shame. The cluster, however, alleviates the need to use slaves for horizontal scaling so nowadays instead of forking you can just shard it.

dynomite/…/dyno_redis_rss_healing.sh #Bash #foss

This effective script from @NetflixOSS‘s Dynomite “heals” fragmentation by persisting the data, restarting the instance and repeating if needed.

Redis + Celery: Reactive Computing in Django for IoT applications (17 minutes to read)

Sachin Joglekar @joglekareshwar explains the foundations that for reactive programming (#MSExcel :)) and shows how to accomplish that in #Python‘s #Django.

OH Chris LoPresto @chrislopresto > redis is fantastic. I’d serve dinner from it if I could.

jay-johnson/docker-redis-sentinel-replication-cluster & jay-johnson/docker-redis-haproxy-cluster #Docker #cluster #foss

Jay Johnson @jayphjohnson maintains two swarm flavors for a highly-available Redis deployments – w/ and w/o #HAProxy. Both flavors employ Redis Sentinel and Supervisor to watch over the Redis instances. #PretAPorter

m-gagne/socket-chat-example-using-redis #NodeJS #socketio #foss

This not-really-Azure-specific repository from Marc Gagné @marc_gagne extends the basic chat example from Socket IO @SocketIO to create its distributed equivalent. Multiple web socket servers are employed for scale and have messages relayed to them via a Redis PubSub channel.

Blog post: How to scale your web socket server (WSS) using Redis Cache


The Future

What’s new in Redis v3.2

When: Thursday, January 21, 2016 5:30 PM
Where: Redis Labs, Habarzel St 28, Tel Aviv-Yafo, Israel
Admin: Itamar Haber @itamarhaber

Redis: From Beginner to Advanced

When: Thursday, January 28, 2016, 6:00 PM to 8:00 PM
Where: TEKsystems Mississauga, 350 Burnhamthorpe Road West, 8th floor, Mississauga, ON, Canada
Admin: Obi Oberoi @ObiOberoi

Redis Labs

Six Essential Features Of A Highly Available Redis #WhitePaper

Learn the makes of a highly available Redis in this new paper by Redis Labs’ Developer Advocate Dave Nielsen @davenielsen.

Questions? Feedback? Anything you want to share? Email or tweet me – I’m highly available 🙂


This newsletter was produced and distributed by Redis Labs, Inc.

Redis Labs, Inc. 700E El Camino Real, Suite 170, Mountain View, CA 94041

Repository |Archive | Subscribe | Follow on Twitter