RethinkDB is an open-source, JSON database made to continuously push updated query results to your web application. This makes it easy to develop and scale real-time web apps. In February 2017, the CNCF (Cloud Native Computing Foundation) purchased the rights to the RethinkDB source code and contributed it to The Linux Foundation under the permissive ASLv2 license.
RethinkDB for All is a general introduction to RethinkDB on Compose.
Are you wondering what you'll get, or can get, with a Compose RethinkDB deployment? Want to know what you'll need to do to manage it? Check out some of the implementation features and details down in RethinkDB for Ops and Admins.
Just deployed RethinkDB and want to get coding with it? Developing an application or want to try a new stack? Then see the
RethinkDB for Developers section for resources on how to connect from different languages, command line tools and more information to get you started.
When deployed on Compose, RethinkDB comes with these standard Compose features.
- Automatically scaling server stack that scales RAM, CPU, and I/O as your RethinkDB data grows.
- Daily, weekly, monthly, and on-demand backups.
- Metrics displayed in the Compose UI.
- Deploy, manage, backup, and otherwise automate database tasks through The Compose API.
- Guaranteed resources per deployment.
- Daily logs available for download.
Compose deployments of RethinkDB also come with a number of RethinkDB specific features:
- Data Browser for RethinkDB.
- An optional add-on for real-time log access.
- The ability to forward rich metrics to services with an optional add-on.
- Start with 1GB storage for $22.50 - as you grow each additional gigabyte costs $18.
A standard RethinkDB deployment consists of a three node cluster, and one haproxy portal to serve as a proxy and provide SSL support to the cluster. Each data node has 1GB of storage and 102MB of memory. The haproxy portal has 64MB of memory.
As with all Compose deployments, a RethinkDB deployment features automatic vertical scaling so as an application’s data size increases, the RethinkDB resources scale fluidly to maintain consistent performance. You can also manually scale up your haproxy portals and RethinkDB nodes from the deployment's Resources panel. A 10:1 ratio of disk to RAM is maintained, so by increasing the disk allocated to the deployment, you increase the RAM allocated.
It is also possible to add haproxy portals in the Security panel of the deployment.
See Compose Datacenter Availability for current location availability.
Compose deployments are billed based on disk usage and your RethinkDB deployment usage is measured hourly. It is then grouped into a single monthly billing cycle. This means that any scaling or add-on usage will be charged from when the new resource was provisioned; not just for the month. You can see your deployment's usage in the Overview panel, under Current Usage.
Initial deployment set up is $22.50/month. Depending on which scaling and add-ons options you choose, the cost will increase. For example, if you wish to add extra storage and RAM, it is billed at an additional $18/month per unit of 1GB storage/102MB memory, so an additional 2GB storage/204MB memory will cost an additional $36/month.
All RethinkDB Deployments are high-availability clusters of three nodes and one haproxy portal. RethinkDB clusters consist of a master member which will coordinate writes. The additional members can become master in the event of a node failure. The data is spread across the cluster based on the replica and shard count.
Avoid Possible Data Loss
Replication of your data across nodes is not an automatic process. You will have to configure your data to spread across shards.
RethinkDB backups use the
dump command on your running database cluster to backup your entire deployment. You can both download your backups for local use, or restore them directly into a new Compose deployment. More information, details, and instructions for using your backups can be found on the Backups for RethinkDB page.
General information on backup schedules and downloading your backups can be found on the Backups page.
Since the Administrative Console is built-in to RethinkDB, it is the recommended way to interact and administrate your data outside of an application or script. However, if you wish to connect locally, using your language's driver and REPL, here are some general steps to get you started:
- Provision an SSH portal on your deployment (in the Security panel).
- Create a user and add their SSH key to your deployment (in the Users panel).
- Open an SSH tunnel to your deployment. See the Connecting to RethinkDB for more on this step, especially if you are on Mac OSX.
- In a separate terminal, start up your language's REPL, require the RethinkDB driver, and open a connection. More information on installing the client-drivers and setting up a connection can be found in the RethinkDB docs.
The Overview panel of the Compose UI provides the basic information you need to get connected to your databases. The Connection info section contains the Authentication Credential for your admin user and the RethinkDB Proxy Connection strings which will, along with the SSL Certificate, allow your application to connect to your deployment.
For more details and links to examples in many languages, see the Connecting to RethinkDB page.
The full list of documentation for RethinkDB is in the sidebar, in addition to all things Compose.
If this article didn't solve things, summon a human and get some help!