RethinkDB

RethinkDB is the first open-source scalable database built for realtime applications. It exposes a new database access model – instead of polling for changes, the developer can tell the database to continuously push updated query results to applications in realtime. RethinkDB allows developers to build scalable realtime apps in a fraction of the time with less effort.

Software Included

Package Version License
RethinkDB 2.4.1 Apache 2.0

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the RethinkDB 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB RethinkDB Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "rethinkdb-18-04"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying RethinkDB

After you create a RethinkDB One-Click Droplet:

  • You can view the RethinkDB Admin UI immediately by visiting the Droplet’s IP address on the administration port (8080 by default) in your browser.
  • You can log into the Droplet as root using either the password emailed to you or with an SSH key, if you added one during creation.
  • You can modify the default instance configuration by editing /etc/rethinkdb/instances.d/instance.conf.
  • You can check the logs of the server at /var/log/rethinkdb or through the Admin UI.
  • You can install clients/drivers based on your needs.Although you can start to use your droplet, there are a few setup steps that we recommend you take, since the cluster is running with default settings.

Setting up users

RethinkDB controls access to clusters through a system based around users, permissions, and scopes. Together, these allow you to specify fine grained control for reading, writing and administrative access down to a per-table level.

A new RethinkDB cluster always has one user named admin; this user always has all permissions at a global scope, and the user cannot be deleted. By default, the admin user has no password. You can change this by updating the admin user document, or by specifying the --initial-password command line option on startup.

The web administration UI always connects as if it were the admin user, and skips the authentication process (i.e., the password is not used for this connection). While the web UI cannot be password-protected, you can limit the addresses it will accept connections on using the --bind-http command line option.

If your Droplet is publicly available, it is highly recommended to not expose the Admin UI or limit the addresses it will accept.

For more information, please visit our Permissions and user accounts documentation.

Securing your cluster

The best way to secure a RethinkDB cluster is to run it on a protected network that doesn’t allow access from the outside world. However, this may not always be feasible. For example, cloud deployments often require access from wide area networks.

There are two main methods RethinkDB provides for securing the cluster: TLS encryption for connections, and binding the ports the server uses to specific IP addresses to limit outside connections.

For more information, please visit our instructions how to secure your cluster.