October 10, 2018 By DJ Walker-Morgan 4 min read

Introducing Databases for Redis

As you may have seen, we’re launching a new range of databases called IBM Cloud Databases with Databases for PostgreSQL and Databases for Redis. If you are not yet familiar, then let’s introduce you to IBM Cloud Databases for Redis. To learn more about Databases for PostgreSQL, check out this post.

What is IBM Cloud Databases?

The experts on the IBM Compose team have been working to deliver databases on a next-generation platform. There were two design criteria. One was to build on a modern, open, cloud management platform—Kubernetes—rather than building one from scratch. The other criteria was that the new service had to integrate with IBM Cloud natively, as a provider and a consumer of services.

From those design criteria came the new architecture, with simpler access to the databases, cleaner high availability, and smoother backup orchestration. It’s all integrated with IBM Identity Access and Management (IAM) and provisioned as a native IBM Cloud service. Underneath that, a consistent system for managing stateful storage and backup storage does the heavy data lifting.

It is onto that solid platform that our developers are bringing battle-tested database configurations. And that’s IBM Cloud Databases.

What’s Redis?

Redis is an open source in-memory data structure store that is designed to be very fast and flexible. It allows developers to share and cache structures ranging from simple strings, lists, and sets to queryable sorted sets, bitmaps, hyperloglogs, and geospatial data, all referenced with user-defined keys. These keys can also be created with a time-to-live so that they can automatically expire. This simple, flexible architecture is combined with a guarantee of atomic operations that extends to Redis’s Lua scripting support. Redis can act as a session or state store for applications, be used to queue jobs between workers, or keep metric counters.

That last one is where hyperloglogs come in—they are a data structure which probabilistically counts the number of unique items presented to it without consuming large amounts of memory. That means you can count different IP addresses, hostnames, or hashes and only use a small (12KB) amount of memory.

Redis is the epitomy of NoSQL databases. It’s tuned for in-memory storage and fast connections with a custom explicit command set.

What’s in IBM Cloud Databases for Redis?

Databases for Redis gives two Redis instances—a master and a replica member—with Redis sentinels monitoring both. Accessing the database is managed through a single Kubernetes Nodeport, behind which one or more HAProxy instances handle all the traffic. It’s the HAProxy instances that manage to which we’ve added support for TLS/SSL encryption for incoming connections to the Redis server—something Redis doesn’t do out-of-the-box currently.

So how do I get a Redis deployment like this?

Go to the IBM Cloud Catalog, look for Databases for Redis, and create a deployment. By default, you’ll be getting Redis 4, with 1GB of RAM and 1GB of storage allocated to each of the two database members. Click Create, and off you go. When it’s all set up, you’ll be at the manage screen, where you can create credentials, set the admin password, and view the state of Redis.

I like the command line. What tools do you have?

IBM Cloud has an IBM Cloud CLI tool, and once installed, you can use it to provision and deprovision your databases. There’s also an IBM Cloud Databases plugin for the CLI just an ibmcloud plugin install cloud-databases command away. That then gives you commands to create users, set passwords, get connection strings, and much more.

Set the admin password with ibmcloud cdb user-password admin password. As the redis-cli doesn’t handle TLS connections, we created and open-sourced our own version— redli— which you can download and install.

From there, entering ibmcloud cdb cxn yourredisdatabasename -s is all you need to do to start an interactive session with the Redis database.

What if I want or need to use the official redis-cli?

Not a problem. Head to the Databases for Redis documentation where you’ll find a Connecting with redis-cli section. It shows you how to configure redis-cli with Stunnel, a TLS/SSL tunnelling application. You can use the same technique with any Redis application which doesn’t support TLS/SSL.

I like APIs. Where do I get started?

We have an API—the Cloud Databases API. This API gives you all the management features which are also exposed by the CLI. Provisioning and deprovisioning are managed, separately, by the IBM Cloud’s Resource Controller API. API Keys are provisioned through the IBM Cloud’s User API Keys.

How do I scale?

You can use the IBM Cloud Manage page. Go to the Settings view, and you can drag the sliders to as much memory and disk storage as you need. If you want precise control, the Cloud Databases CLI plugin or API are also able to set your scaling. Scaling happens with no disruptions or scheduled maintenance. We do recommend you scale Redis memory and disk in parallel.

Can I set up other users for Redis?

No. It’s a design feature of Redis that it has just one notional user with a single authentication password. On Databases for Redis, we call that user admin to fit in with the other databases. You can change that user’s password but you can’t create new users.

Do you support Redis modules?

Redis modules are a new feature in Redis 4.0 which allow developers to plug into the Redis database engine and add their own extensions. It’s pretty exciting stuff but because it’s quite hands-on (requiring compilation, file system access, and other things which don’t rest well on a cloud-hosted platform) we aren’t offering it with Databases for Redis.

Where do I find out more about Redis?

The place to start for all things Redis is the Redis.io website with its documentation collection.

Where do I find out more about Databases for Redis?

Head over to the Databases for Redis documentation, which covers all the Databases for Redis specifics.

More from Announcements

IBM Hybrid Cloud Mesh and Red Hat Service Interconnect: A new era of app-centric connectivity 

2 min read - To meet customer demands, applications are expected to be performing at their best at all times. Simultaneously, applications need to be flexible and cost effective, and therefore supported by an underlying infrastructure that is equally reliant, performant and secure as the applications themselves.   Easier said than done. According to EMA's 2024 Network Management Megatrends report only 42% of responding IT professionals would rate their network operations as successful.   In this era of hyper-distributed infrastructure where our users, apps, and data…

IBM named a Leader in Gartner Magic Quadrant for SIEM, for the 14th consecutive time

3 min read - Security operations is getting more complex and inefficient with too many tools, too much data and simply too much to do. According to a study done by IBM, SOC team members are only able to handle half of the alerts that they should be reviewing in a typical workday. This potentially leads to missing the important alerts that are critical to an organization's security. Thus, choosing the right SIEM solution can be transformative for security teams, helping them manage alerts…

IBM and MuleSoft expand global relationship to accelerate modernization on IBM Power 

2 min read - As companies undergo digital transformation, they rely on APIs as the backbone for providing new services and customer experiences. While APIs can simplify application development and deliver integrated solutions, IT shops must have a robust solution to effectively manage and govern them to ensure that response times and costs are kept low for all applications. Many customers use Salesforce’s MuleSoft, named a leader by Gartner® in full lifecycle API management for seven consecutive times, to manage and secure APIs across…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters