Couchbase is a distributed NoSQL database. It’s a document store in the same class of databases as MongoDB, but it differs in some interesting ways. For example, Couchbase offers a query language called N1QL that enables a user to write ANSI SQL (including joins!) against the document store. These N1QL queries return JSON documents. It’s a little weird, but it substantially simplifies the development of web, mobile, and IoT apps.
Couchbase has three products:
- Couchbase Server, the core NoSQL database
- Couchbase Lite, a lightweight version of the database that runs on Android and iOS devices
- Couchbase Sync Gateway, which manages the synchronization between the mobile and server components
This architecture leads to some amazing use cases, with companies like Ryanair using Couchbase in their mobile app to store information locally, improving customer experience through reduced latency when using a mobile app. This also provides the ability to continue using the app if the device is disconnected from the server or internet.
Beyond this core functionality, Couchbase offers the following components, which can be used in various combinations on heterogeneous nodes:
- Data
- Query
- Index
- Full Text Search
- Analytics
- Eventing
This flexibility enables users to scale whatever component of the database their use case demands. Couchbase calls this Multi-Dimensional Scaling (MDS).

I have a particular affinity for Couchbase because I was leading their cloud partnerships before coming to Oracle Cloud Infrastructure. They have a great team of people who are a pleasure to work with. Today, Oracle Cloud Infrastructure has a close partnership with Couchbase. We’ve created a Terraform module that automates the deployment of Couchbase on Oracle Cloud Infrastructure.

Writing this module has been an interesting continuation of my introduction to Terraform. That introduction was working with Gruntwork.io on the Terraform module that they created to deploy Couchbase on AWS. One of the cofounders, Jim Brikman, literally wrote the book on Terraform. It’s a good read. Gruntwork also created an open source framework for testing Terraform code called Terratest. We’re currently looking at ways to use that in our work at Oracle Cloud Infrastructure.
Before working on the Terraform module, I’d worked with the infrastructure as code (IaC) languages that each cloud provides: AWS CloudFormation, Azure Resource Manager, and Google Deployment Manager. It’s been interesting to explore how Terraform presents a single framework for deploying on any cloud, providing an open source technology that is the basis of a multi-cloud world.
I’ve been impressed by Oracle Cloud Infrastructure’s choice to embrace an existing open source technology, both by joining the Cloud Native Computing Foundation (CNCF) as a Platinum member and contributing the Oracle Cloud Infrastructure provider to the Terraform project. This open approach to building a cloud seems preferable to technology stacks that lock users into a single platform.
I worked with our video team to record a demo that shows how to run the Terraform module to get a Couchbase cluster on Oracle Cloud Infrastructure:
The module deploys both Couchbase Server and Sync Gateway. You can, of course, configure it to deploy different numbers of nodes, machines, and so on. This is just the start of our partnership with Couchbase. Here are some upcoming items:
- Oguz Pastirmaci on the Oracle Cloud Infrastructure Data and AI team is working to improve the module, including revving it to Couchbase 6 and adding MDS support.
- We’re debating whether to reuse the Python template generator approach I’ve used on some other technologies or wait for the control structures that Terraform 0.12 is introducing.
- A blog post about the Kubernetes Operator for Couchbase on Oracle Cloud Infrastructure Container Engine for Kubernetes is coming soon.
We’re also starting to run some POCs of Couchbase on Oracle Cloud Infrastructure. If you’re interested in learning more, reach out to me at ben.lackey@oracle.com or on Twitter @benofben.