Live data from Hacker News

How we built a serverless SQL database

cockroachlabs.com

11–20 of 122 posts

Re: How we built a serverless SQL database

#11
post #7

This sounds great! I’ve wanted to create an open data portal for a while that lets you spin up a (ephemeral, read-only) Postgres database of a dataset and run queries on it, maybe with a notebook. Sounds like this might be perfect!

You might like what we’re building at Splitgraph: https://www.splitgraph.com/connect

Re: How we built a serverless SQL database

#12
post #2

To any who might see this, I'm the author of the blog post, and led the engineering team that built CockroachDB Serverless. I'll be monitoring this thread in case there are any questions you'd like to ask me about it.

Haven’t yet got time to read the whole thing so sorry if it’s already answered but is it possible to run this sql pod/storage pod separation setup yourself with crdb community/enterprise? We run enterprise crdb but it’s all in one process (with replicas)

It's not currently possible, partly because it complicates the deployment model quite a bit. Dynamically bringing SQL pods up and down requires a technology like Kubernetes. It takes some serious operational know-how to keep it running smoothly, which is why we thought it would be perfect for a managed Cloud service.

What would be your company's reasons for wanting this available in self-hosted CRDB? What kinds of use cases would it address for you?

Re: How we built a serverless SQL database

#13
post #7

This sounds great! I’ve wanted to create an open data portal for a while that lets you spin up a (ephemeral, read-only) Postgres database of a dataset and run queries on it, maybe with a notebook. Sounds like this might be perfect!

You might like what we’re building at Splitgraph: https://www.splitgraph.com/connect

Oh wow, very relevant indeed! I guess I thought ephemeral DBs would be better so that a user’s expensive query wouldn’t bog down the db for other users. And rather than just limiting them, enabling them to do whatever queries they could with pg running locally

Re: How we built a serverless SQL database

#14
post #5

Does CockroachDB Serverless expose an HTTP api? This sounds like a great fit for use with Cloudflare Workers, but that requires an http api.

Why do you prefer an HTTP API versus a DB connection? Isn't the former going to inherently have the overhead cost of creating the connection + TLS handshakes?

My question is similar, which is, is CockroachDB going to have an equivalent RDS proxy so that apps can handle traffic spikes and not have to deal with problems with DB connection pools

Re: How we built a serverless SQL database

#18
post #5

Does CockroachDB Serverless expose an HTTP api? This sounds like a great fit for use with Cloudflare Workers, but that requires an http api.

Why do you prefer an HTTP API versus a DB connection? Isn't the former going to inherently have the overhead cost of creating the connection + TLS handshakes? My question is similar, which is, is CockroachDB going to have an equivalent RDS proxy so that apps can handle traffic spikes and not have to deal with problems with DB connection pools

I think we won't be getting socket connections in some of the wasm powered JS runtime engines soon. Using http solves that, and a bunch of caching issues.

Re: How we built a serverless SQL database

#20
post #7

This sounds great! I’ve wanted to create an open data portal for a while that lets you spin up a (ephemeral, read-only) Postgres database of a dataset and run queries on it, maybe with a notebook. Sounds like this might be perfect!

[Disclaimer: I work for TileDB, Inc]

We have developed just this[1] except using a MariaDB storage engine (MyTile) we've written. You can serverless run queries against TileDB arrays without spinning up a MariaDB instance. You can run any type of query MariaDB supports (joins, aggregates, CTE, etc). I've linked the basic documentation and an example notebook below[2]. You can run SQL queries from python/R or even JS or curl. We support a number of data return formats, i.e. arrow and JSON to facilitate use cases.

I'll also mention that we have a number of public example dataset[3] in TileDB cloud, such as the NYC taxi data used in this notebook[4], which you can explore!

[1] https://docs.tiledb.com/cloud/api-reference/serverless-sql

[2] https://cloud.tiledb.com/notebooks/details/TileDB-Inc/Quicks...

[3] https://cloud.tiledb.com/explore/arrays

[4] https://cloud.tiledb.com/notebooks/details/TileDB-Inc/tutori...

Post reply on HN