Hosted database for serverless apps

Commonwealth is a hosted SQL database with powerful tools that scales automatically.




select *
from transactions as t
  left join accounts
    using user_id
where t.amount > 100;

EASY TO QUERY

Use SQL to query from your app

Our full SQL implementation includes everything you would expect: joins, transactions, aggregations, DML (data manipulation), DDL (data definition) queries, etc.


  • Relational tables with typed schema
  • ACID transactions across multiple tables
  • Strong consistency - writes propagate instantly, everywhere
  • Rich SQL tooling

EASY TO ACCESS

Query over HTTPS

Commonwealth is ideal for Serverless applications like those running in AWS Lambda. Send a request to our HTTPS API and results are returned as JSON. You can query from anywhere, and simple queries take XXms.


  • Query from any programming language
  • Simple token-based authentication
  • Designed for easy app integration
  • Batch queries in a single request

HTTPS request

fetch("https://api.commonwealth.io/sql", {
  method: "POST",
  body: "select * from users where id = 10384"
})

JSON Response

{                                                           
  "success": true,                                          
  "error": null,                                            
  "column_names": ["id", "email", "signup_timestamp"],      
  "column_types": ["int", "string", "timestamp"],           
  "data": [                                                 
    [
      "10384",
      "test@example.com",
      "2018-01-02T12:34:56Z"
    ] 
  ]                                                     
}     

ABSURDLY SCALABLE

Backed by Google Cloud Spanner, the world’s most powerful relational database.

You don’t need to pick machine sizes or capacity — Commonwealth adapts to your query traffic automatically and scales farther than AWS Aurora.