As of today, Redis high availability databases are generally available on Scalingo, adding replication and high availability to our current single node offer based on the leader-follower mechanism and Redis Sentinel.
Redis embeds both redundancy through a leader-follower mechanism and high availability thanks to Sentinel.
The leader-follower mechanism is both easy to use and focused on high performance. It allows followers to be the exact copy of the leader asynchronously. The followers automatically reconnect to the leader in case of trouble. This mechanism ensure redundancy in a multi-nodes setup.
On the high availability side, Redis provides Sentinel, a piece of software to setup a Redis deployment resilient to failures. Sentinel constantly check the healthiness of leader and followers and start the failover process if the leader becomes unreachable. Failover is the process of promoting an instance to leader, and ensuring other followers will follow this new leader.
Using a multi-nodes setup provides redundancy and high availability.
When you provision a Redis cluster on Scalingo, we start a couple of data instances and three Sentinel. Thanks to this replication setup, if an instance fails for whatever reason, your database will still be accessible without any downtime.
In order to get that running magically, we took advantage of the work done along with Elasticsearch cluster. Here is the network setup for Redis multi-nodes:
From the client's point of view (such as your application), there is a single
entry point to the cluster, namely the HAProxy master. Thus the environment
variable injected into the context of your application still contains only one
domain name. This variable takes the form:
redis://:<password>@my-db.scalingo.com:12345
.
When your application queries the Redis database, it enters the private network through the gateway (a HAProxy server), forwarding the requests to the Redis leader instance.
There are two redundancy layers in effect to increase your database availability:
To increase the security of your Redis deployment, instances are booted in a dedicated private network.
Redis does not allow for connection using TLS out-of-the-box. Thanks to this new setup, Scalingo Redis databases now support TLS connection from your client to your Redis database.
TLS encrypted communication between Redis nodes inside Scalingo private network is slightly harder to setup and is not ready yet. We are working hard to bring you this privacy improvement as soon as possible!
Note that Redis drivers for most languages support TLS connections. Prefixing
your Redis connection string with rediss://
instead of redis://
might do the
trick.
As usual, by default your database is not reachable from outside Scalingo's network. As announced last year, to make it reachable from anywhere around the world, you can now force TLS communication to connect to your Redis database.
This feature is available as part of new plans for your database. If you start a new database, you will be prompted to choose a plan. All the Business plans include cluster with two nodes holding the data, two gateway nodes, and three Sentinel. The first cluster ready version is 4.0.14-1. It is the 1st Scalingo revision of the version 4.0.14 of Redis.
For an existing database, getting a cluster takes a few steps. First, upgrade to the latest 4.0.14-1 version. It will start your database with a mono-node setup (i.e. a Redis instance in its own private network with a single gateway). Then you can change the plan in the "Addons" section of your application to choose a Business plan. Your database will migrate seamlessly from a mono-node setup to a highly available setup.
After upgrading your plan to a Business plan, your database is highly available and Scalingo ensure a 99.99% availability of your data. Moreover, updating to a more recent version is achieved with zero downtime!
You don't have to worry about data portability: your Redis database is completely standard (the base Docker images are open source) and you can retrieve all your data by querying it or download a backup.
Former mono-node plans are now available under the new plans category Starter while the old Free tier is now available under the name Sandbox.
Now there are 3 pricing categories:
You'll find the new pricing grid below:
As of today, all old plans are obsolete and are not available for new add-ons provisioning. As a matter of fact, all Scalingo Redis add-ons running the old free tier plan will be discontinued on June 30th and automatically transformed into the new Sandbox plan (which has the exact same memory capacity).
If you have questions or remarks regarding the new pricing plans or the new cluster feature, don't hesitate to contact us. We'd love to hear your feedbacks!
In the coming weeks, we will keep walking down the high availability by releasing PostgreSQL clusters. Stay tuned!
Photo by Henry & Co. on Unsplash
At Scalingo (with our partners) we use trackers on our website.
Some of those are mandatory for the use of our website and can't be refused.
Some others are used to measure our audience as well as to improve our relationship with you or to send you quality content and advertising.