Skip to content
0:00 / 0:00

#citus#postgresql#kafka

Breakout Session Presented by Dan Robinson of Heap at PGConf Silicon Valley 2015

Citus Data

2.9K subscribers • 3 videos on Hallway

YouTube
  • Recommended by 4 people: 4 on Hacker News.
  • Presented by Dan Robinson, CTO of Heap
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

14K views10 years ago4 recommendations

Databases and dataDistributed systemsPostgresDatabase internalsScaling and large-scale architecture

Dan Robinson explains how Heap scales its product analytics backend to billions of events using PostgreSQL, Citus, and Kafka.

Powering Heap With PostgreSQL And CitusDB At Heap, we lean on PostgreSQL for all our backend heavy lifting. We support an expressive set of queries — conversion funnels with filtering and grouping, retention analysis, and behavioral cohorting to name a few — across billions of users and tens of billions of events. Results need to come back in a matter of seconds and reflect up-to-the-minute data. This talk will discuss these challenges, with a particular focus on: - Using CitusDB for interactive analysis across 50 terabytes of data and counting. - PostgreSQL and Kafka: two great tastes that taste great together. - UDFs in C and PL/pgSQL, partial indexes for pre-aggregation, and other tricks up our sleeves.

Why it's here

4 people recommend this

What people say. Recommended as a great case study on scaling event processing and analytics using PostgreSQL and Citus.

Judsonon Hacker News • Recommends

On “TrailDB – An Efficient Library for Storing and Processing Event Data”

I was just watching this0 excellent talk from one of the Heap Analytics engineers on their use of CitusDB + Postgres to do event processing. What use-case would TrailDB be the obvious, hands-down way to go (vs maybe Postgres + Citus)? 0: link to this video

devbugon Hacker News • Recommends

On “Building a Scalable Postgres Metrics Backend Using the Citus Extension”

If you haven't already seen it, Dan from Heap Analytics has a great talk about how they use Postgres and Citus. link to this video

simianoon Hacker News • Recommends

On “When to Avoid JSONB in a PostgreSQL Schema”

Keep in mind that Heap collects a huge amount of data and has a huge dataset. I like this1 talk, it gives you an overview of their architecture. Great post though, thank you for sharing. 1 link to this video

macoboon Hacker News • Recommends

On “How Discord Stores Billions of Messages Using Cassandra”

Regarding a), a sharded postgresql (i.e. with citus data) can easily accomodate that workflow with just a tiny bit of extra overhead. Re c) this strongly depends on the usecase, I've seen companies use a) to avoid split-brain problems and having to manage two data pipelines to great success at similar scales. You might find link to this video interesting.

macoboon Hacker News • Recommends

On “Running 10M PostgreSQL Indexes in Production”

You need a queue in front of your database irregardless of write latency. Otherwise you tie your availability to database availability as downtime (even for upgrades) is often unavoidable and network problems are common. Dan gave a pretty good talk about the high-level details of how/why postgres a couple of years back: link to this video . One reason of why pg is that SQL is really powerful for building complex queries.

malisperon Hacker News • Mentions

On “When to Avoid JSONB in a PostgreSQL Schema”

…tions in terms of planning and additionally by turning off nested loop joins. We are planning on pulling out the most common properties that we store in the data column, which will give us proper statistics on all of those fields. I am currently experimenting with what new indexing strategies we will be able to use thanks to better statistics. 0 link to this video…

malisperon Hacker News • Mentions

On “When to Avoid JSONB in a PostgreSQL Schema”

That get's into our indexing strategy which Dan talks about in this talk0. Currently our tables aren't completely insert only, so a BRIN index wouldn't work for us, as one row in the wrong place can cause a huge amount of extra reads. 0 link to this video

malisperon Hacker News • Mentions

On “Launch HN: PostHog (YC W20) – open-source product analytics”

I'm curious as to how you plan to scale PostHog to larger users. As the person who scaled Heap, here is my honest opinion of this. I think there is going to be a huge challenge ahead in scaling query performance. This was perpetually a challenge at Heap and was for a long time the main limitation on Heap's growth. The challenge was tough enough for Heap and PostHog is going to be at a huge disadvantage due to the lack of multi-tenancy. When you use Heap, your data is stored across Heap's entire cluster of machines. When you run a query, that query is ran simultaneously against every single machine in Heap's cluster. Even though your data may be taking up something like .1% of the total disk…