TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Serverless OLAP with Seafowl and GCP

54 点作者 paws将近 2 年前
Hello HN! I&#x27;m an engineer at Splitgraph and recently started learning Rust so I could make my first contribution to Seafowl [0], an early stage analytical database. Along the way I figured out a database hosting hack on GCP and wanted to share it with HN. It&#x27;s a way to achieve &quot;true&quot; scale to zero database hosting that could be useful for certain side projects or spiky traffic situations.<p>A recurring problem I&#x27;ve faced with side projects is the need for Postgres, but no desire to deploy or maintain new instances. So when I learned GCP&#x27;s &quot;always free&quot; tier includes serverless [1] I got curious to see if I could run a database.<p>While a lot of classic databases aren&#x27;t usually a great fit for serverless, Seafowl separates compute, storage and catalog (catalog == a SQLite file of metadata). [2] Last month I was able to introduce GCS bucket compat to Seafowl, which enabled me to mount the catalog via gcsfuse (i.e. an adapter that allows attaching GCS buckets to local filesystems). Upshot: while FUSE does add HTTP requests to container startup, init time remains comparatively quick, even cold starts, because fetching is limited to the single catalog SQLite file only.<p>With this approach you get a URL you can query directly from your FE if you want, e.g. fetch() can send SELECT * ... queries straight from your users&#x27; browser. You could plot a graph from a static React frontend, or observablehq.com editor, with no persistent backend needed. So at times when nobody&#x27;s using your app, 100% of your stack can scale to zero with obvious cloud spend advantages. And even if you exceed free tier limits, being PAYG offers a good chance you&#x27;ll come out ahead on hosting costs anyway.<p>NB: Seafowl is an early stage project, so it&#x27;s not really suitable if you need transactions or fast single-row writes. Otherwise, this could be a nice way to get free database hosting at a big 3 cloud provider, especially for e.g. read-only analytical reporting queries.<p>Feedback and suggestions are appreciated. Hope it helps you! More available if you want [3].<p>[0] <a href="https:&#x2F;&#x2F;seafowl.io&#x2F;docs&#x2F;getting-started&#x2F;introduction" rel="nofollow">https:&#x2F;&#x2F;seafowl.io&#x2F;docs&#x2F;getting-started&#x2F;introduction</a><p>[1] <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;run&#x2F;pricing#cpu-requests" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;run&#x2F;pricing#cpu-requests</a><p>[2] Neon is another interesting project that separates compute and storage. <a href="https:&#x2F;&#x2F;neon.tech&#x2F;blog&#x2F;architecture-decisions-in-neon" rel="nofollow">https:&#x2F;&#x2F;neon.tech&#x2F;blog&#x2F;architecture-decisions-in-neon</a><p>One issue I observed was a noticeably longer startup time vs this FUSE approach, which I believe may be related to Postgres connection setup time&#x2F;roundtrips. Looking forward to trying Neon again in future.<p>[3] <a href="https:&#x2F;&#x2F;www.splitgraph.com&#x2F;blog&#x2F;deploying-serverless-seafowl" rel="nofollow">https:&#x2F;&#x2F;www.splitgraph.com&#x2F;blog&#x2F;deploying-serverless-seafowl</a>

1 comment

aleda145将近 2 年前
I use seafowl hosted on Cloud Run for a side project for Swedish Real Estate data. Around a million rows, seafowl works great!<p>One killer feature (aside from scaling to zero) is that the queries can be constructed as GET requests. That means we can cache the query results with cloudflare.<p>I have it exposed here if you want to write some SQL and check it out live: <a href="https:&#x2F;&#x2F;bostadsbussen.se&#x2F;sold&#x2F;query" rel="nofollow">https:&#x2F;&#x2F;bostadsbussen.se&#x2F;sold&#x2F;query</a>
评论 #36228666 未加载