Quick Setup of Redise Cloud
The steps here are super simple and go as follows:
- Sign up for a Redise Cloud account
- Create a new subscription
- Setup a database
- Connect to your Database
Step #1 – Sign up for Redise Cloud account
If you do not already have one, sign up for a Redise Cloud account.
If you already have an account, sign in to Redise Cloud.
Step #2 – Create a new subscription
Add a new subscription to your account, if you do not already have one. If you have an existing subscription, then proceed to Step 3.
For a new subscription, you will need to select the following:
- The cloud and region you desire your database(s) to be created in
- A subscription name
- One of three subscription plans:
- Cache plans do not include replication or persistence of data. In the event of a failure, new resources are immediately available with no change to your endpoint.
- Standard plans can have a diverse set of features including in-memory replication, auto-failover, data persistence and backups. Selecting this option will double the memory size of your dataset.
- Multi-AZ (Availability Zone) plans offer all the benefits of Standard plans, as well as auto-failover and in-memory replication to another availability zone. Memory size – select from 30MB (free) to 5GB ($33/mo), or a flexible pay-as-you-go model.
You can consider a quick overview of each tier’s features upon selection. For more specific information, see Creating a Subscription.
Once you have made your selections, click “Continue” to finalize your subscription.
Step #3 – Set up a database
- Give your database a name.
- Select whether or not you want replication of your database. Please note that this will double the memory size of your dataset.
- Select whether or not you would like data persisted to disk. For specific information on persistence, see Data Persistence with Redise Cloud.
- Select your security options:
- Redis Password – highly recommended
- Network security Source IP/Subnet
- AWS Security Groups, if you are using classic EC2
- SSL Client Authentication – only available for eligible plans
- For more information on security selections see Securing Your Redise Cloud Database.
- Select a Data Eviction Policy. For more specific information, see Creating a database.
- Select whether or not you would like a Periodic Backup of your database. For more information, see Redise Cloud Database Backups.
- Choose which alerts you would like to receive. For specific information see Monitoring Redise Cloud Performance.
- Click the “Activate” button to create your database.
As a quick smoke test, telnet to your assigned endpoint and port. Then enter the Redis PING command. You should see something like this:
# telnet redis-19836.c9.us-east-1-2.ec2.cloud.redislabs.com 19836 Trying 18.104.22.168... Connected to redis-19836.c9.us-east-1-2.ec2.cloud.redislabs.com. Escape character is '^]'. AUTH my_redis_password PING +PONG
Note: We recommend loading the redis-cli command-line utility for future use as you will use it for other things.
$ redis-cli -h redis-19836.c9.us-east-1-2.ec2.cloud.redislabs.com -p 19836 -a astrongpassword redis-19836.c9.us-east-1-2.ec2.cloud.redislabs.com:19836> PING PONG
You can get redis-cli and other command-line Redis tools through your favorite package manager or by installing Redis locally.
Step #4 – Reading and Writing Data with redis-py
Once you have tested the connection to your Redis database, you can start reading and writing data. The following code snippet writes the value bar to the Redis key “foo,” reads it back, and prints it. This snippet is written in Python, but you can use your favorite language (for examples in other languages, go here).
You first need to install the Redis client library for Python if you do not have it already.
$ sudo pip install redis
Next copy and paste this into a file named “example_redis.py”:
#import the library
# Create connection object
r = redis.Redis(
# set a value for the foo object
# retrieve and print the value for the foo object
Now run the code:
$ python example_redis.py bar
With that simple test complete, if you have existing code or an app that uses Redis, just change the host, port, password and SSL certificates and you are done.
For more in-depth information about database options, go here.