The Only Newsletter About Redis

Edition #70
June 8th, 2017

# include "i.h"

Hello friends.

The past few weeks have been a roller coaster of frenzy activity, with RedisConf 2017 taking front stage at the May's end. Totally unrelated to that, I was interviewed by OpenChannel @OpenChannelTech's Michael Kovacs about what I've learned being a part of the Redis community (note to self: do not give phone interviews on weekend nights while nursing a single malt).

Before getting started, I want to direct your attention to a beautiful initiative from unixstickers @unixstickers. Quoting the post at /r/redis:

After months of intense work, we're proud to announce our new initiative to support FOSS with donations.

We asked 5 FOSS idols to sign a handful of limited edition stickers, which are available until sold out. Each of the signers appointed a specific foundation or initiative that will benefit from the proceeds raised through the initiative.

Here are the 5 FOSS idols, who we couldn't be more thankful with:

  • Dave Gandy, founder of Font Awesome (all donations go to New Story Charity newstorycharity.org)
  • Yukihiro Matzumoto aka Matz, chief designer of the Ruby programming (all donations go to rubycentral.org)
  • Salvatore Sanfilippo aka Antirez, creator of Redis (all donations go to Museo dell'Informatica Funzionante museo.freaknet.org)
  • David Heinemeier Hansson aka DHH, creator of Ruby on Rails (all donations go to the Electronic Frontier Foundation www.eff.org)
  • Neil McGovern, Executive Director at the GNOME Foundation (all donations go to the GNOME Foundation www.gnome.org/foundation)

Show your love by sharing the initiative and get the limited edition signed stickers here: https://www.unixstickers.com/signed-stickers

Unixstickers custom signed stickers

Cheers,
Itamar

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

Redis 3.2.9 is out #v4IsComing

A minor release with a few bug fixes and a low update urgency. Expect a lot more from Salvatore Sanfilippo @antirez in the near future…

RedisLabs/triemap #foss #BSD2Clause #C

Is a C implementation of a compressed trie lookup map. Dvir Volk @dvirsky made it to power some of the awesomeness (e.g. auto-complete) in RediSearch.

antirez/rax #foss #BSD2Clause #c

Is a radix tree implementation in ANSI C by Salvatore Sanfilippo @antirez. This cool data structure was suggested as a fix to a regression in the cluster's performance and will be used for that in v4. However, it will be put to more extensive use in future versions of Redis, improving performance and reducing the overheads and complexity of internal data structures such as the hash dictionary (bonus: looks like we're gonna get efficient prefix searches on key names :)).

OH Github Trending @TrendingGithub

antirez / redis-doc: Redis documentation source code for markdown and metadata files, conversion scripts, and… https://github.com/antirez/redis-doc

LOL – Redis is so popular that even its docs are trending on GitHub, ty mit <3 Andy Grunwald @andygrunwald

Making a Geohash of it (9 min read)

In an article that is actually about education through gamification, Adam Roberts @ad_roberts from the BBC @BBC maps questions to their respective answers and provides the directions for the quest of making a responsive, terrific-looking map of about a gazillion experiments across the UK.

View Counting at Reddit (4 minutes to read)

Krishnan Chandra, a senior software engineer at Reddit @reddit, tells how Redis' HyperLogLog is used alongside Cassandra in a Kafka-esque pipeline to count views at (Reddit's) scale.

Efficient analytics with Redis Bitmaps (3:19 minutes to watch)

Bitmaps are well-explored territory, but this video manages to get across the main points and build just enough interest to encourage you to go on an auto-didactic journey – from Ivan Zarea @ivanzarea.

Counting Stuff in Hashes #howto #golang

Another aromatic serving from Paweł Słomka @pawel_slomka, who debuted in this newsletter's previous edition. This time, an introduction to using Redis Hashes to count stuff.

activityclub/pointspaced #foss #MIT #golang #Lua

Is a server that collects and aggregates data into a very neat data structure made up of collections of (Redis) hashes. Despite being written in Go, the heavy lifting of doing the writes is contained in a Lua script that can be easily called from any language (caution: see issue #1). Via the activity.club @activityclubapp team.

OH Daniel Leite @dleitee via Cheesecake Labs @CheesecakeLabs (source)

Thinking about real-time… For Pub/Sub, we chose Redis — an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker — as our team was very familiar with it. This tool has an utmost importance for the operation of our new architecture, allowing messages to the almost instantaneously published without harming our web service performance.

Building The Buffer Links Service (6 minutes to read)

Posts about Redis are especially beneficial when they describe why/how the decision to use it was Harrison Harnisch @hjharnis via Buffer @buffer

How to Use Elasticsearch, Logstash, and Kibana to Manage Redis Logs #howto #devops

The title sums it up nicely, and the article appears to have all the required details to get you from 0 to 11. By Adam Vanderbush @CommandrAvander of Qbox.io @qboxio.

Note: I wonder if Elasticsearch could be replaced by, lets say, RediSearch?

Remote Redis: Spiped vs Stunnel (4 minutes to read)

Chris Tanner takes lovely photos, but in between he also tested the performance of the two approaches for securing the communication to a remote Redis server. Looks like we have a winner (spoiler: stunnel).

Note: if anyone knows Chris' Twitter handle so he can be credited please lmk (I don't have an Instagram account)

RedisLabs/sentinel_tunnel #foss #BSD2Clause #golang

Is a local proxy server for discovering and connecting to Redis via Sentinel. The idea is simple but extremely effective – the proxy does all the heavy lifting of connecting to the current Redis master by chatting with the configured Sentinel deployment, and provides a local port to which a client can connect. The client doesn't know anything about the underlaying complexities and is oblivious to failures without requiring any special configuration or code changes.

By Meir Shpilraien @Meir_Shpilraien of Redis Labs @RedisLabs.

OH Coding with Jesse @JesseSkinner

It can be really helpful to have the MONITOR command show you a live log of all the #Redis calls you're making while you're programming.

Note: word.

Rate Limiting Using Redis in Python #howto #Python

Bob Cao @bobintornado scratches my itch for rate limiters and makes an opening that I find irresistible to not quoting:

Redis is an awesome piece of software, and I am hugely biased towards it. It’s very versatile and powerful, could fulfill a wide range of use cases, such as implementing a rate limiter.

A Redis 4 Docker Image Proposal #howto #Docker

André Fernandes @andrenit presents his proposal for a v4 image, leveraging Docker 17.05's multi-stage builds to slap a server+module image together. If anyone reading this is a Docker guru it would be good to get more feedback on that. Personally, he got me at ReJSON 😉

Redis Performance Triage Handook #protip

aadrsake @aadrake collected 10 performance-focused advices for Redis users, each invaluable by its own right, including:

  1. No KEYS command. Ever.
  2. Use variadic commands
  3. Pipeline your commands

… and 7 more.

zdharma/zredis #foss #GPL3 #Zsh

Is a Redis database mapping for Zsh by the Zdharma Initiative @ZdharmaI, for example:


                % redis-cli -n 3 hmset HASHSET field1 value1 fld2 val2
                % ztie -d db/redis -f "127.0.0.1/3/HASHSET" hset
                % echo ${(kv)hset}
                field1 value1 fld2 val2
                % echo ${(k)hset}
                field1 fld2
                % echo ${(v)hset}
                value1 val2
                % redis-cli -n 3 rpush LIST empty
                % ztie -d db/redis -f "127.0.0.1/3/LIST" list
                % echo ${(t)list}
                array-special
                % list=( ${(k)hset} )
                % echo $list
                field1 fld2
                % redis-cli -n 3 lrange LIST 0 -1
                1) "field1"
                2) "fld2"
                % for (( i=1; i <= 2000; i ++ )); do; hset[$i]=$i; done
                % echo ${#hset}
                2002
                

Fastest Redis configuration for Django #howto #Python #Django

In the spirit of "let someone else test this", that someone is Peter Bengtsson @peterbe when it comes to identifying the most performant cache configuration for his Django app. In his previous post Peter had already demonstrated the Redis is better suited for his needs (compared to Memcached), so in this one he pits different serializers and compressors against each other.

vy/log4j2-redis-appender #foss #GPL3 #Java

Is a Log4j 2 Appender for Redis by Volkan Yazıcı @yazicivo.

OH Paul Magrath @PaulMagrath via Intercom @intercom (source)

… Armed with this knowledge, we introduced a Redis cache for our Mongo database, a huge performance and availability win … We quickly saw a massive decrease in the load on the Mongo database. In the left of the below graph, you’ll see the amount of queries before adding the Redis cache. The right hand side shows after adding the Redis cache, decreasing the load to almost nothing.

Intercom cache effect

Modules! Modules! Modules!

Redis Modules page at redis.io

The project's website has been updated with a list of open-source Redis modules. To add yours, make a PR to the "modules.json" file in the redis-doc repository.

Redis thread safe contexts (14:38 minutes to watch) #howto #C

Modules aren't just about bringing new functionality into Redis – they are also changing how Redis works in the most fundamental level. In this webcast, Redis' creator Salvatore Sanfilippo @antirez explains the newest feature of the API, which basically lets the module's threads access the server safely. Yep, you read that right, modules can be truly threaded now.

erans/redissnowflake: #foss #MIT #C

Is a (Twitter) Snowflake-based ID generator wrapper implemented as a Redis module by Eran Sandler @erans.

aviggiano/redis-roaring #foss #MIT #C

Is a wrapper module for the Roaring Bitmaps (compressed bitmaps which tend to outperform conventional compressed bitmaps) CRoaring library by Antônio Guilherme @toonhao.

Redis Search #howto #Ruby

dmitrypol @dmitrypol with a 7-minute read showing how to use RediSearch with the Ohm library.

vruizext/redisearch-rb #foss #MIT #Ruby

Is a simple Ruby client for RediSearch module thanks to Victor Ruiz @bik_tor.

RedisLabsModules/RediSearch 0.17.1 #foss #AGPL #C

It just keeps getting better:

  • In-Query Numeric Predicates, e.g. @price:[100 200]
  • Complete parser and tokenizer rewrites
  • BugFixes and issue_squashing
  • New API Command: FT.EXPLAIN

Dalek EXPLAIN

RedisLabs/rejson-py v0.2 "hootnot" #foss #BSD2Clause #Python

Adds testing, coverage and support for Python 3 thanks to Feite Brekeveld @feite_brekeveld.

RedisConf17 – the aftermath

As the team is busily making everything available online, here are a few tastes of what it was all about. Stay tuned for a massive dumps of content soon.

I'd also like to personally thank and mention all of our esteemed speakers (apologies in advance for any omissions): Irfan Ahmad, Rahul Babbar @rahulone, Brad Brech Nenad Bogojevic @NenadBo, Chuck Calio @chuckcalio, Kyle Davis @stockholmux, Salil Deshpande @salil, Daniel Ellis @I_am_Dan_Ellis, Erol Erturk @er0l, Stefano Fratini @fratuz610, Robert Gay @roblg, Lou Harwood @lou_harwood, Joel Hensley @fusball, Matthew Hicks @mkigikm, Kelsey Hightower @kelseyhightower, Daniel Hochman @danielhochman, Kevin Hoffman @KevinHoffman, Thomas Hunter II @tlhunter, Jon Hyman @jon_hyman, Brian Ip, Jay Johnson @jayphjohnson, Ted Knudsen @ultrated, Nikita Koksharov, Michael Labib @MichaelSLabib, Cedric Lamoriniere @CedLamo, John Loehrer, Charity Majors @mipsytipsy, Joshua McKenty @jmckenty, Seandon Mooy @erulabs, Jim Nelson @_jimnelson_, Philip Norman @philipnrmn, Frank Ober @fxober, Ioannis Papapanagiotou @ipapapa, Pat Patterson @metadaddy, Sean Perkins @seanperkins, Peter Phillips, Aaron Pollack @the_lolpack, Dmitry Polyakovsky @dmitrypol, Hari Ramamurthy, Rashmi Ramesh @rashmi_ur, Sam Ramji @sramji, Venkatachalam Rangasamy @topideafactory, Chris Richardson @crichardson, Jesus Ruiz @jruiztwi, Madhu Therani @MadhuTherani, Jim Vogt, Reynold Xin @rxin, Cihan Biyikoglu @cihangirb, Leena Joshi @leena_joshi2015, Uri Shachar, Guy Lubovitch @dragnot, Elad Ash @AshElad, Shay Nativ @shaynativ, Itamar Haber @itamarhaber, Yiftach Shoolman @Yiftachsh, Ofer Bengal @oferbengal and Salvatore Sanfilipo @antirez.

On the lighter side, thank yous are also in order to The Spazmatics @SPAZMATICS, as well as to Thomas Middleditch who deleted his Twitter account and plays in a character in some TV show. He was actually pretty okay on stage, although I definitely stole the show 😉

A special thanks goes to the rest of team from Redis Labs @RedisLabs who made this a once-in-a-lifetime-event happen, including: Tague Griffith @tague, Kirk Kirkconnell @rladmin, Gabe Stanek @gastanek, François Cerbelle @fcerbelle, Adi Foulger @redismonkey, Rod Hamlin @rodhamlin, Cassie Zimmerman @cassandrazimm, Jason Forget @Jasonaforget, Regev (Reggie) Yativ @regevyativ, Jeannie Chong @JeannieChong1, Sukhy Budwal @BudwalSukhy, Devin Ramga @devinramga, David Maitland @DCMaitland, Mike McCrady @MikeMcCrady2, Roshan Kumar @RoshanKumar, Rik Walters @rikwalters, Saman Moayeri @MoayeriSaman, Sharon Thompson @Square1Rolls, Manish Gupta @mgupta_sv and Aviad Abutbul @AviadAb.

Additional obligatory but grateful thanks are due to the event's gracious sponsors: Amazon Web Services @awscloud, Google @Google, Pivotal @pivotal, Stack Overflow @StackOverflow, Sticker Mule @stickermule, Intel @intel, Mesosphere @mesosphere, Zettaset @Zettaset and IBM @IBM.

Last, but not least, the real thanks goes to everyone who attended the conference – you're the reason for this conference and I hope to meet all of you next year at Redis Conf 2018.

OH benarent @benarent

Crazy and cool that 5 years after the first @RedisConf it has a billboard in Soma. It was a hard time finding speakers for RedisConf #2

RedisConf 2017 Soma Billboard

0ther b1ts

Optimizing Memcached Efficiency

If memcached is your thing, this could be useful – by Siyuan Fu @fusiyuan2010 via Quora @Quora.

A Comparison of Advanced, Modern Cloud Databases

An informal yet informative study and comparison between Amazon Aurora, CitusDB, CockroachDB, Google Spanner, Microsoft Cosmos, MongoDB & Postgress from Brandur @brandur.

Note: we missed you at the conf.

The Future

After Hours with Redis Labs UK

When: June 14, 2017 6PM-9PM
Where: CodeNode, 10 South Place, London
What #1: Using Redis as a Data Grid by Rui Gu @Redisson_RuiGu
What #2: Machine Learning with Redis and Redis-ML by Tague Griffith @tague

Redis Labs

Redise Pack v4.5.0 Release

We are very excited to announce the release of Redise Pack 4.5.0. Along with many quality improvements and overall performance enhancements, this release ushers in two major capabilities;

  • Redise Flash (RF) version 2 is now generally available for use in production.
  • Simpler IP Based Connection Management with Discovery Service using the Redis Sentinel API.

Redis Cloud Private

We are very excited to announce the preview release of the new simplified Redise Cloud Private (RCP) managed DBaaS.

Redise Cloud Private delivers a fully managed, cost effective, stable high performance Redis databases in dedicated clusters within your cloud account, using your own instances, inside your VPC, with the option to run Redis databases on RAM or RAM+Flash (Redise Flash) as an extension of memory, using High IOPS NVMe-based SSD instances.

We Are HIRING

We're looking for the right women and men to join our team as architects, software engineers, automation developers, technical support engineers, devops, sales managers and recruitment experts. Check our open positions out and refer your friends!

We are HIRING

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. 700E El Camino Real, Suite 250, Mountain View, CA 94040
Repository | Archive | Subscribe | Follow on Twitter