HomeVideos

From "napkin math" to turbopuffer

Now Playing

From "napkin math" to turbopuffer

Transcript

1615 segments

0:00

I'm excited to have a chat with Simon

0:02

Ericson, [music]

0:03

founder, CEO of Turbopuffer, a very

0:06

technical CEO, and we're going to have a

0:07

pretty technical discussion. But before

0:09

we jump into it, Simon, I wanted to ask,

0:13

where did you fall in love with

0:15

computers?

0:17

Um, through PowerPoint.

0:19

>> PowerPoint.

0:21

you I don't know if any of you know this

0:23

but in power well you probably know this

0:25

but in PowerPoint right you can make the

0:26

the diagrams and stuff when you click

0:28

them go to another slide

0:32

that becomes turning complete real quick

0:34

right you can sort of you know create

0:36

very complicated convoluted games and

0:38

then at some point you know you make it

0:41

through the Microsoft Office suite and

0:42

you discover Front Page do you remember

0:44

Front Page

0:45

>> yeah I remember Front Page it it was

0:47

supposed to eliminate the need for all

0:49

any front-end developers

0:51

Exactly. And it it only worked in

0:53

Internet Explorer. I remember a

0:55

heartbreak I had one day when someone

0:57

opened a website I created in Firefox

0:58

and it just it was it was all over the

1:01

place. And then one day I accidentally

1:03

clicked the HTML

1:05

thing in front page and it just showed

1:07

all of this stuff that I couldn't make

1:08

sense of and it just started looking at

1:10

it and then going online and finding

1:12

little snippets that you could add in to

1:14

make the cursor change and all of these

1:16

different uh different things. And then

1:19

it just sort of escalated from there.

1:20

Then you upgrade to Dreamweaver and now

1:23

you're coding and then you're like,

1:24

well, how do you make the pages

1:26

dynamically? You learn PHP. And then for

1:28

me, I exhausted the internet on Danish

1:32

language programming advice.

1:35

>> Um, and I was I was around 11 or 12.

1:39

And so I just, you know, went and got

1:40

addicted to World of Warcraft for four

1:42

years. But that gets you really really

1:43

good at English. [laughter]

1:46

So you kind of start hacking, get into

1:49

deeper. Now the logical step would have

1:50

been to just, you know, go to university

1:53

and learn properly about this stuff. But

1:55

that's not what you did, did you? I

1:59

mean, I just um I

2:03

I started just I I mean, you know, then

2:05

I learned video games, then I learned

2:07

English, and then, you know, this like

2:08

massive arsenal of the web. I now it'd

2:11

be very interesting because the LLMs

2:12

would just speak Danish to me and you

2:14

could just you wouldn't have hit the

2:16

wall like I did.

2:18

>> Um so that would have been very

2:19

interesting. Maybe I would have been

2:20

better at programming. That would have

2:21

been nice. And then I Yeah. Then I just

2:24

started picking up jobs and things like

2:26

that throughout high school. And when I

2:28

was in high school as well, I got

2:29

exposed to this thing called the

2:31

International Olympiad in Informatics.

2:33

You

2:33

>> heard of this thing?

2:34

>> Yeah. Um, and I had a I had an internet

2:37

friend and she lived in Australia and

2:39

she was on the Australian team and she

2:41

told there's probably something for the

2:43

Danish team as well, but I had never I'd

2:45

never heard about it before. And so I

2:47

found it on some like little mysterious

2:49

website and then applied and then solved

2:51

these programming problems that look

2:53

very different from the HTML and PHP

2:56

things that I'd solved until

2:57

>> were like the algorithmicalish programs.

2:59

>> Exactly. It's sort of like this is not

3:02

actually the kind of problem you would

3:03

see there but I think it illustrates

3:04

well the kind of problem that you might

3:06

get right is you can imagine something

3:08

like okay here's like n trucks here's m

3:11

packages the m packages have these

3:14

dimensions

3:16

give me which trucks which packages

3:18

should be in right and then do something

3:21

optimal like that's an npmplete problem

3:23

you can't solve that but you could

3:24

compete with everyone else in the

3:25

competition of doing the best thing so

3:26

it's these kinds of problems right

3:28

>> um and so I started Ed doing that in

3:30

high school. I was working um I was

3:32

working as well um for a startup. Um and

3:36

then I just Shopify found me while I was

3:41

still in high school.

3:42

>> And and the whole like Shopify found me

3:44

was it through your open source

3:45

contributions? Was it was it something

3:47

else? It was because I had written an

3:50

article where I had I had I dropped my

3:54

iPhone and it was you know the iPhones

3:57

are a lot like there used to be a time

3:59

right where you drop your iPhone and you

4:00

just knew it was over for the screen.

4:02

>> It doesn't really happen as much anymore

4:04

like the screens have gotten a lot

4:05

better but back then it was like yeah

4:07

one drop and it was dead and it just

4:08

couldn't use it anymore. And so I went

4:10

back to one of these old Nokia brick

4:12

phones and this is back in 2013 and

4:14

people hadn't really realized all the

4:16

pernicious effects of smartphones at the

4:18

time. And so I wrote this article about

4:20

how oh my god I'm like calling people

4:22

and I have my sense of direction back.

4:25

Um and I wrote an article about it and

4:27

this article it went on hacker news

4:28

briefly and it um New York Times decided

4:32

to feature it.

4:33

>> No way.

4:33

>> Yeah. And so a lot of traffic was driven

4:37

to it and then some astute Shopify

4:40

recruiter put it all together and um and

4:44

I had a call with them and then I don't

4:46

think they realized that I was still in

4:47

high school but um but I had a great

4:50

call with them. They invited me on site

4:51

to Ottawa, Canada. Um I had no idea what

4:54

Ottawa Canada is. I think the email says

4:57

something like what's an Ottawa? I had

4:59

no idea. Um, and so I went there and it

5:02

was just like walked into the building

5:03

and it was just a just felt right. Um,

5:08

and so I I I interviewed with them and

5:10

then said, "Well, I got to finish high

5:11

school first." And then uh and then I

5:14

moved to Canada uh to to to work at

5:16

Shopify. Yeah. In 2013.

5:18

>> Yeah. I think that's that's a like legit

5:21

excuse for like not even worrying about

5:23

college and and university.

5:24

>> But I did it crossed your mind.

5:26

>> It did. I thought I was going I thought

5:28

I was doing a gap year. I thought I was

5:30

like, "Okay, I'm gonna go work at

5:31

Shopify for a year and then I'll

5:33

probably go back and do but I would just

5:37

I was very insecure at the time about

5:39

the fact that I hadn't studied computer

5:41

science and my only exposure had been

5:42

all the II competitions which is a

5:44

pretty good crash course in a lot of

5:45

computer science. And if nothing else,

5:47

it had really taught me that you can

5:49

just sit down and read a paper and just

5:51

figure it out if you spend enough time

5:52

on it. So I did I did that repeatedly

5:55

and in my first year at Shopify I just

5:58

every time I heard something that I

5:59

didn't know what was I noted it down on

6:01

a piece of paper and then I went home

6:02

and then that evening I would just read

6:03

about it because I felt insecure that

6:05

like well if someone mentions mentions

6:07

like TCP surely they know exactly what's

6:10

in the three-way handshake and how TLS

6:11

is like layered on top and they've

6:13

looked at Wireshark and all of that. I

6:14

don't think that's true but that's what

6:16

I thought.

6:17

>> So I went and did that for everything

6:18

that I encountered. Um, so that was a

6:20

really good crash course and then very

6:22

quickly it became clear that well I just

6:24

want to continue doing this. I don't

6:25

want to go go somewhere else and then

6:28

come back to this because I felt like

6:29

I'd already found what I wanted to do.

6:32

So it sounds sounds like it was a pretty

6:33

good combination of like you just having

6:35

this like very natural insecurity like

6:37

you're young, you know, you don't have

6:38

the education that everyone else has and

6:40

inside a company that's just doing

6:41

pretty like cutting edge stuff even at

6:43

the time and even to today, right? like

6:45

they're they're leading and so you just

6:48

kept self-seing yourself like just

6:50

catching up and go and do I understand

6:51

that you just went deep in every concept

6:53

that you didn't like just like try to

6:55

understand at surface level but like go

6:57

as deep as you can search on the

6:59

internet buy books whatever that is I

7:01

think it was just that

7:04

I just wanted to know keep learning how

7:06

computers work and I think that this is

7:08

something that I now look for when we

7:10

interview engineers is that you just you

7:12

can't help yourself but trying to peel

7:14

back the layers And for me that ended up

7:16

with the infrastructure layer. That was,

7:19

you know, the people closest to the

7:20

metal at at Shopify. And I would just

7:24

always sit next to them at lunch cuz I

7:25

was working on the on the product side.

7:27

But I just I couldn't help myself. I was

7:28

so I just wanted to learn what it was

7:31

when they were talking about a reverse

7:32

proxy. I'm like, why is it reverse? I I

7:35

still can't answer that. [laughter]

7:40

I I I mean, okay. [laughter] Do you

7:43

know?

7:45

Well, what's in reverse? Because it's a

7:48

proxy, right?

7:51

I don't I don't know. I don't know. It's

7:54

like an inverted index. Like, what's

7:55

inverted? It's like it's a terrible name

7:57

anyway.

7:58

>> Yeah.

7:59

I I mean, it's still better when when

8:01

you get to not tables, the lookups, some

8:04

of those things like some of that. But

8:05

yeah, I hear you. There there's some

8:06

like weird names with this, but at at

8:10

Shopify,

8:12

what were some of the kind of like hard

8:15

engineuring challenges that you

8:16

engineering challenges, outages,

8:20

like like learnings that kind of defined

8:22

you that were really also fun at the

8:24

time or interesting to learn, but it

8:26

would have been hard to get it

8:27

elsewhere. Yeah. Yeah. So I think it

8:29

was, you know, in the 2010s there's like

8:31

a bunch of SAS companies that that scale

8:32

really quickly and I felt so fortunate

8:35

to have a front row seat to that and so

8:38

I ended up on the infrastructure team

8:39

and this was back in you know 13 14 and

8:42

uh Docker was coming out and so we were

8:45

containerizing everything and we were

8:47

just every single year we had to you

8:50

know the growth rates of of of SAS

8:52

sometimes seems quaint in comparison to

8:54

the growth rates of companies today but

8:55

it was a company that was growing at you

8:57

know 1204 40% year-over-year. Um, and so

9:01

every year we were just preparing for a

9:03

Black Friday that was going to be a lot

9:04

worse than the last. And this is back in

9:06

the day of we're buying physical

9:07

hardware, right? We have to like place

9:09

an order at a particular point in time

9:10

and do some interpolation based on that.

9:12

Um, and the software also had to scale.

9:14

And when you're scaling most software, a

9:17

lot of the application layer problems

9:19

end up back at the database layer.

9:21

>> And so I just naturally found myself at

9:24

this layer between Rails and the

9:26

databases. Shopify didn't at the time at

9:29

least contribute many patches to the

9:30

databases themselves but mostly just

9:32

spent time orchestrating. So we were

9:34

doing sharding because as um my my dear

9:39

boss Camilo used to say you can't cash

9:41

rights. So there's a fundamental point

9:43

where you you just you have to move

9:46

beyond a single shard. Um so I wasn't I

9:49

joined around the time and they did the

9:50

sharding and they did it I think they

9:52

did the cut over a week before Black

9:54

Friday which is mindblowing.

9:56

uh and very but it worked and then the

10:00

the subsequent years we worked on things

10:01

like going into multiple data centers.

10:04

We also had this big mysterious reddish

10:06

server that was like you know 128 GB of

10:08

RAM which was a lot at the time. Today

10:10

it's not that much and no one really

10:12

knew what was in it and then it went

10:13

down one day and people were like well

10:16

that's super terrifying. Um because

10:18

people had just been treating it as this

10:19

KV store. Um and so we started splitting

10:22

it out. We did all this stuff around

10:24

making sure that if you if you if you go

10:28

visit a Shopify store and the thing that

10:31

stores your sessions is down, the right

10:34

behavior is not just for the entire the

10:36

of everything to be down. But that's

10:37

kind of the default failure mode, right?

10:39

You're not going to rescue all of that.

10:40

Um unless you're in a programming

10:42

language that really forces that

10:43

decision. So we did things like um build

10:46

this matrix out of okay well this

10:49

service when this component is down

10:51

should act this way. Um and I found

10:54

myself writing the test suite for a

10:56

bunch of that. And then I was like okay

10:57

well we can't just mock all of this. And

10:59

so um I came up with this idea at the

11:01

time of like oh what we're going to do

11:02

is we're just going to um shell out to

11:04

GDB and then into the process and then

11:07

close the file descriptor to the

11:09

database to simulate through the entire

11:11

layer that the database fails. That was

11:13

a little crazy and we never shipped that

11:15

on CI but it did uncover a massive

11:17

amount of issues in Rails that'd be

11:19

upstream and things like that of around

11:20

just like handling failures at the

11:22

connection layer. So then I moved on to

11:25

create this proxy called Toxyroxy and

11:28

>> have you heard of this before?

11:29

>> No. No.

11:29

>> Yeah. Toxyroxy is it's just like a layer

11:32

7 proxy that sits in between um you and

11:36

well layer four but in between you and

11:38

the databases. So you basically have

11:40

just like this proxy and then my SQL

11:42

whatever doesn't speak the protocol but

11:44

then you can do an API call say take

11:46

take uh take the database down make it

11:48

slow um and over time it also added

11:51

layer 7 things of like do a bunch of

11:52

failures this way you're not mocking the

11:55

low-level drivers but you're testing the

11:57

drivers and their failure handling as

11:58

well so then this entire matrix could be

12:00

implemented in CI

12:02

>> so the basically the proxy was just like

12:04

a really thin layer which like was

12:06

passed through but you built the

12:08

functionality to like simulate problems

12:10

with database or things like data

12:12

corruption or whatever you wanted to do.

12:14

So you could just do it in there and

12:16

then you can anything that built on top

12:17

of it. But but then Oh yeah and then

12:20

everyone had to like call this proxy or

12:21

it needs to be on in in a layer.

12:23

>> Exactly. So you could do like

12:25

>> do like my SQL you know toxyroxy

12:27

mysql.down down and then pass it a

12:29

lambda of what you wanted to do like get

12:31

this page do a checkout whatever with

12:33

the sessions table down and this just

12:35

uncovered

12:37

tens of issues right in the MySQL driver

12:39

in the Rails like it's just like no one

12:40

in the ecosystem had been testing for

12:42

this and it was very difficult to see

12:44

this in prod right because when my SQL

12:45

down you're focused on just getting back

12:49

up and not like what could the

12:50

application actually have done yeah it's

12:52

interesting of course we're going to

12:53

talk a bit more about databases

12:54

obviously but just thinking about how a

12:57

lot of the problems or some of the most

12:59

gnarly problems in large systems are

13:01

always to do with state and I never

13:03

connected until now that I mean state is

13:05

usually there's a database if there's no

13:07

database if you have stateless services

13:09

you know I mean you still have problems

13:10

you have nodes going down you have I

13:12

don't know corruption whatever but it's

13:14

usually like more isolated but basically

13:18

like if we have state we typically have

13:19

databases if we have databases and if

13:21

you can simulate these problems suddenly

13:23

you can I mean you you can like predict

13:25

a lot of things the problem with state

13:27

oftens often time is it's really hard to

13:29

simulate problems happening ahead of

13:31

time unless when they happen. So did you

13:34

it sounds like you had pretty good

13:35

success with

13:36

>> Yeah, I think to my knowledge it's still

13:40

um running in like the CI system of

13:42

Shopify today. I don't know if anyone in

13:43

the crowd is from Shopify, but I'm

13:45

pretty sure that it still does. Um and

13:47

so we wrote all these tests against it

13:49

to implement all of these different uh

13:50

different failure conditions and it just

13:52

yeah it was it was it worked out great.

13:55

So you spent eight years in total at at

13:57

Shopify. So like started from like all

13:58

right just a gap year it just went on a

14:00

year a year another year. Um at what

14:04

point did you think about leaving and

14:07

why and what was your kind of decision

14:09

framework? It sounds like you or you

14:11

were like on epic right now even today

14:13

Shopify it's doing wonderful is probably

14:15

doing even way better than like like you

14:17

know that growth kind of kept on. So I'm

14:18

sure there would have been an argument

14:19

to stay and you know stay on their

14:21

rocket ship.

14:22

>> Yeah. So I I spent I spent eight years

14:24

there from 13 to to 21. Um and I I think

14:29

there just came a point where

14:32

I wanted to see something different.

14:33

Again, I've been inside of Shopify since

14:35

I was 18 years old, right? I'd been seen

14:37

one other startup in high school. I was

14:39

like, if I want to learn more about

14:41

computers and learn faster, it might be

14:43

time to inject some novelty into this

14:45

function. Um, and so I I left in in in

14:48

21 and I'd worked on so many different

14:51

parts of the infrastructure like

14:53

caching. Um, me and Justine, who is now

14:55

my co-founder, rewrote the entire

14:57

storefront um, storefront for Shopify

15:00

um, which powered almost 100% of traffic

15:01

18 months after we embarked on it. Um,

15:04

we worked on running Shopify in multiple

15:06

data centers. We worked on so many

15:08

database scaling projects like caching,

15:11

all of these different things, right?

15:12

Um, a lot of the a lot of the

15:14

scalability came from the Kardashians

15:16

launching lots of products on on

15:18

Shopify, which would force a lot of

15:19

traffic. Um, but that's that's

15:21

eventually how I left. And so when I

15:23

left, I didn't really know what I wanted

15:25

to do. And so I one of the projects I

15:29

had while I was at Shopify was this

15:31

napkin math project. Have you seen this

15:32

>> napkin math? No.

15:33

>> No. Um, so napkin math was essentially

15:37

just this table that I maintain on

15:40

GitHub of how much bandwidth can you

15:43

drive to DRAM, what does a roundtrip to

15:45

S3 cost, and how long does it take, how

15:49

much bandwidth can you drive to an NVME

15:51

SSD, how much bandwidth can you drive to

15:53

an EBS volume? Just a collection of

15:57

probably there's probably like 50 of

15:58

these numbers and then a RS script that

16:00

generates them all. um what all these

16:02

things cost? What do you like? What does

16:04

a gigabyte of memory cost? $2. What does

16:06

a gigabyte of S3 cost? Two cents. What

16:08

does a gigabyte of um this cost 10

16:10

cents, right? What does it cost on spot?

16:12

What does it cost on a three-year

16:13

commit? Like I had just have a massive

16:15

table and then create flash cards for

16:17

almost every single cell. So I know all

16:19

these numbers. And this was a project I

16:21

started taking on at Shopify because I

16:23

found myself in um this role a lot where

16:26

I would go in and review a project,

16:28

right? So some product team would be

16:29

like okay we got to do we got to build

16:30

this thing so we got to build this

16:32

infrastructure to support the feature

16:34

and a lot of the times they would say

16:36

okay well we've gone and benchmarked it

16:37

on database A

16:40

but the benchmarks are not very good so

16:42

we're going to go with database B

16:45

and I hate benchmarks so much because

16:50

that's not a satisfying answer to me to

16:54

me it's like

16:56

this does not jive with my intu ition

16:59

database A that you're saying takes 10

17:01

seconds to do this

17:04

should take 10 milliseconds if you do

17:05

the napkin math right if it's a search

17:07

query right it's like okay you're

17:09

searching for three terms there each

17:12

term has this many documents that match

17:14

it that's this many megabytes we inter

17:16

intersect these many this many lists

17:20

you have DRAM bandwidth on multiple

17:22

cores of 100 gigabytes per second this

17:24

should take 10 millisecond you tell me

17:25

the benchmark takes 10 Second, one of us

17:28

is wrong. Either there's a gap in my

17:30

understanding, which is very likely, or

17:33

you would benchmark the wrong thing. And

17:35

in some ways, some reasons, right, it's

17:37

like, okay, you've done a benchmark. You

17:38

don't didn't realize that your benchmark

17:39

is doing a distributed query across a

17:42

100 different nodes. And so, of course,

17:44

the P99 is going to be really, really

17:46

high, right? Unless you've cut that off

17:47

or or made some different set of

17:49

trade-offs. So I just found myself in

17:50

these discussions repeatedly where

17:53

people were making infrastructure

17:54

decisions based on poor benchmarks. And

17:57

so I needed some I I needed some ammo to

17:59

go in and just be like okay we can just

18:01

do the calculation right here and then.

18:03

Um because I was always doing these like

18:05

little demos or like writing little

18:06

prototype scripts to to demonstrate

18:08

this. But it was just I just the

18:10

argument of here's how a beach works.

18:13

This is how many pages we have to visit.

18:15

This is what a random SSD read takes. It

18:17

takes one millisecond. you have to visit

18:19

a thousand blah blah blah blah blah and

18:21

then present it back and see this is the

18:23

difference to your query well like is

18:24

the query plan correct like is there a

18:26

bug in my SQL do we have bad discs like

18:28

what's the discrepancy here and I just

18:30

got caught with that bug and so after I

18:32

left sha I was just writing a lot of

18:33

articles about this I was just like well

18:35

how long does should this query take and

18:37

then I one hypothesis I had at some

18:39

point is like okay well how many writes

18:42

per second can my SQL do well shouldn't

18:44

the amount of writes per second that my

18:46

SQL do equal the amount of f-syncs that

18:48

you can do per second. That sort of

18:50

makes sense, right? Every time you do a

18:51

ride, you f-sync to persist to disk. So,

18:54

how many f-syncs can you do per second?

18:56

Well, an f-sync takes one millisecond.

18:57

So, you do a thousand rights per second.

18:59

That well, that doesn't really match up.

19:00

Like, feel like a database can do more

19:01

than,000 rightes per second. Why can it

19:03

do that? So, that was one of those

19:05

things where I tested and it's like,

19:06

okay, well, my SQL on a little dinky box

19:08

could do 10,000 writes per second. Well,

19:10

how is that possible?

19:12

>> And now you would just ask, how is it

19:14

possible?

19:14

>> Because you batch. So, an F-Sync happens

19:17

on usually a 4K.

19:19

>> Yeah.

19:19

>> Right. But it's like that's not

19:21

intuitive. Like it's actually I I I got

19:23

caught. It was like just like, you know,

19:24

probably some like 24-hour period where

19:26

I just got obsessed with this question.

19:28

Whereas like you're writing like the BPF

19:29

traces and all of that to do all of

19:31

this. This is like prelim so it took

19:32

forever. And you and then I found out

19:36

that oh every fsync was like much larger

19:38

than I would have inferred like oh it's

19:40

batching. you go into the code and you

19:42

read it and then you found some obscure

19:44

article by it's always somewhere in like

19:46

a central German town that's like

19:48

written some article about like how some

19:51

intricacy of my SQL works and a patch

19:52

that they did to it's like the entire

19:55

internet runs on small towns in Bavaria

19:57

I'm convinced. Yeah.

19:59

[gasps and laughter]

20:01

And then you decided to start Turuffer.

20:05

Yeah. Did how did you decide? Did you

20:08

know what you wanted to build or was it

20:09

more like I want to build something

20:11

something databases because you were

20:12

clearly very into databases. You you've

20:14

done an awesome job benchmarking like

20:17

what is the theoretical like limits. You

20:19

were very familiar with this probably

20:20

became you know like world expert in in

20:23

this niche and then how

20:28

>> did did you want to go into databases

20:29

again?

20:31

>> I think it was

20:34

there's three things that sort of came

20:35

to a head. Um, the last project that I

20:37

worked on at Shopify was Search and I

20:41

didn't have a good time.

20:42

>> What What What did you use back there?

20:44

>> Um, I don't we don't need to name names

20:47

of other database companies, but it was

20:49

uh it was one of the one of the like

20:51

traditional search companies that a lot

20:53

of different um companies run. And it

20:55

was just very difficult to get it to do

20:57

what I did. And I was just like the

20:59

projects that touched that database just

21:03

I couldn't get them to perform at the

21:04

napkin math. and like there's there's no

21:06

query planner and like I couldn't figure

21:07

out why it wasn't there and sometimes it

21:09

tracked and then sometimes it really

21:10

didn't track at all and so I tried to

21:13

learn as much as I could to figure out

21:14

and like start reading the source code

21:15

of it and I was just I couldn't get it

21:17

to track very often. It was very

21:18

difficult to operate and so I just that

21:20

was sort of like in the back of my head.

21:22

I never thought I would touch that

21:23

again. Then the second ingredient was

21:24

the napkin math project

21:27

because it sort of just gave me a lot of

21:30

facility with all of these napkin math

21:32

numbers of what might be achievable with

21:34

the machine if you utilized it perfectly

21:36

>> properly. Yeah.

21:37

>> And then the third one was that doing

21:39

this you know leaving Shopify in 21

21:41

having spent eight years there and

21:43

during that time I did this I called it

21:44

angel engineering. So I like joined my

21:46

friends companies and then I just vested

21:48

equity instead of um instead of just

21:51

investing or something like that and cuz

21:53

I wanted to have my fingers in it. I

21:55

wanted to like see what else was out

21:56

there. That's why I left. And this

21:58

problem kept coming up again again and

22:00

again and again right like chatbt came

22:02

out in 2022 and I was working with with

22:04

a company then and they wanted to

22:08

connect a bunch of documents to AI and

22:10

that's when the context windows were

22:11

really small. So you had to read search

22:12

very quickly.

22:13

>> So it's like a few kilobytes. It was 8

22:15

kilobytes or four kilobytes depending on

22:17

the model. It was very very small. So

22:18

you had to reach for search very

22:19

quickly, right? And

22:21

>> so I I I worked with them and I was I

22:25

was I created a little recommendation

22:26

engine and the recommendation engine was

22:28

actually quite good. Um like I s I found

22:30

out that one of the co-founders wife was

22:33

pregnant through the recommendations

22:34

that I was getting when I was running it

22:35

on his feed. Um like it was it was it it

22:39

>> weird but

22:40

>> he was recommending. Yeah. I mean, it

22:41

was just like, you know, he was reading

22:43

about like and I did get permission. I

22:46

just like I don't think anyone expected

22:48

to be good enough and just like, okay,

22:49

it's this this thing is working. And

22:53

then I ran the back of the envelope math

22:55

on what it would cost to do this for

22:56

everyone like all the users. This is a

22:58

company called Read Wise. So, it's like

22:59

articles that you save and then and then

23:01

search later. And it was going to cost

23:03

30 grand a month. And this was a

23:05

company, it's a bootstrap Canadian

23:07

company. they spend about five they at

23:09

the time they're spending about 5k a

23:10

month on all the other infrastructure

23:11

combined.

23:13

So it just it didn't the you know

23:16

fundamentally in a company if you're

23:17

doing an investment you have have to

23:18

earn some gross margin on top of

23:19

whatever you're paying right and it just

23:21

didn't line up. Um, and so we just

23:24

didn't ship it. And I worked on I, you

23:26

know, tuned to autovacuum on Postgres or

23:28

something like that, which is a good

23:29

pastime. And then you I just couldn't

23:32

stop thinking about why it was so

23:34

expensive to store all of these vectors

23:37

that we were using for the

23:38

recommendations. And I just sat and did

23:41

the napkin math one day of like, can we

23:42

just use it all to in S3 and do some

23:44

clustering and then organize the files

23:46

and just the way and it's like maybe you

23:47

could build that. And then

23:50

one day I just kind of said [ __ ] it and

23:53

did it and like sat down and started to

23:55

like to write it out. Um, and I spent

23:59

the summer of of 23 just hammering my

24:02

head against the wall trying to find an

24:04

approach where I could get the latency

24:05

that I wanted. Um,

24:06

>> because the problem with S3 is it has

24:08

really good durability, but latency

24:10

we're talking hundreds of milliseconds,

24:11

right?

24:11

>> Yes. the P99 on a uh 256 or 512 kilobyte

24:16

object on S3 um is around 200

24:20

milliseconds.

24:21

>> Um

24:21

>> and and you're saying P99 cuz like when

24:23

you're talking large scale, you want to

24:25

care about the P99, right?

24:26

>> Yeah. I think when you

24:27

>> That's why we're not talking about P50.

24:29

>> When you're designing a system, you want

24:30

to optimize for the P99. And especially

24:32

because when you're designing a system

24:33

on on S3, generally in every roundtrip,

24:36

you're not doing one request. You're

24:38

often doing lots of requests, right?

24:39

>> You're going to hit the P99 real quick.

24:41

Exactly. So it's like if you're

24:42

navigating a tree on S3, right? It's

24:43

like, okay, you get the upper layer of

24:45

the tree, 200 milliseconds, you get like

24:46

another layer of the tree, 200

24:47

milliseconds. You get a bunch of leaves

24:49

of the tree in 200 milliseconds. So in

24:50

aggregate, you have like you want to

24:52

look at the P99 probably even the P99 to

24:56

design the system properly because you

24:58

need to minimize the number of round

24:59

trips that you had to make. So, I just

25:01

sat and sketched that out um and tried a

25:05

bunch of different approaches and then

25:06

and then finally in in in July of 23, I

25:10

I I got something end to end that seemed

25:12

to work and then rewrote it probably

25:14

twice and then released it in in October

25:16

of of 23 based on um based on just that

25:19

that summer of of of working through it.

25:22

And then you kind of you built it on on

25:23

top of S3 because I guess durability and

25:25

and all of and just really good. You how

25:27

did you make it fast?

25:30

We didn't in the beginning or I didn't

25:32

in the beginning. Um, it was just me at

25:34

the time and it was really like it was

25:36

it was it was a project. It was not a

25:39

company. It was not

25:41

>> it was it was it was to satisfy a

25:43

curiosity. It was not I did not set out

25:45

to do this like I'm going to go like

25:47

raise $10 million and do like I was like

25:50

I barely knew what a VC was. Like I was

25:52

like I just had to do this thing and I

25:55

was so focused on doing it. It was so

25:57

clear to me that if I wasn't going to do

25:59

it, someone else was going to do it. And

26:01

I just became fully obsessed that summer

26:03

with it. And so the first version was

26:05

the simplest possible thing. I think I'm

26:09

a very pragmatic person. Like I I didn't

26:13

get buried. I barely read any like of

26:16

the literature on LSM. I sort of like

26:18

you know read a bunch of it like got the

26:19

basic idea barely implemented that

26:21

because that would have taken too much

26:22

time. It was the simplest possible

26:24

version of what it could be. Like really

26:26

what you have to imagine is that the

26:27

simplest way you could do this is you

26:29

run some clustering algorithm on the

26:31

vectors.

26:32

>> You get the clusters and then you put

26:34

the clusters in files. The cl the files

26:36

are called cluster one, cluster two,

26:37

cluster three and then you have another

26:39

file called centrids of the clusters and

26:41

then you do the search by downloading

26:43

centroidids looking at the centroidids

26:45

and then downloading the n closest

26:47

clusters. There's a few optimizations

26:50

around merging some clusters that were

26:51

JSON in files and so on just to like

26:54

control some costs and some performance,

26:56

but that was basically it. And then

26:57

getting that to scale. That was the

26:59

first version. And then how do we make

27:00

it fast? Well, I didn't even implement a

27:03

caching layer. I just put the reverse

27:06

proxy in front of S3 with EngineX and

27:08

then had it.

27:09

>> Do you know what a reverse proxy is?

27:10

>> I like I do know what it is. I just

27:13

still don't know what what the reverse

27:14

is about. But anyway, um the reverse the

27:18

reverse proxy reverse things. Um the the

27:22

performance in this case um maybe that's

27:25

what it's about by caching right all of

27:27

the all of the S3 objects. It again it

27:29

was the simplest like it's like I'm just

27:31

going to put that in front. I knew how

27:32

to configure Engine X like I've written

27:35

more EngineX Lua than uh than a lot of

27:39

EngineX Lua very good software. um just

27:41

had that cache in front and then the way

27:43

that I would do things like deleting in

27:44

the cache was just like shell out to XRX

27:46

and just remove like things in the in

27:48

the cache and reverse engineer the

27:49

directory structure on engine X and

27:51

that's what we shipped and it was just

27:52

running on a single server and a T-Mox

27:53

instance and I was like okay let's see

27:55

if anyone gives a [ __ ] Yeah. So so far

27:57

I mean this is kind of like cool

27:59

engineering and like a cool side project

28:00

and like a bunch of novel ideas and I

28:02

you know like I think just some hardcore

28:04

engineering. How did cursor come into

28:06

play? Because like when I learned about

28:10

Turbopuffer, I was talking with cursor

28:12

about like how they built their their

28:16

backend, their database, how they scaled

28:17

and they're telling me all these

28:18

migrations and they were telling me like

28:20

oh yeah so we we were on Postgress but

28:22

it didn't no they did something else in

28:24

Postgress it didn't even work that well.

28:26

They went to AWS Aurora which is AD as

28:28

managed service of Postgress and it

28:30

didn't work well which is very

28:30

surprising and they're like oh yeah and

28:32

then we went to this thing called

28:33

Turbopuffer and they worked well and I

28:35

was like what's turbuffer and they're

28:37

like oh yeah turboper I think I think

28:39

they said like we were one of their

28:40

first customers and this never computed

28:42

to me cursor was already massive at that

28:44

point how did you meet the folks and how

28:47

did they become was were they the first

28:49

customer one of the first

28:51

>> they were the first customer

28:52

>> the first the first no Um they they they

28:57

reached out um after I just launched on

29:00

on Twitter. I was like hey I build this

29:02

thing and frankly it was like

29:05

in IAT you it was like hey launch this

29:08

thing and to me I was like I am so sick

29:10

of working on this. Like I was like I've

29:12

been working on this all summer. I don't

29:13

know if anyone cares. I only want to

29:15

work on this if anyone cares. Let's put

29:17

it on Twitter again. Single T-Mox

29:18

instance on a 8 core node somewhere in

29:20

GCP. I was like, if someone goes to

29:22

prod, I'll I'll set it up properly on

29:24

multiple and like I'll just block on

29:26

that, but let let's see if anyone cares.

29:27

It was like the MVP of MVP. Anyone who's

29:30

actually worked in the internal on

29:32

databases would never have had like

29:35

would have had too much pride to ship

29:37

anything like that.

29:39

Um, and I've just, you know, I've worked

29:41

on I was just releasing it like a SAS

29:43

project. Why can't you work on a

29:44

database like it's SAS? I don't, you

29:46

know, it's like if anyone uses it, we'll

29:47

do it properly. I know how to run

29:49

software with a lot of nines. Um, but it

29:51

was not a proper LSM. Like it was very

29:53

very it was the simplest version of what

29:55

it could be. And then I released it on

29:57

Twitter. I was like, "Yeah, you could do

29:58

a million vectors for a dollar." And

30:00

before that, I think the the cheapest

30:02

was maybe $100 per million for something

30:03

that actually worked.

30:04

>> Yeah.

30:05

>> Um, and I knew it was reliable, right? I

30:07

knew like I had these invariants like if

30:09

you shut down all the VMs like no data

30:11

is lost, like all the rights are

30:12

committed directly to object like it has

30:14

all the same invariants it had today. Um

30:16

and cursor reached out and knowing them

30:18

now I'm sure at the time the cursor was

30:20

maybe eight people and knowing the

30:23

founders now I am sure that they had sat

30:25

at the dinner table one day and we're

30:27

like the unit economics of what we have

30:29

right now where all the vectors are in

30:30

DRAM are not working why hasn't anyone

30:32

built it where we can put it in S3 and

30:34

the actual code bases that are actively

30:37

being used we can put in memory

30:39

>> and everything else just sit in object

30:41

storage and then we just hotload it in

30:42

and out of the cache

30:43

>> makes so much sense right you open the

30:44

codebase a few seconds and it's in RAM

30:46

and then the queries are as fast as

30:48

anything else. It made so much sense. So

30:50

I mean at the time they were if you look

30:52

at some of Aman one of the co-founders

30:54

early tweets he talks about uh using S3

30:56

for KV caching and things like that

30:57

which barely anyone is still doing even

30:59

though

31:00

>> um the economics

31:02

>> yeah price wise yeah it's and it's it's

31:04

very it's very uncommon and I think it

31:05

will happen right but they were ahead of

31:07

their time

31:08

>> and they I think they were I don't know

31:09

if they were thinking of building it

31:11

themselves. I think that's quite likely.

31:13

Um, and they found Turppuffer and it

31:16

just perfectly pattern matched into

31:17

that. Again, I don't know if this dinner

31:19

conversation happened or if this was

31:20

just inside.

31:22

Um, but it pattern matched something and

31:25

so we exchanged a bunch of emails and

31:27

then something compelled. I didn't know

31:29

anything about B2B sales.

31:31

>> Now I love B2B sales. [laughter] Um, I

31:33

didn't know anything. I was just like I

31:34

just want to help them because they they

31:36

were they had some unit economics that

31:38

didn't line up. So I just went to San

31:40

Francisco, right? I live in Canada. I

31:41

went to San Francisco and I showed up at

31:43

the office and when I showed up at the

31:44

office they um they were having some

31:47

Postgress problem that they were

31:48

discussing.

31:49

>> Yeah. The AWS Aurora problems. Yes.

31:51

>> Yeah. Early on. And I was like, "Oh, do

31:53

you guys have PG Analyze?" And they

31:55

said, "Oh, no, we don't." I was, "Okay,

31:57

let's let's let's get that going, right?

31:59

Let's look at it." And it was the same

32:01

thing as it always is with Postgress,

32:02

which is autovacuum hadn't run enough.

32:04

And so, they had all of these like going

32:06

to heat when they should be doing index

32:08

scans and blah blah So we were talking

32:09

about all of that and so I was just

32:11

helping them, right? It was like my, you

32:12

know, my database genes just like kicked

32:14

in and I think this built enough trust

32:17

with them that okay, well maybe if he

32:19

knows how to help us with the database,

32:21

maybe he also would know how to build

32:24

one. And

32:27

um at this time I'd also approached who

32:29

I thought was the best engineer who ever

32:31

worked at Shopify, my co-founder

32:32

Justine. um and she'd come on and the

32:35

first thing that she did was um remove

32:38

the reverse proxy engine X cache with a

32:41

file-based cache just a direct cache

32:43

which again great like the S3 thing

32:45

worked um and so she was online she was

32:48

starting to work on it and um and cursor

32:50

cursor cursor then that night was like

32:53

okay well we're going to migrate and so

32:54

they migrated everything over the course

32:56

of like a week or two after that um but

32:58

cursor was a small company back then

33:00

right yeah and they were they just in

33:03

the beginning of their massive rapid

33:05

growth. Exactly. And I I told them that

33:07

I was going to reduce their bill by 95%.

33:10

And I did like we did. Justine and I

33:13

did. We like they came on and their last

33:16

bill with their previous vendor and the

33:18

first bill with us, it was 95% lower.

33:21

Yeah. And you're you're nice for not

33:22

saying vendors, but I I can say vendors

33:24

talks to them and and it's in the deep

33:26

dive about cursor. It was it was ads

33:28

Aurora specifically. Uh so

33:30

>> this was this was not this was not

33:31

Postgress. Oh, this was a

33:33

>> it was a different one, but it's

33:34

probably still in the write up. We we

33:36

don't need to name names, but uh yeah,

33:37

but they were the reason they went there

33:39

is reliability was their main main pain

33:42

point. I'm sure the unit of comics would

33:44

have been there, but yeah, this was and

33:45

then what Swallow told me is he said

33:47

like look like there's a few things that

33:49

we did that you should never ever do and

33:50

he said one of them you should never

33:51

ever bet your business on a tiny startup

33:54

where you are their only or biggest

33:55

customer except for Turboper and he said

33:57

I love love those guys. So I guess it

33:59

just comes to show that even in your

34:01

case like to me what this story is shows

34:03

is is you can do things when you build

34:06

highquality things and you're pushing

34:08

for things good things can happen and on

34:10

the other side of cursor when you're a

34:12

startup it's okay to take sometimes

34:14

irrational risks when you have

34:16

conviction and it sounds to me that you

34:18

gave them conviction by showing up in

34:20

person by helping them by showing that

34:22

you know you know your stuff like you

34:23

suddenly brought in your your 10ish or

34:25

eight years of Shopify experience and

34:27

your curiosity and They probably took a

34:29

risk because of that, not because you

34:31

were some, you know, random vendor. They

34:32

probably would have never done that. So,

34:35

fast forward today, uh, Turbopuffer is

34:37

now a lot bigger. You're you're working

34:39

on some some some cool things, but

34:42

you have this very interesting business

34:44

where for you CPUs are important, right?

34:48

You run on mostly CPUs. And you told me

34:50

a story over dinner yesterday that uh

34:54

you met Jensen uh and Jensen he really

34:58

wanted to sell you on GPUs. Can you tell

34:59

me how that meeting went?

35:01

>> Um yeah, Jensen Hong, right?

35:03

>> Yeah. I just I'd never met uh I'd never

35:06

met uh Jensen before. We were we were at

35:08

an event at uh at at Nvidia and we were

35:11

just doing um presentations. This is in

35:13

a big HQ. Super impressive.

35:15

>> Yeah, exactly. They've invited a couple

35:16

companies to go and and um and and and

35:19

talk about um uh talk about our

35:22

businesses and how we can partner with

35:23

Nvidia and so on. And

35:27

I I don't I I don't know. I was like I

35:29

think I was in a goofy mood that day.

35:31

And so I went up on on stage and I said,

35:34

"Um, hey, I'm Simon from from from

35:36

Turbopuffer." And uh and yeah, if you're

35:39

wondering about the name, it's like if

35:41

everything goes south, we can always

35:42

pivot into vapes.

35:45

>> [laughter]

35:46

>> I was kind of nervous and this is what I

35:49

this is what I said and then and then he

35:52

said back to

35:52

>> wait who was in the room? Was it Jensen?

35:54

Was it a direct report?

35:55

>> It was it was Jensen and then I don't I

35:56

he has like I don't know if it's just 50

35:58

direct reports or it was like you know

36:00

it was there was it was Jensen and then

36:02

a bunch of the um like Nvidia Nvidia

36:06

leadership, right? Um cuz you go there

36:08

and then you talk about that you find

36:09

opportunities to partner and work

36:10

together, right? And so I said, "Yeah,

36:14

you know, so plan B it could be that we

36:15

could pivot into vapes." And then he

36:18

said, I was already nervous. He said,

36:22

"Judging by your slide, maybe you

36:24

should."

36:26

[laughter]

36:28

No, he did not.

36:32

[laughter] And and

36:35

I didn't know what to say back to that.

36:38

So I said, "Well, Jensen, do you vape?"

36:48

He didn't he didn't answer the question.

36:51

[laughter]

36:51

And then someone um someone on the um

36:55

someone on the on the team um

36:59

wrote to the whole company, Turbo Puffer

37:01

Company, Simon just asked Jensen if he

37:02

vapes. [laughter]

37:04

Um and then you know this is this is a

37:08

great start right and um and then the

37:10

team had team team had sort of talked to

37:12

me beforehand was like Simon we got to

37:14

make sure we don't say the cword we

37:16

can't say CPUs

37:20

and so I just couldn't stop talking

37:21

about CPUs. I was like AVX 512 is so

37:25

sick like we love SIMD and um like we we

37:29

we like there's so many CPUs. They're so

37:31

easy to get. like um it's just a riot in

37:35

CPU land. Like you know I I don't I

37:37

think I stopped short of saying I'm so

37:39

glad I don't need GPUs but

37:43

but it was just it I just couldn't stop

37:45

talking about CPUs.

37:47

Yeah. And so you know Jensen took an

37:48

interest in that. Yeah. So who who knows

37:52

like I'm sure you made you made a

37:54

memorable version. Maybe he made it his

37:55

mission now to like at some point get

37:57

you guys onto GPUs. But speaking of

37:59

CPUs, can you tell me a bit what you're

38:01

seeing inside of the hypers scale the

38:03

cloud providers you're now in AWS,

38:05

you're you're in GCP, you're on Azure.

38:07

What I would think naively is there's a

38:10

GPU shortage and when I talk with

38:11

inference companies, they are and and

38:13

and AI labs, they're just getting

38:15

whatever they can do. I would think

38:16

getting CPUs is should be easy. Is it?

38:19

>> No, [laughter]

38:21

>> it's not anymore. Why? What's happening?

38:23

Can you tell us about the dynamics on on

38:25

on the why and what you've learned?

38:26

>> Yeah. So I think that

38:30

GPUs will probably continue to be

38:32

scarce. Like I don't know, maybe there's

38:33

going to be some surplus. I I refuse to

38:35

speculate too much about the macro. But

38:38

I think as as RL is becoming a very very

38:41

large amount of the workloads that needs

38:43

a lot of CPUs. So the labs are sucking

38:46

up a lot of CPUs because you need CPUs

38:48

to be like okay we need to like teach

38:50

this model how to how to search. We need

38:52

to teach it how to use GP. We need to

38:54

teach it how to boot up Bash. we need it

38:57

needs to run real things and learn from

38:59

that takes a lot of CPU.

39:00

>> Mhm.

39:01

>> Um and so I think as we RL is consuming

39:04

a lot of CPU and then also just all of

39:05

the agents are running on CPUs, right?

39:07

They need to do all kinds of very

39:08

general purpose things on a CPU and so

39:11

as as as the demand curve is sort of

39:13

shifting to the right and it's becoming

39:15

more and more applied and that feeds

39:17

back into RL by the way, right? Because

39:18

as things become more applied, it's like

39:20

oh the models are not that good at CAD

39:22

or ship building, I don't know. And

39:24

then, you know, you have to spin up even

39:26

more RL environments to do that. So, I

39:28

think that's what we're seeing. And so,

39:29

we're on the other end of that, needing

39:31

these CPUs. We need a lot of NVME SSDs

39:33

as well. Um, and a lot of this right now

39:36

is tied up in DRAM, right, of of where

39:38

like you need a lot of that also for the

39:40

GPU servers. Um, but I would assume that

39:43

it gets a lot worse before it gets a lot

39:45

better on the on the CPU side. Um, and I

39:48

think even the big companies are

39:49

fighting amongst each other, right, to

39:51

get the allocations. And even we, you

39:53

know, we're selling to companies that we

39:54

also fight for CPU with and against,

39:57

right? It's uh it's it's it's really

39:59

difficult. And so you write things to

40:01

try to make sure you get these CPUs as f

40:03

fast as possible.

40:03

>> Yeah. And yesterday I was at a dinner

40:05

that you hosted with your team where you

40:06

actually have a bunch of Turbo

40:07

customers. A bunch of them are AI AI

40:10

labs or or AI startups, but a lot of

40:12

them one of them uh reflection had have

40:16

hu massive amount of footprint. And they

40:18

were telling me that they're in a

40:19

situation where they cannot buy more.

40:21

Like they when it comes to GPUs or CPUs,

40:23

they max out. They have the longest

40:25

contracts that possible. And I didn't

40:28

realize how competitive it is in the

40:30

cloud when you're you go beyond a small

40:32

fish to like a medium size or even a a

40:35

large fish that now like

40:37

it's interesting. So So now you have

40:39

this and even you're having this this uh

40:42

kind of fight behind the scenes that is

40:43

maybe not as visible.

40:44

>> Exactly. And I mean you you work with

40:46

the clouds, right? We work with them to

40:48

talk about which regions have um have

40:50

CPU which regions are getting it comes

40:53

down to power right of like okay well

40:55

where is the power which is generally

40:57

where they're going to ship the new CPUs

40:59

um and so we have to work with some of

41:00

our biggest customers on that so these

41:02

are real constraints right that are that

41:04

are making our way to us we're just very

41:06

fortunate that it's very easy for us to

41:08

run lots of turbuffer clusters because

41:10

all we need are like a few CPUs and NVME

41:13

SSDs and then S3 and then we're in a

41:15

good place but there's lots of changes

41:17

that we can make even to the

41:18

architecture um to try to protect from

41:20

from a lot of this. Now I'd rather spend

41:22

that engineering effort on other things

41:24

but we are very very good at using a lot

41:27

of very different SKs right so we don't

41:29

need everything to be a particular CPU

41:32

or instance type we can run with many

41:34

many different types of machine types um

41:37

>> skew meaning that's the it's a fancy

41:39

name for like the different machine

41:40

types

41:40

>> yes exactly right like you know C4D or

41:43

IG or whatever they're called

41:45

>> what's your favorite one

41:47

>> um we really like right now the um C4

41:51

force on on GCP.

41:53

>> GCP.

41:54

>> Um the Z4Ds are also performing really

41:57

well um now that we've done done a bunch

41:59

of of um of optimizations to them. Um

42:02

those are really really great machine

42:04

types. Uh we really like those. Um and

42:06

then the ARM C4As as well um on on GCP.

42:11

Um we like those. But I think that in

42:14

general like when you're yeah when

42:15

you're small it's very easy to suck up a

42:17

bunch of but at Shopify I was also part

42:19

of you know deciding

42:22

ahead of BFCM right a few months out you

42:24

have to tell the cloud providers how

42:25

much you're intending to use do commits

42:27

on all of that right the the clouds are

42:29

not infinite as they seem when you're

42:30

small and one way of course to like get

42:32

like infrastructure and and also just

42:35

like credibility is venture capital if

42:38

you raise $und00 million a billion

42:39

dollars some of your customers just

42:41

raised $2 billion actually I talked with

42:42

them yesterday. You know, it gives you

42:44

credibility. It gives you cash. You can

42:45

pay for this thing. Your specific

42:48

Turboper's relationship to venture

42:50

capital seems very interesting. I never

42:52

heard you announce a raise until m maybe

42:55

just very recently. Can you tell me how

42:57

you and and you told me that when you

42:59

started this thing, you didn't think too

43:00

much outside of just building some cool

43:02

stuff. How did you think about venture

43:03

capital and how do you think about

43:06

raising? because again I feel you have a

43:08

very fresh and different perspective

43:09

than what which is typical inside of

43:12

Silicon Valley. Yeah. So I think to to

43:16

understand my how I think about capital

43:19

you have to go back to the the beginning

43:21

of Turbopuffer right where I promised

43:25

cursor that Justine and I could get

43:27

their bill to 4K a month. And this was

43:29

based on some very rough napkin math on

43:31

okay if if turbuffer was a better

43:35

implementation than it currently is then

43:36

it should cost this much and that's the

43:39

pricing we ship with and that's what we

43:41

guaranteed um guaranteed cursor um but

43:44

the software was not that good like it

43:46

was very reliable but it was very simple

43:49

right and that's like a core engineering

43:51

principle of me is simplicity above

43:53

everything um you and I have talked

43:55

before about how software that ages

43:58

Well, and some of the advantages of

44:00

seeing be having long tenures inside of

44:02

companies. You had a long tenure at

44:03

Uber. I had a long tenure at Shopify.

44:05

So, you see simplicity just almost

44:06

always wins. Um, and at the time I was

44:11

not convinced whether this was a venture

44:13

scale opportunity because I understood

44:15

that if you take venture capital, no

44:18

matter how many smiles there are in the

44:19

room, everyone's sort of expecting that

44:21

you have to earn a big return on that on

44:24

some timeline that makes sense to

44:25

everyone involved. and everyone involved

44:28

are you know pension funds in Canada

44:30

like that it's like it there's like a

44:32

whole stack right of of of people that

44:34

that need to so at the time I was like I

44:37

don't you know I don't know if this

44:38

could be a billion dollar company I

44:39

didn't know that in the very very

44:40

beginning um it wasn't completely clear

44:42

to me it felt like a very niche kind of

44:44

product right to build this particular

44:46

search engine um and that was completely

44:49

fine with me so I you know it's it's it

44:51

was fine and

44:54

so then I just I just looked the cursor

44:57

bill and I looked at my GCP bill which

44:59

is what we started on and you know as

45:01

like a you know dumb Danish person who's

45:03

just like okay like this number should

45:06

just be lower than the other number.

45:08

>> Yeah, that's sort of like you know and

45:10

it's just I don't think I'd spend enough

45:12

time in San Francisco cuz I think the

45:13

money over here it works a little bit

45:15

differently.

45:17

>> Um that's just that's all I knew. You

45:19

you were doing business 101 as as long

45:21

as you're making a profit you're good

45:24

right? Yeah, that [laughter] was like

45:27

I'm I'm not kidding in this exaggeration

45:29

that it was just like that just made

45:30

sense to me that Justine and I were just

45:32

going to go optimize this until these

45:35

numbers were roughly equal. And maybe if

45:37

if if we could get some other workloads,

45:39

we could start paying ourselves. But

45:40

that was like very much the philosophy

45:42

at the time. Um because I didn't know if

45:45

I could go raise a bunch of of of money.

45:47

I didn't know anyone who had the money.

45:48

I I didn't have any relationships. Um,

45:51

you were an absolute outsider to the the

45:53

>> I was I was an outsider. I was like an

45:54

outsider squared, right? I grew up in

45:56

Aus, Denmark and I um I then moved to

46:00

Ottawa, Canada. So it's like I'm an

46:01

outsider to Canada and in Canada I'm an

46:05

outsider to San Francisco. So I was just

46:08

thinking about this from first

46:09

principles like oh you're a venture

46:10

capital you need this return you need it

46:12

on this timeline.

46:14

I don't know if I can deliver that yet.

46:16

I would need more data to decide that

46:18

because I want to like I kind of want to

46:20

keep working on this and now I have to

46:23

get to this point for it to not be a

46:25

failure. Um in in in January then I uh

46:30

there was a person that I was at II with

46:33

in in uh in 2012 and 2013 and his name

46:36

is Buen and he was on the north and

46:38

Macedonian team um at II um and he was

46:41

he's he was really good. He was so good

46:43

that the North Macedonian team called

46:45

him God. Um

46:47

I don't know why but that was what he

46:49

went by and he was yeah he was very good

46:52

grew up and and I really wanted to work

46:54

with Buen but I couldn't afford to work

46:56

with Boyan um and he was very much like

46:59

this is what I can live off like you

47:01

know I just like I want to build this D

47:03

like that would be like this is what it

47:04

can be but at this point Justine and I

47:07

hadn't taken a salary for like 6 months

47:09

and we'd already we'd already spent like

47:11

tens of thousands of dollars on like on

47:14

GCP bills and all of

47:16

And so I was like, I don't think we can

47:18

I don't think we can we we can do it.

47:20

And so I had met one one individual in

47:22

in in Silicon Valley. Uh his name is

47:24

Locky. And it just I ended up just

47:26

calling him and saying, hey, I kind of

47:29

want to learn a little bit faster here.

47:32

Can I can we raise like 700K? That's

47:36

like what I wanted to raise. So it's

47:37

just like I want to have like two

47:41

engineers for the rest of the year.

47:42

Justine and I still don't need to be

47:43

paid. and then a little bit of buffer

47:45

room. It's like this is what I need and

47:47

if this doesn't have PMF and is a big

47:49

opportunity by the end of the year, I

47:51

don't think we're going to bother and

47:52

we'll just shut the whole thing down and

47:53

we won't have it taking a dime. We'll

47:54

return everything to you. Um

47:57

I think there was the first time you

47:59

heard anyone say it like that. Um and um

48:01

I told some other VCs that at the time

48:03

and that was terrifying to them. I think

48:05

to someone on the West Coast this sounds

48:08

like you have low ambition or something

48:10

like that. M

48:11

>> um and to me it was just like I I don't

48:13

know it just came from a when I don't

48:15

know how to play a game I just play with

48:16

open cars like this is how I see it

48:18

>> and so I we were it was very clear to us

48:20

that we wanted to do this and but also

48:22

it became clear to us that we didn't

48:23

want to just like keep working on this

48:25

unless it could become big and we were

48:26

starting to develop conviction

48:27

conviction that this actually become

48:29

really really big and so we we we did

48:32

that and hired Buen and then became

48:35

profitable later that year um and then

48:38

just continued to hire and then it's

48:40

Like to raise more money, you need sort

48:43

of there's six reasons to raise capital.

48:46

The first reason to raise capital is to

48:48

fund R&D.

48:49

>> Mhm.

48:49

>> That was the reason that we raised

48:50

capital in January because we funded R&D

48:53

with a lot of our own, you know,

48:55

opportunity cost and not taking a salary

48:57

and then paying the bills ourselves. Um,

48:59

but we wanted to learn a little bit

49:01

faster and so we hired Buen and Morgan

49:03

as the first engineers. And then the

49:05

second reason to raise capital is to

49:07

fund growth. you've you you've built

49:10

something and you want to tell the world

49:11

about it and you want to spend more

49:14

capital to do that. Um the third reason

49:16

to to to raise capital is for the

49:19

founders's ego.

49:22

>> Um it's a very popular appreciate the

49:24

honesty.

49:24

>> It's very popular, very very popular,

49:26

right? big numbers, lots of press, like

49:29

um and I think this is a very very

49:31

dangerous reason to raise money. And I

49:35

wish that it was more talked about

49:36

because you're diluting all of your

49:38

employees when you do it. You are um

49:41

setting a certain price for future

49:43

employees and their upside. It's

49:46

it's it for some people it can become a

49:48

status game and that's not what it's

49:49

about. We're here to build a big

49:50

business together and

49:53

this is not a reason to raise money. Um,

49:56

but I I do think that it happens. Um,

49:59

the fourth reason to to to raise capital

50:02

is to reward your employees, right? It's

50:03

a you're on a very long journey and you

50:05

want to work with the best people in the

50:07

world and by definition there's not that

50:09

many best people in the world. So, you

50:10

want to reward them. Um, that was the

50:12

reason that we took more capital in

50:14

December um was to allow the employees

50:17

to liquidate some of their equity um

50:18

instead of waiting for some like event

50:21

like an IPO or something like further

50:22

out. Um the fifth reason to raise is for

50:25

a strategic partnership. There are

50:27

strategic partnerships that have been

50:28

made in this in this city that have made

50:30

companies. Um and um the sixth reason to

50:35

raise would be do doing M&A or or

50:37

something like that. But it's like you

50:39

have to be very honest about what reason

50:41

you are raising in those six. First

50:44

reason we raised was one and second

50:46

reason we raised was four. Um so which

50:48

which ones? The first reason to raise

50:49

was R&D. R&D and the second reason was

50:53

>> um to provide liquidity to the employees

50:55

>> employees. Yep.

50:57

>> I I think it's a it's a nice and healthy

50:59

way and I think yeah the the ego part we

51:01

don't talk about and the identity and

51:04

especially the closer you are to to tech

51:07

ecosystems where a lot of people are

51:08

raising it it will be part of it. As

51:11

closing I I wanted to ask you about the

51:13

way you have a remote culture these

51:16

days. I'm seeing it especially for

51:18

companies that do anything with AI. May

51:20

that be building AI infra or or or just

51:23

AI products. A lot of them prefer in

51:26

person having a HQ often times in SF or

51:29

wherever your headquarters may that be

51:30

London or somewhere else because you

51:33

often these companies often find that

51:35

they have faster iteration. Uh it's just

51:37

fewer layers cut in between and of

51:38

course speed is is very very important.

51:40

You have started full remote and you're

51:43

still full remote. how is it working?

51:46

Uh, and what kind of quirks or like or

51:50

turbo buffer ways have you found to to

51:52

make this work better? Yeah, I think so.

51:55

The the company started in in 23. So,

51:58

sort of like on the on the on the cusp

52:00

of COVID where a lot of companies were

52:02

just remote. Um, the Shopify infochain

52:04

was remote since the very um very

52:06

beginning because it was very difficult

52:08

to get them all to move to Ottawa. Um,

52:11

and

52:13

so it was natural to me. It's like,

52:15

okay, I think there's kind of maybe two

52:17

cities where you can build a database

52:18

company fast, and that's San Francisco

52:21

and and and maybe New York. There are

52:23

maybe other cities, right? But that's

52:24

like kind of where it's been done. Y

52:26

>> and so if you don't want to do that, I

52:27

think you have to go allin on on on some

52:29

distributed model.

52:30

>> And so we've tried to figure out what

52:32

does that distributed model mean for

52:33

Turbopuffer? It doesn't mean the absence

52:35

of in person. we get everyone together

52:37

twice a year in in some in in some

52:39

location. Uh earlier this year we were

52:41

in in B, right? And then we were in

52:43

Mexico City and so on. So it's like

52:44

that's that's not that uncommon. Um but

52:47

one of the things that we we we've been

52:49

trying to do is we have this concept

52:50

called campfires. And the concept of the

52:53

campfire is that when a couple of people

52:55

just sort of randomly congregate in a

52:57

place, you call it a campfire and you

52:59

encourage as many people as you want to

53:00

come and join. So, for example, this

53:02

week is a Turbo Puffer campfire in San

53:04

Francisco because I'm here for this

53:05

conference and a bunch of other things.

53:07

And so, everyone is invited to come like

53:09

we're going to go meet customers, right?

53:11

We're going to put on dinners for our

53:12

customers and things like that. And we

53:14

just make a thing out of it and and

53:15

spend time together. And uh we encourage

53:18

everyone to come. We've also gone to the

53:21

extent now of um we want to encourage

53:24

that, but not everyone not everyone

53:26

needs to go to the campfire all the

53:27

time. Some people just want to, you

53:28

know, lock in and hacks into 10 and

53:31

that's great. We have people that just

53:32

make it to the offsites twice a year and

53:34

otherwise they're home, they're with

53:35

their families and they don't they don't

53:37

spend time on an airplane. Um,

53:39

fantastic. Like that is completely

53:41

compatible with this model. And there

53:42

are other people at the company who are

53:43

on a plane probably every two weeks. Um,

53:46

we had someone the other day where they

53:48

saw a campfire happening in New York and

53:51

everyone was dialing in from a meeting

53:53

room in New York and she had so much

53:54

FOMO that she took a Uber straight to

53:56

the airport in Ottawa and flew to flew

53:59

to New York to hang out with the team,

54:00

right? And I think that's fantastic. Um

54:03

and we've also introduced these things

54:05

where um if you if you uh if you do a

54:09

conference talk or a blog post or

54:11

something like that at Turbo or

54:12

something a bit extracurricular, we give

54:13

you a turbo credit and a turbo credit

54:16

allows you to upgrade your next flight

54:17

to business class which again encourages

54:21

spending time together with the team. Um

54:24

and now I mean Turbo Credits are

54:27

probably going to take on a life of

54:28

their own. Someone was talking about

54:29

doing a central bank and doing interest

54:30

rates on the Turbo Credits. um and doing

54:33

a betting market on the turbo credits.

54:34

And so like this might take on its life

54:36

on its own. Um and uh you you know if

54:40

you um if you're at a conference like

54:42

this, there's some of the our engineers

54:44

here who are just want to interact with

54:46

customers and be on like and standing on

54:49

a like expo floor all day is quite

54:51

taxing. And so if you do that for two

54:53

days because you want to do it, oh you

54:54

get a turbo credit, right? And so it's

54:56

just like these fun little things that

54:57

we try to do to to to encourage people

55:00

to meet if they want to meet.

55:01

>> Thank you. Well, in this session, uh,

55:04

what I found very interesting is

55:05

Turbopuffer is a so many AI companies

55:08

are using you as an infrastructure

55:10

layer, but in this conversation, we

55:11

managed to talk very little about AI and

55:13

a lot more about engineering principles,

55:16

pushing, being curious, and the human

55:18

connection, how important it is for

55:20

people to work together, to trust each

55:21

other. So just thank you very much for

55:23

that. So, let's give a big round of

55:24

applause for Simon. Thank you so much.

55:26

[applause]

55:27

This is great. Thank you.

55:33

>> [music]

Interactive Summary

This video features a conversation with Simon, the founder and CEO of Turbopuffer, who shares his journey from learning to program at a young age through PowerPoint and FrontPage, to becoming a key infrastructure engineer at Shopify, and finally founding his own database company. The discussion highlights his engineering philosophy, centered on simplicity, deep understanding of system constraints, and the importance of 'napkin math' in decision-making. Simon also discusses the inception of Turbopuffer, an S3-based vector search engine, its early success with Cursor, and his pragmatic approach to raising capital and building a high-performing, remote-first team.

Suggested questions

4 ready-made prompts