Develop and Deploy a Multi-Region Web Application

On this page Carat arrow pointing down
Warning:
CockroachDB v20.1 is no longer supported. For more details, see the Release Support Policy.

This tutorial walks you through developing and deploying a multi-region web application built on CockroachDB, using Flask, SQLAlchemy, CockroachCloud, and Google Cloud Platform services.

Note:

CockroachDB versions v21.1 and above support new multi-region capabilities, with different SQL syntax.

For the latest version of the application and database schema built on v21.1 multi-region features, see the movr-flask repository.

For the latest version of the tutorial, see the v21.1 docs.

The following sections make up the tutorial:

  1. MovR: An Example Multi-Region Use-Case
  2. Create a Multi-Region Database Schema
  3. Set Up a Virtual Environment for Developing Multi-Region Applications
  4. Develop a Multi-Region Web Application
  5. Deploy a Multi-Region Web Application

Throughout the tutorial, we reference the source code for an example web application for the fictional vehicle-sharing company MovR. The source code for this application is open source and available on GitHub, in the movr-flask repository . The code is well-commented, with docstrings defined at the beginning of each class and function definition.

The repo's README also includes instructions on debugging and deploying the application using Google Cloud services. Those instructions are reproduced in Setting Up a Virtual Environment for Developing Multi-Region Applications and Deploying a Multi-Region Web Application.


Yes No
On this page

Yes No