Skip to content
プロジェクト

dumkydewilde/snowplow-serverless

GitHubで見る

dumkydewilde/snowplow-serverless has 45 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-23 16:12 UTC. Last push 2024-02-08.

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

概要

A cheap, serverless version of Snowplow deployed with Terraform that runs on dumky.net

データ

Serverless Snowplow

A serverless Snowplow pipeline on Google Cloud Platform (GCP) for ~€0.02/day.

This repository is a Terraform template to run a fully serverless snowplow pipeline based on Google Cloud Run and BigQuery. This allows you to run Snowplow at a minimal cost, especially for smaller sites and blogs.

Basic Setup

The basic idea is to run a serverless collector and all the other components on a schedule (e.g. three times a day). This allows you to scale down to zero while allowing still run a near-realtime pipeline.

The pipeline uses the following components

  • Cloud Run Service for collecting hits
  • Pub/Sub for communication between components
  • Cloud Run Job for enrichment
  • Google Cloud Storage bucket for storing custom schemas (everything in the schemas/ folder is automatically uploaded to this bucket)
  • Cloud Run Job for the BigQuery stream loader
  • Cloud Run Jobs for creating, mutating the BigQuery table as well as repeating failed inserts.
  • Cloud Run Job to run the Snowplow dbt packages. This currently fetches the dbt project inside this folder, but you can also supply it with your own dbt repo.

The collector is serverless so it will scale to zero if there is no traffic. However if you do have continuous traffic, this might not be the best option for you as serverless instances work best for intermittent loads. The rest of the pipeline runs on a schedule where it will process and load everything every three hours between 08:00-20:00 —who has the time for real-time data anyway, right?

Cost

I've been running this setup for blog with ~15.000 visitors/month for 2 cents a day. If you still have your GCP credits, you should be good for the next 30 years or so... In any case you always want to set up cost controls and keep an eye on your spending. Don't say I didn't warn you.

License

With the license changes of Jan. 8 2024 the collector and enricher need an additional configuration setting to agree to the new licenses. Since this type of set up (personal, serverless) is not high-availability you should be ok to use it. Of course the licensing changes do mean that you can not use any of the new versions of these components in a production/high-availability setting. Optionally you can use the OpenSnowCat fork or use a stand alone component like buz.dev.

To Do

  • Seperate service accounts for seperate services
  • Automate table creation on initial run
  • Add workflows in combination with schedule
  • Gracefully shut down Cloud Run Jobs when everything is processed instead of letting them fail on timeout
  • Create seperate storage bucket with enrichments to mount to enricher Cloud Run Job

関連プロジェクトを探す

読み込み中…