Return to Activities

Building Scalable Apps with CockroachDB

Learn to build scalable web applications using CockroachDB as your database.

Workshop Overview

  • Beginner
  • 1.5h - 2h
  • Node.js, CockroachDB

Learning Objectives

  • Setting up CockroachDB on your computer
  • What a Database does
  • How your Database impact your app's scale
  • Build an application that saves data to CockroachDB
  • How to test your application’s ability to scale

Have a question?

Get in touch if you have any questions regarding this workshop or MLH Localhost.

About this Workshop

During this workshop you’ll teach participants the basics of SQL, how applications interact with databases, and how to utilize scalable database backends with CockroachDB. The provided content covers setting up CockroachDB, writing your first SQL queries, and creating a basic application where data is written to and read from a CockroachDB server.

Build with CockroachDB

CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data.

Scalable Databases

Protect always-on services from outages with CockroachDB’s multi-active availability designed for fully automated failover, load rebalancing, and data recovery. Minimize operator overhead with the easiest scaling story in the industry, implemented through a shared-nothing architecture composed of fully symmetric nodes and no external dependencies. Build for a global user base without compromising your customers’ experience. Always-on applications are enabled through capabilities like multi-active availability and synchronous, cross-datacenter replication. Deliver a low-latency experience using flexible replication controls that allow data to be stored close to customers.

Requirements / Prerequisites

Participants will be required to have a computer that can connect to the Internet and run the following software:

System Requirements:

Participants should have a basic familiarity with databases and web applications. During this workshop we will be using the node.js framework to create a basic application.


When you host an MLH Localhost activity, we’ll send you everything you need to run it. Here’s what we’ll send you:

The List:

Resources & Downloads

Installing Docker on your computer (Windows only)

Participants using Windows will need to install Docker to use CockroachDB.



Installing CockroachDB on your computer

Participants will need to install CockroachDB locally to run the applications they create. It will be easier for you to help debug issues if you have been through this before.


Mac Linux Windows

Getting Started with Node.js

During this activity, participants will be writing their Alexa Skills using node.js - while anyone who has written some JavaScript should be able to get started with this tutorial, participants would benefit from having a basic understanding of node.js and how it works.


Getting Started with Express (Node.js Web Framework)

If you choose to use Node.js, make sure you familiarize yourself with the Express framework. You should complete the basic tutorial on your own.


Build Scalable Apps (feat. CockroachDB) Instructor Guide (v1.0.0)

These are the instructions you'll use to teach the workshop. We'll be sending you a USB Flashdrive with a copy, but if you can download it here as well.

Build Scalable Apps (feat. CockroachDB) Instructor Guide


Build Scalable Apps (feat. CockroachDB) Presentation (v1.0.0)

These are the instructions you'll use to teach the workshop. We'll be sending you a USB Flashdrive with a copy, but you should also download a copy here as a backup.

CockroachDB Presentation


Organizer Resources

These are resources that organizers can use to manage their MLH Localhost events. Print these out for your reference during the event.

Sheet & Checklist

Sheet (PDF) Checklist (PDF)

Get Started

The hackers are waiting for you.

Have a question?