Just because i got your attention i wanna let you know that i think cloudflare is one of the coolest and most awesome companies out there as a tech person.
Has anyone experienced a situation where, with caching turned on, the same query randomly returns an empty array for a while and then starts to return correct results? I never noticed this issue when caching is disabled.
Hi all, been trying to explore if it would be possible to use hyperdrive in combination with supabase.js. The idea would be to setup hyperdrive with supabase and then point the supabase web client to use hyperdrive rather then directly querying their global postgres instance. Just haven't been able to find any documentation/ examples how to specify a custom postgres url.
Hyperdrive doesn’t accept arbitrary client connections itself today. It’s designed to help folks use Workers to connect to their databases (including Supabase or Neon!).
Supabase.js makes HTTP requests directly to Supabase’s custom HTTP proxy (likely using pgrest in some way) as well - it’s not something we can really support given it’s very Supabase specific.
Just throwing in my 2c, we evaluated all of the popular “serverless” Postgres DBs and none of them ticked all the boxes/gave us as much confidence as AWS Aurora
The native protocol is used in the command-line client, for inter-server communication during distributed query processing, and also in other C++ programs. Unfortunately, native ClickHouse protocol does not have formal specification yet, but it can be reverse-engineered from ClickHouse source code (starting around here) and/or by intercepting an...
The caching relies on the protocol being specified (and a stable parser being available, plus a JS driver). But I’m asking as if you’re instead just querying it periodically/in a Cron/etc, the HTTP interface for ClickHouse is likely a more straightforward approach right now.
Sry I'm not sure I see why you think this is a problem. ClickHouse for OLAP is very performant. I use it for about 600 dashboards (for different users), and yes queries every time (but cached with a worker). It's also what powers Cloudflare's Analytics Engine IIRC.
It's got an HTTP endpoint to run queries, and honestly I might just stick to the Worker for caching + HTTP. I guess the most interesting part for me was the connection pooling.
I am very aware of how ClickHouse performs. What I am trying to point out is that if you rely on native ClickHouse support you may be waiting a long time, and that CH’s baseline performance may be “fast” but isn’t commonly sub-second for anything but the most simple queries.
Instead, using a HTTP interface will likely get you moving in the meantime, or trying their Postgres interface (untested).
Yeah, I use their HTTP interface since Workers didn't have TCP support yet when we decided to use it and I couldn't be bothered with creating and maintaining a HTTP proxy for any other OLAP/time-series DB. Performance-wise, the queries seem to run fast enough (20-200ms, we really aren't the same size as CF), helped with caching, but the latency is spiky (I suspect its due to making new the connections but haven't investigated yet).
It's not so supabase specific, actually. One of their core principles is using existing or their own open source software. In this case it's https://github.com/PostgREST/postgrest