tailored database solutions: building a 100 billion records db in 20 minutes

10
Tailored database solutions with Voron Oren Eini [email protected] ayende.com/blog Hibernating Rhinos L i v e C od i ng Se s si o n

Upload: oren-eini

Post on 11-Aug-2014

24.759 views

Category:

Data & Analytics


15 download

DESCRIPTION

In this talk, we can see how we can use Voron to build a time series database to store 100 billion records

TRANSCRIPT

Page 1: Tailored database solutions: Building a 100 billion records db in 20 minutes

Tailored database solutions with Voron

Oren [email protected] ayende.com/blog

Hibernating RhinosLive

Cod

ing

Sess

ion

Page 2: Tailored database solutions: Building a 100 billion records db in 20 minutes

Let’s implement a database Time series database, but what are those?

Heart rate monitor watch. Every 30 second sends:

Watch Id, Time, Heart Rate

You sold 100,000 of those. Users want to log in and see their stats.

Page 3: Tailored database solutions: Building a 100 billion records db in 20 minutes

Traffic Per watch:

2,880events per day

89,280events per month

1,051,200events per year

Globally (100K watches): 288,000,000

events per day 8,928,000,000

events per month 105,120,000,000

events per year

Just under 3,500 events per second, sustained

Page 4: Tailored database solutions: Building a 100 billion records db in 20 minutes

100 billion events / year How do we approach this?

Page 5: Tailored database solutions: Building a 100 billion records db in 20 minutes

Design… Each watch has an id (string, up to 40 chars) We model each watch as a tree in Voron The tree uses:

Big Endian date for key Heart rate number as value

Let us go and build this…

Page 6: Tailored database solutions: Building a 100 billion records db in 20 minutes

Let us build this

And someone time me…, please

Page 7: Tailored database solutions: Building a 100 billion records db in 20 minutes

Great, now about those reads What kind of reads we need? Always on a specific watch. For a given date range.

Page 8: Tailored database solutions: Building a 100 billion records db in 20 minutes

Let us build this

And someone time me…, please

Page 9: Tailored database solutions: Building a 100 billion records db in 20 minutes

What is left? Real performance testing… Concurrent reads & writes Connecting to a server…

Dropping old data / consolidating it.

Page 10: Tailored database solutions: Building a 100 billion records db in 20 minutes

Questions?