October 20241:21:587.5k views

Bootstrapping an email service provider (with Jesse Hanley)

About

In this interview, I talk with Jesse Hanley, founder of Bento, about running a lean email service from Japan. We chat about the challenges of scaling infrastructure, managing databases, and maintaining a calm business while serving a global customer base.

Transcript

Everything we said

00:01

Aaron Francis

Okay, welcome back, uh, to Database School. I'm your host, Aaron Francis, and I'm here today, uh, with my friend, Jesse Hanley. Um, Jesse runs a, a, an email service that I actually use, and I pay full freight for. So even though we're friends, you gotta-

00:18

Jesse Hanley

Thank you

00:18

Aaron Francis

... you gotta, you gotta pay your friends. And so- ... I use Bento, uh, love it. We use it for all of our courses, we use it for aaronfrancis.com, we use it for everything. So Jesse's running a pretty, uh, a pretty big operation over there, and he does it very, in a very lean way. So I'm excited to talk to him today. Jesse, do you want to introduce yourself?

00:38

Jesse Hanley

Yeah, sure. I'm Jesse. Uh, Aaron is a customer of mine, which I appreciate very much. Um, but yeah, I run Bento, which is an email service provider. We predominantly send marketing email, but recently have got more into transactional email, password resets, and all that kind of jazz. Um, and I kind of run it out of my home in Japan, uh, and have for the past four years in Japan.

01:00

So yeah, yeah, it's, and it's a fun, very calm business to run. So, um, I very much kind of-

01:04

Aaron Francis

See-

01:04

Jesse Hanley

... enjoy running it, yeah

01:06

Aaron Francis

... this blows my mind that you say that email and being an ESP is a calm business to run. How, first of all, how many... Is it, it's just you and you have some customer support, is that right, to cover some other-

01:19

Jesse Hanley

Yeah

01:19

Aaron Francis

... time zones or?

01:20

Jesse Hanley

It's, yeah, so I'm, I'm the primary developer, and then I've got, uh, Anya in support. She covers kind of the Eastern and the US-

01:29

Aaron Francis

Mm-hmm

01:29

Jesse Hanley

... time zones when I'm sleeping. Um, and so if something goes down, then I get a call, wake up, and I'm on call and all that kind of jazz. We also have, uh, contractors for various different parts of the operation. So for example, at the moment I've got Fast, the FastRuby team, they're working on upgrading our-

01:46

Aaron Francis

Cool

01:46

Jesse Hanley

... you know, main monolith, uh, app-

01:49

Aaron Francis

Yeah

01:49

Jesse Hanley

... and all that kind of stuff. Get... And we'll kind of go into why they're working on that at the moment, 'cause that kind of ties into some of the other stuff, uh, database-related stuff.

01:57

Aaron Francis

Mm-hmm.

01:57

Jesse Hanley

Um, I've got, like, deliverability consultants that I work with. I just kind of bring in experts, and so the way that I've tried-

02:03

Aaron Francis

Right

02:03

Jesse Hanley

... to build the team is less kind of full-time on the payroll staff, and more kind of experts, contractors that kind of-

02:11

Aaron Francis

Mm

02:11

Jesse Hanley

... either work consistently or they kind of come in for very specific jobs. Come in and then bounce out. Um, and I've, I've always liked working that way. It's kind of really fun.

02:21

Aaron Francis

Yeah. And it's, it's shocking to me because, you know, you run, you run support out of a Discord that is very active. And, um-

02:29

Jesse Hanley

Yeah

02:29

Aaron Francis

... you are very active in there. And I'm like, "When does Jesse, one-"

02:33

Jesse Hanley

But it's not odd.

02:33

Aaron Francis

"When does he sleep? And two, when does he develop?" Because I know he lives in Japan. He's in there talking to customers like me, who can't, who can't figure out how to do something, and you're like, "Hey, use the button that's right in front of your face." And I'm like, "Oh, yeah, you should put a button there." So how do you, how do you, like, manage your time that you're always in this Discord or responding to my DMs?

02:53

Jesse Hanley

Um, uh, well, so, so, like, Discord, Discord is... Like, this is a little bit of a tangent. Discord's really nice for support 'cause I, I, I've got it on my phone.

03:04

Aaron Francis

Mm-hmm.

03:04

Jesse Hanley

I can quickly message people, respond really fast. Um, luckily, like, the software's not that buggy, touch wood. So, like- ... often it's, it's a user thing, like they've accidentally deleted their DNS records in a migration, so they've just gotta add them back again.

03:17

Aaron Francis

Right.

03:17

Jesse Hanley

And boom, their open rate's back up. Um, so 90% of the tickets are, like, by the user errors or they're a little bit confused or they just need to, like, learn something. And so Discord's a nice medium. And also, people are, like, less... I'm trying to work out, like, the PC way to say this. People are, like- ... way nicer on Discord than they are on email.

03:36

Aaron Francis

Interesting.

03:36

Jesse Hanley

On email, people are, like, awful. They're, like, super rude, super blunt.

03:40

Aaron Francis

Huh.

03:40

Jesse Hanley

"Dear sir, dear ma'am, who- whom this concerns, F you, I've got an issue."

03:46

Aaron Francis

Mm-hmm.

03:46

Jesse Hanley

Whereas on Discord, because there's hundreds of people observing them, they're super chill, right? And-

03:52

Aaron Francis

Oh, that's interesting

03:53

Jesse Hanley

... I, I like, I like that, I like that dynamic of it. So from, like, a support perspective, it's very weird for customers to come into Discord, but when they see, like, a founder reply, they're like, "Well, this is awesome. I'm getting, like-

04:05

Aaron Francis

Mm-hmm

04:05

Jesse Hanley

... a founder response." They get a response very, very fast, which is great. Um, but also the exchange is a lot friendlier than elsewhere. So I, I kind of estimate that if I had to do email support, like, I only get, like, six emails a day, eight emails a day, like, on-

04:19

Aaron Francis

That's awesome

04:19

Jesse Hanley

... on email support, which is really, really low. Um, but that's actually been consistent for the last year despite growing almost double in the last 12 months.

04:26

Aaron Francis

Wow.

04:27

Jesse Hanley

So that's been interesting to me. And I think, like, if I didn't have Discord, maybe two to three full-time support people probably responding to tickets, and they'd have to be more skilled and all that kind of stuff. I also think people are a lot, um, more chill in terms of response times on Discord. Like, they're-

04:44

Aaron Francis

Mm-hmm

04:44

Jesse Hanley

... okay waiting a little bit if I'm sleeping, um, because Anya responds straight away, says, "Jesse will get back to you."

04:49

Aaron Francis

Right.

04:49

Jesse Hanley

And, like, just that quick response is, that, that's totally cool. So yeah, it's a different way of running the business, but I actually think it, it's calmer. It's weird at the start, but it's, it's a calm way to do it.

04:59

Aaron Francis

Yeah. It is, it is weird at the start. And as a customer coming into a Discord and seeing all the activity made me feel like, "Whoa, there's a lot going on here." So to hear you say it is calmer, I guess the activity was gonna happen either way. Like, you were either gonna get emails or people were gonna ask in Discord. Um, but the-

05:18

Jesse Hanley

Yeah

05:18

Aaron Francis

... the observation effect is very interesting, that people are better behaved when they're being observed. That is very-

05:25

Jesse Hanley

And I-

05:25

Aaron Francis

... clever. Hey, we'll get back to the interview in just one second, but since you're here, you like databases, you probably like Postgres. Let me tell you about Mastering Postgres. This is a course that I am teaching, coming out October 15th. This is a way that you can master the most important part of your stack, your database. So go to masteringpostgres.com and sign up to hear when we release it.

05:49

Okay, back to the interview.

05:51

Jesse Hanley

Yeah. And, uh, we've had instances in the past, this hasn't happened, like, in a while, where, um, European customers tend to be a little bit more, like, blunt, especially, like, Dutch-

05:59

Aaron Francis

Mm-hmm

05:59

Jesse Hanley

... customers. They tend to be very-

06:00

Aaron Francis

Mm

06:00

Jesse Hanley

... blunt with their feedback. And we've had instances-

06:03

Aaron Francis

Mm

06:03

Jesse Hanley

... where people have been a little bit too blunt with their feedback, and then almost, like, I don't know, blood cells on, like, a virus or something, they all just, like, come in- ... kind of defend. Um, and that's really nice because sometimes if you get an email that's, like, super blunt-

06:16

Aaron Francis

Sure

06:17

Jesse Hanley

Oh, I'm a ba- I'm a bad software maker. I'm gonna shut this business down

06:20

Aaron Francis

Uh-uh

06:20

Jesse Hanley

But in the community thing, it's, it's just a little bit more chill. Um, and I think in addition, Discord has been like a... Another benefit because, like, if there is an issue, like I, I accidentally shipped like a bad conditional and a button that wasn't supposed to be hidden was hidden. This happened yesterday.

06:35

Aaron Francis

Mm-hmm.

06:35

Jesse Hanley

I, like, pushed up some UI changes, right? And people come to the Discord so fast with, "Where's that button?" And I can quickly respond, "All right. It's shipped. 15 minutes, it's fixed." So anytime that there's an issue, it's like, such like a... Yeah, I just get this, like, live pulse through the Discord that-

06:51

Aaron Francis

Mm-hmm

06:51

Jesse Hanley

... maybe QA or, you know, a test can't really pick up. Um, and that's been really good. Or maybe, like, a button's missing. People are happy to come in and be like, "Where's this thing?" Um, in Discord, but they're never gonna email me that 'cause that's so much effort. But on Discord, they're happy to do it.

07:05

Aaron Francis

Right.

07:05

Jesse Hanley

So there's, there's a whole bunch of weird kind of benefits to running a business like that.

07:10

Aaron Francis

Yeah. Okay. That's interesting. 'Cause I, I had kinda always wondered why Discord, but this is all, this is all making sense now. And so tell us a little more. You are, uh, fully bootstrapped and-

07:20

Jesse Hanley

Yep. Self-funded

07:21

Aaron Francis

... uh, if you have the FastRuby team, it's all Ruby on Rails. Is that right?

07:25

Jesse Hanley

Mm-hmm. Yep. So, uh-

07:26

Aaron Francis

And how long, how long have you been doing this?

07:29

Jesse Hanley

Uh, I've been doing Bento like six years. The first-

07:32

Aaron Francis

Wow

07:32

Jesse Hanley

... like, four years I was running, uh, my agency full time, and then I exited that in COVID, and then I went full time onto Bento. And then kinda, like, really found my footing. For the most part, I was, like, running an agency, a marketing agency, and learning to code on the side.

07:47

Aaron Francis

Mm-hmm.

07:47

Jesse Hanley

And the way that I kind of improved my skills was I brought on really smart people like Andrew Culver.

07:52

Aaron Francis

Mm-hmm.

07:52

Jesse Hanley

I brought them in. I learned from them and then would take over more of the code base as I kind of got them to build stuff almost for me.

07:59

Aaron Francis

Mm-hmm.

08:00

Jesse Hanley

And then I would go, "Okay, cool. Like, that's how you're supposed to do it properly. Like, that's how a pro does it."

08:04

Aaron Francis

Mm-hmm.

08:04

Jesse Hanley

And, and every kind of core feature that I've built, I've done it that way. I've found an expert, built with them, learned from them, taken over the code base, and kind of that's been the process with Bento. So yeah, and the first four years was really just trying to, like, find my foot and it took a really long time. Like, those, lots of features that we launched that no one used. Those, lots of-

08:22

Aaron Francis

Hmm

08:22

Jesse Hanley

... products I was trying to, like, push on people that they never used. Um, and then after I went full time, I kind of really narrowed in on the email marketing side of thing. I was like, well, like, everyone, like, uses these features and they like using-

08:35

Aaron Francis

Mm-hmm

08:35

Jesse Hanley

... these features. I'm just gonna keep pulling on that thread. And after I kept pulling on that thread, like, we actually started to get some traction, and then the last two years has just been, no, we only send emails.

08:45

Aaron Francis

Yeah.

08:45

Jesse Hanley

And the more we, we, we, we, we leaned into that, um, the more people signed up, and the more people were like, "I need to send emails. I'm gonna try Bento." And, um, yeah. Yeah.

08:56

Aaron Francis

Amazing. And so where did you find... As, as you're, like, honing in your message, where are you finding that people are hearing about you? Like, how... It is a very, uh, it is a very crowded marketplace in terms of email-

09:10

Jesse Hanley

Mm-hmm

09:10

Aaron Francis

... which is a great thing 'cause everybody needs to send emails. So it seems like-

09:14

Jesse Hanley

Mm-hmm

09:14

Aaron Francis

... you know, Justin Jackson always talks about catching a wave, and email's still a wave, but where are you, like, carving out your niche amongst, uh, the other competitors?

09:26

Jesse Hanley

Yeah. The way that I kind of like to explain it is Bento for the most part is kinda like a local coffee shop of email marketing providers, right? So where, yeah, you're right. You've got, like, MailChimp, ActiveCampaign, they're like the Starbucks or like-

09:38

Aaron Francis

Mm-hmm

09:38

Jesse Hanley

... the Tully's Coffee of, of chains. Um, but just like a local coffee shop, people do tell others. We get customers from Twitter or referral or YouSayIt or, like, someone tweets about it, or some indie hacker in Bali mentions it, or someone searches for like a learn dash email marketing solution and come across that we integrate with them.

10:00

Aaron Francis

Hmm.

10:00

Jesse Hanley

Um, there's a lot of stuff like that, which it's just kind of breadcrumbs that have been left on the web.

10:07

Aaron Francis

Mm-hmm.

10:08

Jesse Hanley

And people discover these breadcrumbs, stumble, and then we become a category decision. So we become a decision out of many of the providers. Um, and then our job from then is to be, like, persistent. So we've got retargeting ads so people keep seeing us.

10:21

Aaron Francis

Hmm.

10:22

Jesse Hanley

Um, and so that when they do make the decision to switch, they do decide to choose us. Um, and then often it's because they've done a demo and they're like, "Okay, cool. I've got big company, big company, local coffee shop. And I can actually speak to Jesse. I've done a demo with him. He's active in the Discord. Uh, I can see that if someone has a very specific email not being delivered, he's given the exact reason why.

10:44

He's not gaslighting me. I'm gonna go with that dude." Um, and that's how we win business. And then from, like, the bootstrap perspective, it's like, well, email is profitable. This, like, you know... Our, our customers we price, we don't have free plans. We charge for everything. I charge you. We charge everyone.

11:00

Aaron Francis

Mm-hmm.

11:00

Jesse Hanley

And, and because of that, it's like a healthy, profitable business. Um, and so I'm not too concerned in growing a lot faster. Um, and we've got, you know, this morning I, like, banned five or six signups in the past couple of days. I'm just not interested in serving them.

11:14

Aaron Francis

Mm-hmm.

11:14

Jesse Hanley

And so we don't have massive amount of signups and so we can kind of keep afloat that way, if that makes sense, so.

11:21

Aaron Francis

Yeah. No, I think that makes-

11:22

Jesse Hanley

Yeah. YouTube videos, mentions-

11:23

Aaron Francis

... perfect sense

11:24

Jesse Hanley

... it's just all over the place.

11:26

Aaron Francis

Yeah. And then having been around for six years with a good track record of supporting your people, I imagine the word of mouth starts to compound a lot more, um, a lot later in the game now. So you've been, you know-

11:39

Jesse Hanley

Mm-hmm

11:39

Aaron Francis

... rolling this snowball for six years and now people are like, "Hey, let's talk about Jesse 'cause I've been, I've been here for a long time."

11:46

Jesse Hanley

Yeah. There was this, um... I won't mention his name, but there was this email copywriter I think I, like, sent you in, in DMs, like, "Oh, go, go check him out."

11:53

Aaron Francis

Mm-hmm.

11:54

Jesse Hanley

Um, and I followed him from like 2010 to 2015, like, reading all of his stuff, right? And then he heard through, I think Brennan Dunn-

12:02

Aaron Francis

Mm-hmm

12:02

Jesse Hanley

... like, referred him somehow. And it's just like everything's connected in this weird sphere where it's like-

12:06

Aaron Francis

Mm-hmm

12:06

Jesse Hanley

... this guy that I followed over a decade ago spoke to one of my friends, and then now this guy that I super respected is considering moving to us next month. And it's like, whoa, how, like, how'd that happen?

12:18

Aaron Francis

Amazing.

12:18

Jesse Hanley

But you just, you just don't know. And I think the, the takeaway for me is always like, you just gotta stay in the game a really long time and, like, the key-

12:24

Aaron Francis

Yeah

12:24

Jesse Hanley

... is just surviving. And if you survive, stuff works out. Like-

12:27

Aaron Francis

Mm-hmm

12:27

Jesse Hanley

... and as long as, yeah, your North Star is survival, I, I, I think it all kind of pans out okay.

12:32

Aaron Francis

Yeah, and it sounds like you've optimized for survival with the no free tier, everybody gets charged a fair amount, but everybody gets charged, and you're gonna ban signups that would, I assume, end up being super problematic for your reputation-

12:47

Jesse Hanley

Yeah

12:47

Aaron Francis

... like your sending reputation or your other customers or something like that. And so you've put in some guardrails, uh, with an eye towards survival, it sounds like.

12:55

Jesse Hanley

Yeah. Yeah. Last night, I banned someone in Austria, uh, 'cause they kind of hurt our IP reputation, uh, on-

13:03

Aaron Francis

Mm

13:03

Jesse Hanley

... one mail stream, and it turned out it was, uh, one of my friend's girlfriends that signed up for a free trial, and so I had a-

13:08

Aaron Francis

Whoops

13:09

Jesse Hanley

... a lively debate with him last night- ... about that approval. I- ... I just thought she was some, some Austrian customer, and I was like, "All right. Bye," during her free trial. And it, it, it, it was not happy. But yeah, we've got a very strict bar, and once she cleans up her list, she'll be back in. Um, but yeah.

13:25

Aaron Francis

Perfect. Well, good luck to her. And good luck to you-

13:27

Jesse Hanley

Good luck to her

13:28

Aaron Francis

... and your friend's relationship.

13:30

Jesse Hanley

She's a good customer.

13:31

Aaron Francis

Um, okay. So I wanna talk tech choices a little bit. Um-

13:36

Jesse Hanley

Yeah

13:36

Aaron Francis

... so we've talked about Rails. You had Andrew Culver, so I assume this is, uh, either originally or, or still a Bullet Train application, which is An-

13:45

Jesse Hanley

Number one

13:46

Aaron Francis

... Andrew Culver built-

13:46

Jesse Hanley

Bullet Train install number one.

13:48

Aaron Francis

You're the first Bullet Train-

13:50

Jesse Hanley

Origin

13:50

Aaron Francis

... Joe-

13:50

Jesse Hanley

Origin, Origin, Origin customer number one. Origin customer number one. So, um, we-

13:56

Aaron Francis

I-

13:56

Jesse Hanley

... we, like-

13:56

Aaron Francis

... did not know that

13:57

Jesse Hanley

... s- so, so Bullet Train was built with Bento at the same time. So they, like-

14:03

Aaron Francis

Really?

14:04

Jesse Hanley

... that, that's kinda how it started, right? So the, the, the origin of Bullet Train, Bento was kind of the base project, um, that was being dogfooded, uh, for the whole start. So that, that's, that's how that worked, and me and Andrew caught up in, yeah, in Japan to initiate that, so yeah. So

14:21

Aaron Francis

Okay. I did not, I did not know that. That is pretty, that's good lore right there.

14:25

Jesse Hanley

There's some lore.

14:25

Aaron Francis

So Bullet Train, for the, for the people that don't know, is like a, it's more than an application starter kit. It's, it's in the, it's in the Rails space. Uh, its closest, uh, analogy would be an application starter kit, but it's more, it's more like a framework on top of a framework because there's lots of-

14:42

Jesse Hanley

Yeah, generators and stuff

14:43

Aaron Francis

... on, yeah. There's lots of ongoing code generation and stuff like that, um, versus just, like, you get a starter kit and you eject and you keep going. Um, so is it still... Like, have you outgrown it? Is it still Bullet Train-

14:57

Jesse Hanley

Yeah, yeah, yeah

14:57

Aaron Francis

... down there?

14:57

Jesse Hanley

Yeah. We, we, we pretty severely forked. We, like, I kind of went off-

15:01

Aaron Francis

I don't think so

15:02

Jesse Hanley

... off, off the rails. I went off the rails-

15:03

Aaron Francis

Yeah

15:04

Jesse Hanley

... uh, a while, a while ago. Um, and so yeah, no. But also, like, different direction. Andrew stayed, I think, from... I gotta go check out the repo, but I'm pretty sure he stayed, like, relatively, uh, close to core, like Stimulus and used all that kind of-

15:17

Aaron Francis

Mm

15:17

Jesse Hanley

... JavaScript stuff. I wasn't so interested in that. I, I like React. Um, I was, I was React curious, and then I started really liking it after I started playing with it a lot more. Um, and so a lot of, like, front end stuff in Bento is, like, React sprinkles on top. I use React components, and then-

15:34

Aaron Francis

Mm-hmm

15:34

Jesse Hanley

... you know, like our flows automated, you know, the diagram automation builder-

15:37

Aaron Francis

Yeah

15:37

Jesse Hanley

... that's all just in React. So, um-

15:40

Aaron Francis

Yeah, there's no way-

15:40

Jesse Hanley

... you can't do that in Stimulus

15:42

Aaron Francis

... you're doing that in Stimulus. Yeah.

15:43

Jesse Hanley

No.

15:43

Aaron Francis

Yeah. So the, uh, what he's talking about is there's a, like, automation engine kinda thing, and it's, like, on a-

15:48

Jesse Hanley

Drag and drop

15:48

Aaron Francis

... canvas, and you can drag nodes in and connect them, and it's, it's extremely powerful and also extremely impossible to do with HTML alone. So that makes-

15:57

Jesse Hanley

Yeah. Yeah. Yeah

15:57

Aaron Francis

... that makes sense to me. Um, okay. So let's talk Postgres. So you're Rails, I gather you're still hosted on Heroku?

16:07

Jesse Hanley

Yep. Yeah, yep. So we've got, um-

16:09

Aaron Francis

Okay

16:09

Jesse Hanley

... so we've got, uh, two, uh, apps on Heroku. We've got our kind of monolith app, and then we've got our chat app. Um, chat's like two-way conversations. Um-

16:18

Aaron Francis

Okay

16:19

Jesse Hanley

... they're both live on Heroku. Uh, and then we also have our own sending servers. So we use a couple of third-party API providers, but we also have our own, uh, MTA network, and that is actually physically what delivers the emails to inboxes. So when-

16:33

Aaron Francis

Wow

16:33

Jesse Hanley

... aaronfrancis.com sends an email, it goes to our MTA, and we deliver it, not SendGrid, Postmark, all that kind of stuff. So-

16:41

Aaron Francis

Really?

16:42

Jesse Hanley

Um, yeah. For, like, for the last year, all of your personal emails have gone through, like, Bento's network, not through any third-party, uh, provider. Um, and that's-

16:52

Aaron Francis

I didn't know that

16:53

Jesse Hanley

... on Postgres too.

16:53

Aaron Francis

Let's, let's take a little, yeah, let's take a little pause from Postgres. You're running your own mail servers? Isn't that, like, hard mode?

17:00

Jesse Hanley

Yeah.

17:01

Aaron Francis

Yeah.

17:01

Jesse Hanley

It's extreme, dude.

17:02

Aaron Francis

Yeah. So why are you running your own mail servers?

17:07

Jesse Hanley

I don't know, because, um... I don't know. I thought it was a good idea.

17:15

Aaron Francis

That's fantastic.

17:15

Jesse Hanley

Uh, it's been, it's been very traumatic. Um, it's been-

17:18

Aaron Francis

Okay.

17:18

Jesse Hanley

... it's been, it's been quite a traumatic experience, but, um, it's been quite enlightening. Um, let me, let me-- I just laughed so hard I almost cried. Uh, so- ... uh, yeah. So it's been, it's been, it's been an experience. So I decided to do it because obviously as we scale, um, sending more emails costs more money, right?

17:40

Aaron Francis

Yeah.

17:40

Jesse Hanley

Um, and also what happens if, like, one of the providers I use go down?

17:45

Aaron Francis

Sure.

17:45

Jesse Hanley

I, I need, I need redundancy in the system, or let's say, like, an automated system, this probably won't happen because, like, I've got enterprise accounts everywhere, but let's say, like, an automated system, uh, bans my account, I need to send.

17:58

Aaron Francis

Mm-hmm.

17:58

Jesse Hanley

I, I can't not send. Um, so I wanted to have-

18:00

Aaron Francis

Yeah, that's not, that's not my problem. That's your problem. So I-

18:03

Jesse Hanley

That's my problem, right?

18:04

Aaron Francis

I agree. Yeah, which sounds terrifying.

18:07

Jesse Hanley

So I need, I needed a way to have, like, resilience, resiliency in the, in the network. Um, and so having my own servers was an exploratory project for me.

18:14

Aaron Francis

Mm.

18:15

Jesse Hanley

Um, and so I did explore that. I won't go into too much detail on, like, how I do it, um, but the end result is we've got servers up, we have multiple IP addresses, uh, we send on them, and it's, it's very, very different. It's more like, you know, like last night I have, like, an open ticket with Hotmail asking them to, like, mitigate-

18:35

Aaron Francis

Hotmail

18:36

Jesse Hanley

... some of my new IPs and stuff because, you know, you do-- you gotta do that or you gotta do, what is it, preemptive mitigation and all this. That, it's just, it's just very, very different. Um, and so yeah. Yeah, it's, uh, yeah, so we've got our own email service . I don't know what more to say about it.

18:53

Aaron Francis

So, I, first of all, I envy you-

18:55

Jesse Hanley

You can ask me questions about it

18:56

Aaron Francis

... 0%. No part of me envies what you do. Second of all, um, besides economics, has it been better for any other reason? Better deliverability, better control, fewer issues, or is it just, like, redundancy and economics?

19:10

Jesse Hanley

Uh, it's redundancy and economics, which i- honestly, frankly, like, two very big parts.

19:14

Aaron Francis

Those are big parts.

19:15

Jesse Hanley

Um, like, the, it's, it's a peace of mind thing, right, which we'll probably go into when we talk about Postgres. It's like, everything that I'm trying to do is for peace of mind. Um, and so yeah. I, I like that aspect of it. Um, just feels nice to have my own stuff. I don't know.

19:32

Aaron Francis

Mm-hmm.

19:32

Jesse Hanley

It's just cool to have, like, my own sending service, you know, that I control-

19:35

Aaron Francis

Mm-hmm

19:35

Jesse Hanley

... and I own. That's all on Hetzner, you know, which is the, the current trend. Um-

19:38

Aaron Francis

That's what everybody's talking about, yeah.

19:41

Jesse Hanley

And they're great, and it's, like, quite empowering having my own box on Hetzner that sends emails-

19:47

Aaron Francis

Mm-hmm

19:48

Jesse Hanley

... and, um, all that kind of stuff. And Hetzner, honestly, have been a pretty good provider. They opened up the ports, which is something that you need to do, um-

19:54

Aaron Francis

Mm

19:54

Jesse Hanley

... to allow us to actually, like, send out. And, like, they're pretty good when they deal with, um, like, uh, they get abuse requests and stuff. Like, at one point, a whole bunch of, like, Brazilian ISPs were spamming them with abuse things that they've, like, just, I don't know, just weird stuff, right? But Hetzner was pretty good at actually, like, talking through support not to shut down our box and all that. So they're, they're a great provider.

20:16

I, I, I really, I like them. I like them a lot, actually. Um, but yeah, it's quite empowering once you get that box up and you're sending zero cost emails. You're like-

20:24

Aaron Francis

Hmm

20:24

Jesse Hanley

... "Whoa, that's different," you know?

20:27

Aaron Francis

Yeah. Got a little, a little taste of free emails. I'm sure that was exciting. This is very-

20:32

Jesse Hanley

It is

20:32

Aaron Francis

... I, I mean, this is very on brand for the current Rails trend. It's more fun to be-

20:36

Jesse Hanley

It is

20:36

Aaron Francis

... competent, host your own stuff, and use Hetzner. That's like, that's big Rails right now. So you're right in line.

20:43

Jesse Hanley

The big stack, yeah.

20:44

Aaron Francis

Yeah, exactly. Okay.

20:47

Jesse Hanley

Yeah.

20:47

Aaron Francis

So that stuff is living over on Hetzner. Wild decision-

20:50

Jesse Hanley

Yeah

20:50

Aaron Francis

... to roll your own mail servers, but mad respect.

20:53

Jesse Hanley

Mm-hmm. Thank you.

20:54

Aaron Francis

Um, talk to me about, uh, Heroku.

20:57

Jesse Hanley

Mm-hmm. Yeah. So on, on Heroku we have a, like, monolith app, which is, like, a Rails app. Um, we're on, we're working towards Rail 7 point something.

21:07

Aaron Francis

Okay.

21:08

Jesse Hanley

Um, and that is primarily a big Postgres instance, just, like, a single node instance.

21:14

Aaron Francis

Mm-hmm.

21:15

Jesse Hanley

Uh, then we have multiple elastic instances supporting that, and I'll go into, like, the reasons why we have-

21:21

Aaron Francis

Okay

21:21

Jesse Hanley

... lots and lots of elastic instances. Um-

21:23

Aaron Francis

Okay

21:23

Jesse Hanley

... and then I have, like, three Redis instances on there for a whole bunch of different things, just separating concerns, background jobs-

21:30

Aaron Francis

Mm-hmm

21:30

Jesse Hanley

... uh, caching layer, and et cetera. So yeah, WebSockets, all that kind of stuff. And Bento Chat is very, very similar to, like, that stack as well.

21:40

Aaron Francis

And, but it's its own stack. It's got its own database-

21:43

Jesse Hanley

Mm-hmm

21:43

Aaron Francis

... and then Redis-

21:43

Jesse Hanley

Own separate

21:44

Aaron Francis

... and everything.

21:44

Jesse Hanley

Yep.

21:45

Aaron Francis

Okay.

21:45

Jesse Hanley

Yep, yep, yep, yep. Yeah.

21:46

Aaron Francis

Okay, cool. Um, I assume you've been on Heroku since the very beginning, and then just have continued-

21:52

Jesse Hanley

Mm-hmm

21:52

Aaron Francis

... to turn the dials as you've grown. Is that right?

21:55

Jesse Hanley

Yeah. Yeah. Yep. And I've liked them for a few reasons, like, a kind of meta reason that I've liked it is with Heroku, once you start spending a lot of money, and you will spend a lot of money, and you're gonna-

22:06

Aaron Francis

Yeah.

22:07

Jesse Hanley

Like, um, w- y- you can sign enterprise contracts. Now, why that's-

22:12

Aaron Francis

Okay

22:12

Jesse Hanley

... beneficial to me is if there is an issue, let's say someone's account gets hacked, or let's say-

22:19

Aaron Francis

Mm

22:19

Jesse Hanley

... someone does, uh, let's say our spam API doesn't catch something, and we start sending out a whole bunch of emails that shouldn't be sent out. That, that is a risk, right?

22:28

Aaron Francis

Yeah.

22:28

Jesse Hanley

And I spend so much time on this, it's not funny, to make sure that this doesn't happen. But on the case that it does, and a ticket gets raised f- to Heroku, if I am on their general population, they will shut me down most likely.

22:45

Aaron Francis

Oof.

22:45

Jesse Hanley

Right? Until I respond to a ticket. They'll just-

22:47

Aaron Francis

Right

22:47

Jesse Hanley

... they'll shut traffic off or they'll, they'll do something. 'Cause I've got the is enterprise flag-

22:52

Aaron Francis

Mm, mm

22:52

Jesse Hanley

... that is much less likely to happen. And so what I, what the advice that I've gotten s- speaking to a lot of insiders there, and actually just in general across any part of my stack is, like, you wanna get to enterprise as quickly as possible, just so you have that-

23:05

Aaron Francis

Interesting

23:05

Jesse Hanley

... is enterprise flag. Um, yeah. Sa- same with, like, Cloudflare. Once, um, I had, like, a URL redirect abuse thing going on. Someone, someone-

23:15

Aaron Francis

Oh

23:15

Jesse Hanley

... managed to find, find that they could, uh, shove us in between their redirect chain and-

23:21

Aaron Francis

Yep

23:21

Jesse Hanley

... use us. That got to Cloudflare, and Cloudflare was great about it. They like, it was a ticket. They're like, "Sort this out," and I did, and it was all good. But I, I, I'm on an expensive plan there, so I think they were less likely to shut my traffic down straight away, so.

23:35

Aaron Francis

Mm-hmm.

23:36

Jesse Hanley

That, that, that, that's why I've stayed predominantly with Heroku for the last, um, yeah, since the beginning.

23:40

Aaron Francis

Do you also get, and if you're not allowed to talk about it, that's fine. Do you also get cost savings? Like, do you pay a bunch up front to reserve some stuff, or you're laughing.

23:49

Jesse Hanley

Yeah.

23:49

Aaron Francis

I don't know if that's good or bad.

23:51

Jesse Hanley

Yeah. They, they changed the, they changed, like, the pricing dynamics a little bit. Um-

23:56

Aaron Francis

Mm

23:56

Jesse Hanley

... and you now get to talk to a sales rep, which you can discuss things with, and you can potentially get discounts.

24:02

Aaron Francis

Oh, that's exciting.

24:03

Jesse Hanley

Um, I don't mind that. I don't mind, I don't mind the negotiation thing. Um, what I don't like is, uh, did you see that tweet that I posted about, it was like, uh, um, you can put, like, a Redis production instance on a little USB drive, whatever. It was, it was that thing.

24:19

Aaron Francis

Mm-hmm.

24:19

Jesse Hanley

And then the, I posted that, and then I was like, "I wonder if Heroku have, like, changed their pricing at all in a decade." And I went to Web Archive. It's the same. Their Redis instances-

24:29

Aaron Francis

Wow

24:29

Jesse Hanley

... are the same in a decade. In a decade. So in 2015, like, one of their instances, 200 bucks a month, right? One gig of, um, uh, RAM. It's the same today, um, which is crazy to me. And on their Postgres instances, a decade, I think, like, all instances are maybe, like, beefed up 50% or something, a little bit more IOPS.

24:48

Aaron Francis

Mm-hmm.

24:48

Jesse Hanley

But they haven't updated their pricing sheet in 10 years, uh, which I'll-

24:53

Aaron Francis

Incredible

24:54

Jesse Hanley

... I'll, I'll tell you how that makes me feel a little bit later. But, um- Yeah, it's-- it was quite eye-opening. I, I did that last week, and I, I kept p- like writing a tweet and then deleting it. I was like so upset, and I was like, "Ah, I'm, I'm just gonna-- I'm just gonna like let this one slide, and I'll think about it-

25:08

Aaron Francis

Yeah

25:08

Jesse Hanley

... for a little bit." But yeah, 10 years. 10 years of-

25:10

Aaron Francis

Well, keep thinking about it-

25:11

Jesse Hanley

... of Heroku database

25:11

Aaron Francis

... 'cause that's a good tweet, yeah. You know, maybe take a little bit of the edge off, a little bit of the- ... the frustration, but that's a good tweet. You gotta tweet that.

25:19

Jesse Hanley

Yeah.

25:19

Aaron Francis

That's good.

25:20

Jesse Hanley

Yeah. I was-

25:20

Aaron Francis

Um, okay

25:21

Jesse Hanley

... I was pretty mind-blown.

25:22

Aaron Francis

You are-

25:22

Jesse Hanley

But they've been great, they've been great provide- I just wanna say something. They've been great, great pro- uh, vendors, and their, their uptime and reliability since booting off all their free users is very good. So I think after-

25:34

Aaron Francis

Oh, you actually saw, you saw a difference there?

25:37

Jesse Hanley

Yeah, yeah. Uh, since, um, I think it's Bob Wiers, since Bob Wiers took over, um, I think from like the infrastructure and like reliability perspective, Heroku has been like phenomenal and great. From the pricing and, uh, product side, very slow. But I think that's like the Benioff-

25:56

Aaron Francis

Yeah

25:56

Jesse Hanley

... grasp on that, on that horse and carriage.

25:58

Aaron Francis

They're inside the Borg now. Yeah, that makes sense.

26:00

Jesse Hanley

In the box.

26:02

Aaron Francis

Um, okay, so you're over on Heroku. You must be storing unbelievable amounts of data because anytime someone clicks on anything in any email that I ever send, you, you write it down. You're very diligent. You write it down, you put it in the database. And I-

26:21

Jesse Hanley

Yeah

26:21

Aaron Francis

... I'm a little guy, so I imagine you've got people sending out hundreds of thousands of emails a month, and every single click is coming through you, to say nothing of all like the actual emails that you're sending. So what, what in the world-- how are you storing all of this stuff in one massive database?

26:41

Jesse Hanley

Um, most of them are just in like basic, basic tables, an events table. We've got like an emails table. Um, so very, very simple kind of setups. All the main pieces of data are stored in there. We've got like some JSONB columns-

26:56

Aaron Francis

Mm-hmm

26:56

Jesse Hanley

... um, to store kind of the more blobs, which then gets pushed to Toast, I would assume for the most part.

27:01

Aaron Francis

Mm-hmm.

27:01

Jesse Hanley

Um, which hasn't, uh, to date hasn't really been like-- I've seen-- I've read a lot of articles about like issues storing a lot of stuff to Toast, but we don't query a lot of that, which is where Elastic-

27:10

Aaron Francis

Mm-hmm

27:11

Jesse Hanley

... kinda comes in. Um, so I haven't-

27:13

Aaron Francis

Oh, yeah.

27:14

Jesse Hanley

W-we use, we use Postgres kind of like as our, our primary data store more so than anything else.

27:20

Aaron Francis

Mm-hmm.

27:20

Jesse Hanley

But not as our query store. Um, and so yeah.

27:23

Aaron Francis

Interesting.

27:24

Jesse Hanley

And some columns as well, like our emails one, they're very, very tiny. Like it's, it's, it's not that much data because I store the HTML in S3. Um, and so I don't actually-

27:32

Aaron Francis

Got it

27:33

Jesse Hanley

... store that, right? So I, I send the email, store in S3, and then it's kinda like done, right? So there's not really, um, too much storage issues there. Um, so yeah. Th-that's-- they, they, they're very, they're very lean rows. They're, they're, they're not too complex. Um, so it's, it's hasn't really been too much of an issue.

27:52

Aaron Francis

So this-- yeah, so this is interesting. So you're storing potentially billions of, of rows in here, but you said you're piping a lot of it out to Elastic to do-

28:02

Jesse Hanley

Yes

28:03

Aaron Francis

... the actual querying. So walk me-

28:05

Jesse Hanley

Yeah

28:05

Aaron Francis

... through that, because that seems very clever.

28:08

Jesse Hanley

So the way that I've kind of thought about Bento is 'cause I've, I've-- there's a couple things that I've always wanted be true of Bento. I've always wanted it to be lightning fast-

28:15

Aaron Francis

Mm-hmm

28:15

Jesse Hanley

... and I've always wanted it to be calm for me personally to run. Um-

28:20

Aaron Francis

Mm-hmm

28:20

Jesse Hanley

... and so a lot of the way that I've like architectured Bento is I'm doing a lot of like just select ID queries. So I'm like selecting the exact records.

28:26

Aaron Francis

Okay.

28:26

Jesse Hanley

I'm doing an association. There's indexes on that. User.emails, user.events, right?

28:31

Aaron Francis

Right.

28:31

Jesse Hanley

So that's al- that's always very, very lightning fast. When I'm doing more broader stuff, like a query over the whole tenant, so over the site, so Aaron Francis, I wanna find Aaron, all of your users.

28:44

Aaron Francis

Mm-hmm.

28:44

Jesse Hanley

Querying that in Postgres, which like I'm sure is, is quite possible, um, it's hard to get right at all scales just because-

28:54

Aaron Francis

Yeah

28:54

Jesse Hanley

... like people have so many different types of, uh, pieces of data. They've got different custom fields, they've got... Just it's, it's very hard to understand and map to everyone's world and create indexes for everything.

29:06

Aaron Francis

Yeah.

29:06

Jesse Hanley

So it's-

29:06

Aaron Francis

So give me, I'll, I'll give you an example 'cause like when I send out an email to, uh... When I send out, I sent out an email maybe yesterday or the day before, and I sent it to everyone that was on my list, so that's already narrowing it down from many, you know, hundreds of thou- millions of subscribers to my little, you know, my little adorable list. But my list where people have this tag, list:sqlite, they don't have opt-out:sqlite, and we didn't wanna spam people or rather send too many emails, so we also

29:37

left out list:postgres. So it's my users with these two tags, but not with this tag, and that's a hard, like, that's a hard query, that's a hard query to optimize. So how are you like-- how are you thinking about that?

29:53

Jesse Hanley

So that's a hard query to optimize for for Postgres, but that's not a hard-

29:55

Aaron Francis

Right

29:55

Jesse Hanley

... query to optimize for for Elastic. That, that is like, like-

30:00

Aaron Francis

Bread and butter

30:00

Jesse Hanley

... chips. Yeah. It's, it's bread and butter for Elastic, right? Um, and so the, the, the pipeline is, is like new data comes into our system, the user gets updated, we push that off to Elasticsearch.

30:11

Aaron Francis

Mm-hmm.

30:11

Jesse Hanley

It gets indexed, and then it's, it's instantly queryable more or less, right? Um, and the reason I wanted to do that is 'cause I just didn't wanna run migrations. Or like let's say I had like, um, a new user request. A user goes, "Hey, I wanna just find engaged, uh, people who engaged with my last broadcast."

30:30

Aaron Francis

Mm-hmm.

30:30

Jesse Hanley

Like that, that's something that someone want. If I wanted to like-- I w- would potentially have to write like a, an extra query for it in Postgres. It may not be optimized. I'd have to write some more indexes.

30:40

Aaron Francis

Right.

30:40

Jesse Hanley

And that's not-- to me, to me, that's not running a calm like company like or a dev cycle for me. So I, I kinda... Elastic is very good just throwing whatever you want at it. It indexes it instantly. I just have to reindex all my users, and then now that's there to be, uh, you know, uh, queried whenever. Um, and so I've just liked that pattern personally.

31:03

And it also takes so much load off the database. So-

31:06

Aaron Francis

Yeah

31:06

Jesse Hanley

... like our database runs very, very calmly. It's never querying too many users, uh, and it's just a calm way to run it for me. Um, the, the downside is it's expensive to run a lot of, uh, Elastic nodes. Um, which you solve by just charging properly, um-

31:21

Aaron Francis

Right

31:22

Jesse Hanley

... and being a- being able to pay for them. That's, like how I kinda see it. So with more money allows me to buy more hardware and, um, hopefully push some more responsibility onto that hardware. And I, I love that Postgres Elastic kind of pairing. Um, it just-

31:36

Aaron Francis

Mm-hmm

31:36

Jesse Hanley

... kind of, it works very well for, for how I, I run Bento at least.

31:41

Aaron Francis

So all these, all these Elastic nodes, did you say three? You have three of them?

31:46

Jesse Hanley

Four.

31:47

Aaron Francis

Four. Okay. So these four Elastic nodes, are they, um, like are they serving different parts of the app? Are they all, um-

31:56

Jesse Hanley

Mm-hmm.

31:58

Aaron Francis

So they're serving different functional roles in the application, and you're pushing-

32:01

Jesse Hanley

Yeah

32:01

Aaron Francis

... different sets of data-

32:02

Jesse Hanley

So there's like, uh-

32:02

Aaron Francis

... to each one?

32:04

Jesse Hanley

Yeah. So let's say there's like an Elastic users, um, uh, cluster, and then that has all the indexes for all my users, and all-

32:13

Aaron Francis

Mm-hmm

32:13

Jesse Hanley

... of them have different mappings and all that kind of stuff. Um, and so that one's lightning fast. I've got like an email one, which I'm currently like restructuring and rebuilding now. Um, I've got like an events one, et cetera, et cetera. So like that's kinda like how I, I split 'em out. I, I, I have, you know, each cluster has its own responsibility, and I, I host that-

32:32

Aaron Francis

Mm

32:32

Jesse Hanley

... on, um, Elastic, Elastic's managed, um, cloud. And-

32:36

Aaron Francis

Okay

32:37

Jesse Hanley

... and, and they're, they're great. They're great. It's a little bit expensive, but like I think I, I mentioned, uh, on, on Twitter last week, it's like a node went down, an Elastic engineer's paged, he's on it, all fixed. I, I go off to get my kid. You know, very, very s- very nice kinda like setup there, and-

32:53

Aaron Francis

Yeah

32:53

Jesse Hanley

... their support tickets are so fast, and, and that's, that's quite nice.

32:56

Aaron Francis

And have you done the enterprise thing over there too so that somebody, somebody's keeping an eye on all your stuff all the time?

33:03

Jesse Hanley

Not, not, not, not so much. It seems like, you know, there's like some platinum support package that I have, and it seems-

33:09

Aaron Francis

Mm

33:09

Jesse Hanley

... like I, I get that with that, so more or less.

33:12

Aaron Francis

Nice.

33:13

Jesse Hanley

Yeah. Um-

33:13

Aaron Francis

Okay

33:14

Jesse Hanley

... but yeah, ba- back to like the, the Postgres stuff, it's just very s- lots of selects. Lots, lots of single selects, very lean insert, and then I'm just directly selecting most of the time.

33:24

Aaron Francis

Okay. Yeah. I've, I've wondered, um, 'cause you and I talked a long time ago about, uh, storing JSON in, you know, relational database, and like how to, how to query it in any which way that you want, and the answer is just like, "It's hard, man." Like, especially when you get to, you know, s- the scale that you're at. It's just, it's just hard.

33:44

Like it's doable, um, but at some point it starts to fall over, and so that's where Elastic really shines for you. And so how do you get it out of, how do you get it out of Postgres and into Elastic? Like what's the actual tool or mechanism that you're using there?

34:01

Jesse Hanley

Yeah. So we use a gem called, um, searchkick, which I've kind of like hard forked.

34:05

Aaron Francis

Mm.

34:05

Jesse Hanley

It's like a, a, a Rails gem. Um, uh, Andrew Kane built it. He's like a, a wizard. I love like all of his-

34:11

Aaron Francis

Mm-hmm

34:11

Jesse Hanley

... gems. And, um, yeah, that handles most of the indexing. I forked it and modified it so it handles multi-tenant. So I can put tenants-

34:19

Aaron Francis

Cool

34:19

Jesse Hanley

... in their own bu- bucketed clus- like bucketed indexes essentially. So 100 customers here, 100 customers there, et cetera. Um, and gives me a lot more kinda control over that. Um, which was like a very big learning for me on like the Elastic side. Um, but again, the whole, the whole pipeline is like user gets updated or an event comes in, push that to Sidekiq, which is a background job queue.

34:41

Aaron Francis

Mm.

34:42

Jesse Hanley

Sidekiq then indexes it, and it's good to go. It's good to query from there. Um, yeah. And then on the reverse-

34:49

Aaron Francis

Interesting

34:49

Jesse Hanley

... it's like I, I build a segment, I grab the IDs, I grab all those IDs, and then I start emailing them and send them off to Sidekiq to send all those emails, uh, on the reverse side.

35:00

Aaron Francis

Okay. So when you come in-- when you're coming out of Elastic, what you're pulling out of Elastic is primary keys, and then you're going back to Postgres, and Postgres is like, "Yeah, dude, I can handle that." And then you just pull all those-

35:10

Jesse Hanley

I can do that. I'm great at this. Yeah. So, so Postgres goes, "I know what to do, baby. Give me those IDs."

35:15

Aaron Francis

Yeah.

35:16

Jesse Hanley

It grabs those IDs-

35:17

Aaron Francis

I need one. I could do-

35:18

Jesse Hanley

And then just goes, sends those emails out, right? Um-

35:21

Aaron Francis

Uh-huh.

35:21

Jesse Hanley

But, but, but that, that's reduced so much anxiety for me, right? So, so-

35:25

Aaron Francis

Yeah

35:25

Jesse Hanley

... and, and I, I love Postgres for that. It's great at looking up IDs, and I'm sure I could obviously use like anything. I could probably use SQLite if I wanted to, but, um-

35:33

Aaron Francis

If you're just looking up IDs, my friend, I think you probably could.

35:37

Jesse Hanley

Yeah, yeah, yeah. In like other areas of the app, I'm sure there's like slightly more complex, um-

35:43

Aaron Francis

Sure

35:43

Jesse Hanley

... joins and stuff, but for the bulk of our querying, no, it's very, very light. It's, you know, lots of, lots of, uh, yeah, lots of lookups, but very, very, very simple lookups. And I just love that pattern of push stuff to Elastic, grab it from Elastic-

35:57

Aaron Francis

Mm-hmm

35:57

Jesse Hanley

... do stuff with it. It's just very, very clean. Um, and I love the flexibility that when a user throws something at me in Discord and says, "Hey, I need this new query," and I go, "That's actually not a bad idea."

36:10

Aaron Francis

Mm-hmm.

36:10

Jesse Hanley

I quickly add, uh, it to like the indexing, so I can just say, "Hey, in the index, add this to the mapping," and then I just re-index all that user's data, and then now they can query it freely, and I don't have to worry about like a, a, a big, uh, migration or any of that kind of stuff. So that, that works perfectly for me.

36:28

Aaron Francis

Yeah, those, those, those big migrations are not, uh, congruent with a calm business. They're just, they're just not. Um-

36:36

Jesse Hanley

No

36:36

Aaron Francis

... when you're gonna migrate over, you know, billions and billions of rows in a relational database, that's kinda terrifying no matter how much tooling you have set up around it.

36:46

Jesse Hanley

Yeah. Yeah. The, the, the down- the downside like w- with this approach, which has been kinda nice because Postgres is now like, like its main responsibility is just to hold the data and store the data and do lookups on the data. I'm not like giving it too many fancy responsibilities.

37:01

Aaron Francis

Mm-hmm.

37:02

Jesse Hanley

It means now like I've begun the process of going, "Okay. Well, we're obviously gonna continue sel- you know, getting more data, and, uh-

37:09

Aaron Francis

Yeah

37:09

Jesse Hanley

... eventually I am going to cap out at my Heroku plan limit." Right? And so before that happens, I need to work out, all right, well, like, what's the plan? What's the strategy here? And then that's now where I'm kind of in this process of investigating, all right. And I've been investigating for a while, but now I'm starting to get a, a little bit more serious 'cause I have a Heroku-

37:28

Aaron Francis

Yeah

37:28

Jesse Hanley

... Heroku renewal coming up. And so-

37:30

Aaron Francis

Yeah

37:30

Jesse Hanley

... um, I'm exploring a lot more options a little bit more intimately about, all right, how do I split this database? Like I have with Elastic, right?

37:37

Aaron Francis

Yep.

37:37

Jesse Hanley

With Elastic, I've got my users, my events, my emails. I want my Postgres to be the same. I want everything, email responsibility here, event responsibility here, et cetera, et cetera, just to remove some more anxiety and more stress from my life. Um-

37:51

Aaron Francis

Mm

37:51

Jesse Hanley

... and so that's currently my, like, big project at the moment.

37:54

Aaron Francis

So tell us, uh, so we get a sense of scale. You said you're gonna top out of Heroku. What is the top tier of Heroku Postgres, and how much ti- how much headroom do you think you have until it's, like, game over, man?

38:09

Jesse Hanley

Uh, sometimes next year. Uh, probably-

38:11

Aaron Francis

Damn. That's-

38:11

Jesse Hanley

... probably, like, mid... Yeah. Probably, like, mid next year.

38:15

Aaron Francis

That's not very far.

38:17

Jesse Hanley

No, it's fine. I, I... It's fine. It's fine.

38:20

Aaron Francis

No, that's plenty-

38:20

Jesse Hanley

I can-

38:20

Aaron Francis

... it's plenty of time, but it's, it's not s- it's not terrible.

38:23

Jesse Hanley

Her- Heroku caps, Heroku caps out, but competitors don't cap out at, at that. So that, that's a-

38:28

Aaron Francis

True

38:28

Jesse Hanley

... as a, as an aside.

38:29

Aaron Francis

True.

38:30

Jesse Hanley

Um, and it looks like Heroku's actually added a couple more plans. I think, um, the standard plan, $12,000 a month.

38:38

Aaron Francis

Ugh.

38:39

Jesse Hanley

Um, what are they doing over there? Um, and it looks like the pricing table-

38:48

Aaron Francis

Is that plan, is that called the Jesse plan?

38:50

Jesse Hanley

That's, that's, that's eight, eight terabytes. So, so that, that's-

38:53

Aaron Francis

Eight terabytes

38:53

Jesse Hanley

... that's, that's... Yeah, yeah, yeah. So, you know, um, yeah. So that, that's-

38:59

Aaron Francis

Okay. So-

38:59

Jesse Hanley

... that's their maximum. But, but regardless, I, I, I wanna, I wanna split out from that. Um, and the, the solutions that I'm, I'm looking at is either I go to Crunchy. Crunchy is great because I can potentially have these multiple databases, and they allow-

39:11

Aaron Francis

Mm-hmm

39:11

Jesse Hanley

... me to scale, as it should be, RAM and storage. And because I'm not-

39:16

Aaron Francis

Hmm

39:16

Jesse Hanley

... doing such expensive querying, that works so much better for me. Whereas Heroku, they're like, "No-

39:20

Aaron Francis

Oh, yeah

39:20

Jesse Hanley

... you need the big boy everything," right? Um-

39:23

Aaron Francis

Right

39:23

Jesse Hanley

... and I don't need the big boy everything. Um, and so Crunchy l- gives me that flexibility. The other option is I've also got Citus, which is the Postgres extension. Um-

39:33

Aaron Francis

Mm-hmm

39:34

Jesse Hanley

... and I, I've looked at going to MySQL and stuff. I'm not t- totally keen on that after, like, a little bit more research. I, I wanna stay in the Postgres, uh, world. Um, and-

39:43

Aaron Francis

Y- really? You looked, you looked at moving to different-

39:46

Jesse Hanley

Spent a lot of time

39:48

Aaron Francis

... really? Tell me why did, why did you... That even cross your mind? Because you wanted-

39:52

Jesse Hanley

Um-

39:52

Aaron Francis

... to use something like Vitess?

39:55

Jesse Hanley

Yeah. So I, I looked at Vitess a little bit, um, and, like, ev- everything kind of looks nice. I think now it supports foreign key constraints, I think. Um-

40:04

Aaron Francis

It does, yeah

40:05

Jesse Hanley

... last time. It do- it does now. At the time of doing the main provider's dinner, so I, I wasn't-

40:10

Aaron Francis

Mm

40:10

Jesse Hanley

... totally interested in, like, dropping all my F keys.

40:13

Aaron Francis

Mm-hmm.

40:14

Jesse Hanley

Um, but also I'm not, like, totally sure I really need to... I, I just don't wanna learn MySQL, and, like, I've-

40:21

Aaron Francis

Yeah. I, I don't blame you

40:22

Jesse Hanley

... developed such, like, an affinity... Yeah, I've devel- developed such an affinity for Postgres, and I don't like seeing... The, the vibes are important to me. This is gonna be, like, a weird tangent, but the vibes are important to me. And when I look at MySQL, I see things like people complaining about performance issues on, like, social and everywhere-

40:37

Aaron Francis

Yeah

40:37

Jesse Hanley

... and, like, you know-

40:38

Aaron Francis

Yeah. Yeah

40:38

Jesse Hanley

... more upgrades come out, and there's more degradation-

40:41

Aaron Francis

It gets worse

40:41

Jesse Hanley

... in. It gets worse, and it's kinda like, I don't know. Uh, the... Whereas Postgres, it's like everything's faster . Everything gets really-

40:48

Aaron Francis

Everything's getting better

40:48

Jesse Hanley

... everything's faster, and the numbers are so much bigger. And I'm like, "I love big numbers. Give me those big numbers."

40:53

Aaron Francis

Mm-hmm.

40:54

Jesse Hanley

Um, and I also find that, um, a lot of the contractors and people that I speak to in the Postgres world are a lot more approachable to me. Um, and there's a lot of Rails Postgres people, uh, that I've been able to talk to, and they've been fantastic and helpful. That... And, and that's my general approach. If I run into a problem, I try and find experts to talk to.

41:17

Aaron Francis

Right.

41:17

Jesse Hanley

And if I find a lot of experts that are very approachable, I'm obviously gonna be a little bit more pulled into, like, that direction, you know? So-

41:24

Aaron Francis

Yeah

41:24

Jesse Hanley

... um, yeah.

41:25

Aaron Francis

Yeah. Y'all's, y'all's ecosystem, uh, the Rails ecosystem is very heavily Postgres. And you make an interesting point about the, like, the experts being approachable. I could name 10 or 15 Postgres experts on Twitter that I could DM right now, but there are very few MySQL experts that I am aware of.

41:47

Um, many of them work at, at a company I used to work at, but there are a few that are independent. But it does seem like, it does seem like there are a lot of Postgres people out there, uh, willing and able to help pretty quickly.

42:00

Jesse Hanley

Yeah. Even, like, the Crunchy Data team, like, I've messaged Craig a bazillion times. I've jumped on calls-

42:05

Aaron Francis

Mm-hmm

42:05

Jesse Hanley

... with them and stuff, and they're very, very... They just help you. And I think they're a little bit more long-term. So yeah, I don't know. The, the energy feels a little bit better in, in the Postgres space, so I'd rather stay there. The Citus stuff is really interesting to me. Um, have you done much research, uh, into Citus and played, played with it a bit?

42:20

Aaron Francis

I've done, I've done a little bit, but ex- yeah, explain. And I actually had Craig on the last one, and we talked a little bit about Citus, but explain for the, the listener what Citus is and maybe what it compares to.

42:32

Jesse Hanley

Yeah, sure. So it allows you... It's a Postgres extension. It allows you to basically have a whole bunch of Postgres nodes that all work together, and then you can have what's called, I'm pretty sure it's called a distributed table, uh, if I recall correctly. And then that allows you to give it a shard key. So let's say for me, it's like a tenant ID or a site ID.

42:49

Aaron Francis

Mm-hmm.

42:50

Jesse Hanley

Uh, and then your data kinda gets spread across them. Um, and then you can auto-balance and all that kind of stuff. You can spin up new nodes, and it just allows you to scale a little bit more easier. And it means if a node goes down, then you can bring that one back up. It's not, like, the end of the world. So it, it allows you to have distributed tables, which Vitess and all that, uh, allow as well.

43:10

Aaron Francis

Mm-hmm.

43:10

Jesse Hanley

But it remains a Postgres extension, and, um, you can get a cloud solution with Microsoft, uh, with the Azure stuff. Yeah.

43:18

Aaron Francis

Oh, really? Oh, with Azure. Interesting.

43:19

Jesse Hanley

It's super affordable. Yeah, with Azure. They call it ... some horrific name. It's, uh-

43:25

Aaron Francis

Something, yeah

43:25

Jesse Hanley

... what is it?

43:26

Aaron Francis

Totally esoteric.

43:26

Jesse Hanley

Azure Citus, they call it HyperCloud or something like that. Um-

43:30

Aaron Francis

HyperCloud.

43:31

Jesse Hanley

Yeah. I don't know. It's, it's something... Hyperscale. Hyperscale, that's it. Hyperscale Citus is now Azure Cosmos DB for Postgres.

43:40

Aaron Francis

Oh, so it was, it was Hyperscale, and now it's Azure Cosmos, of course.

43:44

Jesse Hanley

Yeah.

43:45

Aaron Francis

No, that's perfect.

43:45

Jesse Hanley

Yeah. Yeah.

43:46

Aaron Francis

That's perfect. Yeah. Good a- good idea.

43:47

Jesse Hanley

Um, but-

43:47

Aaron Francis

Good name, good name

43:48

Jesse Hanley

... but, but then the, the, the issue with having a large single node is, uh, you know, even if... Depending on, like, your backup strategy, so our back... We use continuous protection with Heroku, which is just snapshots regularly, and then you've got the WAL. And so bring that node back up, it restores a snapshot, replays the WAL, you're back, and then it runs. Um, it's a lot easier to get multiple nodes up, uh, simultaneously than a single node.

44:15

And so-

44:15

Aaron Francis

Mm-hmm

44:15

Jesse Hanley

... a lot of the Citus benefits is just be- being able to, you know, if, if you go down, raise them back up really, really fast. Um, I kinda, I like, I like, I like that structure a little bit more than having a, a single node. But at least at this scale, I may consider, uh, as a first step just having multiple single, like, single nodes, have their own responsibility, um, and then kind of go from there.

44:37

Aaron Francis

So you're considering-

44:39

Jesse Hanley

See how it goes later.

44:39

Aaron Francis

Yeah. If I'm hearing this correctly, you're considering potentially two different, um, sharding strategies. One would be-

44:46

Jesse Hanley

Yep

44:46

Aaron Francis

... more traditional where you're sharding on a tenant ID, and so some n number of tenants go per, you know, Postgres, and then, you know, you send your queries to the right tenant based on their tenant ID. The other one would be you're sharding based on, like, not a email domain, but, like, domain in terms of, like, the application term. So, like, emails go here, events go here, users go there.

45:09

And so talk me through this, like, this thought process and where you're currently at.

45:15

Jesse Hanley

Where, where I'm currently at is I, I like the single node approach because o- once I actually break down my DB, the total DB sizes actually aren't too big. Um, and-

45:25

Aaron Francis

Mm-hmm

45:25

Jesse Hanley

... some, some of the issue that I have actually with Postgres is there's, there's quite a lot of bloat in there, um, I think from just updating records, right? 'Cause whenever I send-

45:32

Aaron Francis

Mm-hmm

45:33

Jesse Hanley

... out an email, all those users are getting updated. Anytime an event happens, that user is also getting updated. So-

45:39

Aaron Francis

Mm-hmm

45:39

Jesse Hanley

... um, I could probably, like, tune vacuum a little bit, but it's never gonna reclaim space until I do a vacuum full, and frankly, I'm not gonna do a vacuum full because that's gonna lock the table.

45:52

Aaron Francis

Mm-hmm.

45:53

Jesse Hanley

Um, and so a part of this process, I actually just wanna, like, move to another DB so then I could potentially vacuum those ones independently.

46:00

Aaron Francis

On the way out. Yeah.

46:01

Jesse Hanley

Or, or rebuild... Yeah, on the way out or rebuild them or an approach that I've considered, uh, and I actually got this idea from, uh, when I was exploring, like, the Vitess stuff-

46:11

Aaron Francis

Mm-hmm

46:11

Jesse Hanley

... um, is potentially using Rails just to double sync. So just write... So, uh, send, and then have, like, a background job just push that to the other separate DB, and then I can run a background job just to fully sync all the backlog over a time period that I'm very comfortable with.

46:30

Aaron Francis

Hmm.

46:30

Jesse Hanley

Um, and then that other DB is then, you know, it's getting those, uh, inserts fresh. Um-

46:37

Aaron Francis

Mm-hmm

46:37

Jesse Hanley

... and so it'll potentially be less bloated and all that kind of stuff. So I've got a couple approaches. Another approach I've got is, like, uh, potentially streaming in an exact replica from, uh, one DB to another DB, uh, and then just changing reads and writes.

46:52

Aaron Francis

Mm-hmm.

46:53

Jesse Hanley

So let's say I'm, I'm going from, like, a, let's say the emails table. I've got, um... It's all going to the main DB. I can get up a replica, switch that to be able to write to, and then just in Rails, just toggle it over to start writing-

47:05

Aaron Francis

Mm-hmm

47:05

Jesse Hanley

... to the new one, right? So th- that's also an approach. There's, yeah, there's a, there's a few ways I can do it. They're, they're not... Yeah. They... I'm just trying to pick which one I vibe with the most and is least stressful.

47:16

Aaron Francis

And which one do you vibe with the most? Like, right now, which one are you feeling?

47:21

Jesse Hanley

I vibe with, um, I actually vibe with having multiple single nodes on Crunchy.

47:27

Aaron Francis

Okay.

47:27

Jesse Hanley

Um, because I, I like the idea of, on the Rail side, just being able to switch over my reads and writes and coordinate-

47:34

Aaron Francis

Mm-hmm

47:34

Jesse Hanley

... with the Crunchy team just to get that, um, one straight on, and I can enter a maintenance period-

47:39

Aaron Francis

Mm-hmm

47:39

Jesse Hanley

... on our app, queue up all those background jobs, switch over the writes, reboot all the instances, and then I'm kind of good to go. And then on that new instance, drop all the other tables 'cause I, I, I don't, I don't need them anymore, right? And then-

47:53

Aaron Francis

Oh, I see

47:54

Jesse Hanley

... I'm back up and running.

47:55

Aaron Francis

Yeah.

47:55

Jesse Hanley

You know what I mean? So I, I can have a full replica of both the instances, so I'm running kind of like two core.

48:00

Aaron Francis

Mm-hmm.

48:00

Jesse Hanley

Switch it only for a couple of tables, drop everything else, and then I'm... I've got, like, a nice clean table or a nice clean-

48:07

Aaron Francis

Hmm

48:07

Jesse Hanley

... database with just what I need. Uh, that's, like, the least stressful route, I think. Um, yeah. Why are you looking at me like that?

48:19

Aaron Francis

I didn't know, I didn't know if you were gonna keep vibing. You, you looked... You stared off into space. You said, "I think that's the least stressful route," and then you said- ... "Yeah." So I didn't know if, if you were second guessing your, uh, your decision there.

48:33

Jesse Hanley

No, because c- 'cause, 'cause a lot, a lot of it's you gotta kind... You just gotta explore this stuff, right? Um, and you got, you gotta do it a few times and, and, uh, you know, mess up a few times. 'Cause this has been my experience with trying to get Elastic to work, actually. Like-

48:47

Aaron Francis

Mm-hmm

48:47

Jesse Hanley

... just any, any database, you just gotta try a whole bunch of stuff, um, see which ends up being the most seamless, and then when you find something that is pretty seamless, then, um, yeah, yeah, then roll it out and commit to it. But I, I try not to, like, give myself any, like, really hardcore deadlines and just take things-

49:04

Aaron Francis

Mm-hmm

49:04

Jesse Hanley

... nice and slow. Um, but I, I do like-

49:06

Aaron Francis

Okay

49:06

Jesse Hanley

... having multiple sing- single nodes. Yeah. That, that's what I wanna go with. I'm gonna put that in.

49:11

Aaron Francis

Yeah. There. Done. Well, so I... We gotta, we gotta talk about this because you said earlier that, you know, when you were working with Andrew, you were like, "Yeah, I was, you know, I was learning to code kinda on the side." So that was at most six years ago, and now you're- Now you're a one, a one-man show running an ESP with your own mail servers, and you are migrating massive databases.

49:40

What-- how are you, like... Talk to me about, like, your, your approach to learning things or, like, how you've gotten to where you are now, because this is a lot of very complicated stuff, and by your own admission, six years ago you were like, "Ah, I'm just trying to learn to code." So how did we get here?

50:03

Jesse Hanley

I don't know, man. Um. I don't know, man. There's probably so many, like, easier businesses to run.

50:11

Aaron Francis

Yes.

50:11

Jesse Hanley

But in saying that-- like, in, in saying that, like... I'm sorry. Let me, let me think about this . Let me think about this. It is, it is, it is complex, but it's also, it's also not, right? Like, at the end of the day, Bento is kind of like a glorified CRUD app.

50:27

Aaron Francis

Yeah.

50:27

Jesse Hanley

We take in form submissions, we process them, we put them in a database. We have some callbacks that send emails. That's actually not too, too tricky.

50:37

Aaron Francis

Okay.

50:37

Jesse Hanley

Querying's not too tricky. Um, Elastic is, like, a beautiful-- has a beautiful DSL. Is that what you call it?

50:44

Aaron Francis

Mm-hmm.

50:44

Jesse Hanley

A beautiful querying language to, um, to, to hit to bring in data. Um, any problem that I've faced, touch wood, I've always been able to overcome, even if it's been horrific and catastrophic. I've always, I've always figured it out eventually. Um, and I think having done enough of those where I, I can figure it out, I have the confidence that I will figure it out.

51:10

Aaron Francis

Mm-hmm

51:10

Jesse Hanley

... but I also have a little bit of a, a change in how I used to approach things. So I'm a lot slower in approaching things. I have the budget now to just spin stuff up, um, and so-

51:20

Aaron Francis

Mm-hmm

51:20

Jesse Hanley

... I'm comfortable just spinning stuff up and trying stuff. Um, and so when I'm working with, like, a lot of data, yeah, there's sometimes no other option than just, like, rebuilding the world, playing with the world a little bit, and, uh, if it doesn't work, just blow it up and try something new, right? And I think that, that, that approach works, works pretty, pretty, pretty, pretty well with me.

51:44

Um, but when I'm making all these, like, decisions on where to go, I am very heavily biased of, like, where I can get help. Um-

51:53

Aaron Francis

Mm-hmm

51:53

Jesse Hanley

... and so, like, on the-- in terms of my decision for, all right, do I go to Citus or do I go to Crunchy with multiple single nodes? I'm a lot more biased to go to Crunchy because I know that if I run into a scary, hairy problem, I have someone to talk to, and I can jump on a call with them, and I can just, like, riff, and that alleviates so much.

52:17

Like, I remember-

52:17

Aaron Francis

Mm-hmm

52:17

Jesse Hanley

... when I hit, like, one terabyte on Heroku, I was, like, panicked. I was like, "Oh, I got too much data."

52:23

Aaron Francis

Mm-hmm.

52:23

Jesse Hanley

Um, just 'cause I'd never seen a terabyte database before.

52:26

Aaron Francis

Yeah.

52:26

Jesse Hanley

Yeah. It's, like, scary. Um-

52:29

Aaron Francis

Yeah

52:29

Jesse Hanley

... and I'm like, "I don't know what to look out for." Like, what's transaction wraparound? What's, like, all this kind of stuff, right? Uh, and so I jumped on, uh, a guy called Jesse at Heroku, who's now at Crunchy, apparently. Um-

52:44

Aaron Francis

Sure

52:44

Jesse Hanley

... they've taken everyone. They've gutted that business out.

52:46

Aaron Francis

Yeah.

52:46

Jesse Hanley

So I, I, I chatted to Jesse, and we went through my instance. He told me everything. We talked through stuff. I learned. Uh, and, like, through that process, I'm now confident in a whole bunch of things, and I'm also not paranoid in a lot of things. I think, like-

53:00

Aaron Francis

Mm

53:00

Jesse Hanley

... with databases, knowing what not to be scared of is, like-

53:04

Aaron Francis

Mm

53:04

Jesse Hanley

... one of the largest challenges. Being like, "Hey, I actually don't need to worry about that." Or if I change things, I don't need to worry about that either. Um, and so a lot of my design decisions are going, how do I just not ever worry about this silly thing? And then I'll try-

53:16

Aaron Francis

Mm-hmm

53:16

Jesse Hanley

... and restructure things so I'm never worrying about that silly thing. Same with, like, whoa, my database is exploding. All right, well, how about I don't store HTML content in the database. Why don't I put that- ... in S3? Like, maybe that's a smart thing to do, right? Um, especially when someone's sending out 100,000 emails. Don't do that. So just, just decisions like that take a lot of the, the weight off.

53:38

Um, and I think that's been helpful, being able to run a business, at least of this size and this scale, uh, calmly, if that makes sense. Um.

53:48

Aaron Francis

Yeah. It makes a ton of sense. So I'm, I'm hearing a, a few things, um, as it relates to being able to run this what, in my opinion, is a very difficult business to run. Even if it is just CRUD, it still seems very difficult. Uh, one is you've, you've made a lot of decisions optimizing or at least with an eye towards having a calm business/life.

54:12

And I think that needs to be stated because a lot of people are like, "Oh, I would love a calm business," and then never make decisions that would make their life calmer or easier. So that seems like number one, uh, at least, like, consider it when you're making a decision. Number two is you now have, um, I think from what you've said, you now have budget, which is margin to, like, try some stuff out.

54:34

So you can-

54:34

Jesse Hanley

Explore

54:35

Aaron Francis

... you know, you can get a whole replica of the world and mess it up and then burn it down, and that's totally okay. And then the thing that you keep talking about, which I think is very important, is, um, your relationships in the industry. Like people-

54:50

Jesse Hanley

Yeah. It's huge

54:50

Aaron Francis

... that you know, like, and trust that you can reach out to and either just have a call with or explicitly hire to, to help you do stuff. Is there anything else you think-- like, do those feel like the three main things towards... like, that have allowed you to have a calm business at this scale?

55:07

Jesse Hanley

Yeah, I think so. One, one-- can I give, like, an example of, like, a product-

55:10

Aaron Francis

Please

55:10

Jesse Hanley

... decision that, that's helped?

55:12

Aaron Francis

Yeah.

55:12

Jesse Hanley

So, um, for example, in Bento, there's obviously a lot of data and a lot of pages load a lot of that data. Um-

55:19

Aaron Francis

Mm-hmm

55:19

Jesse Hanley

... and sometimes even on, like, a page like the, let's say, the visitor browser, you know, when you go to people and you see all those users-

55:26

Aaron Francis

Mm-hmm

55:26

Jesse Hanley

... sometimes that page can have a lot of N plus ones, you know-

55:29

Aaron Francis

Mm-hmm

55:29

Jesse Hanley

... where it got, like, tags loading, fields loading, sales loading. Just a lot, right? Um, and for Postgres, that's not too hard to do, but sometimes that can be slow. Um-

55:42

Aaron Francis

Mm-hmm

55:42

Jesse Hanley

... and so what I've tried to do is I've tried to remove a lot of the querying out of the web request. So when you load, when you load that page, uh, I actually create a WebSocket connection and a background job in an-

55:57

Aaron Francis

Mm

55:57

Jesse Hanley

... in a background worker. That builds the world and pumps HTML back into the page. I don't actually ever... That's why Bento is so fast. So when you're, when you're going from page, you probably noticed Bento is very, very fast.

56:11

Aaron Francis

It is.

56:11

Jesse Hanley

But I'm actually never doing a request other than, like, a tem- you know, site ID, user ID, all that. Like, if I-

56:20

Aaron Francis

Uh-huh

56:20

Jesse Hanley

... if I, if, if I showed you my querying, every web request is, like, instant because almost none of it's happening in the web request cycle. All of it is happening in background jobs. Most of it is happening in background jobs. Um, and that has allowed N+1s to be-

56:34

Aaron Francis

Happening in a background job in response to a request.

56:40

Jesse Hanley

Yeah, yeah, yeah. I mean, you can go do it now. If you go to Bento, it'll, it had, like, the spinner.

56:44

Aaron Francis

Uh-huh.

56:44

Jesse Hanley

That has opened a WebSocket connection, background job gets processed, and then we're pumping HTML back into the view. Um, and that is why everything feels so snappy. Um, because it-

56:57

Aaron Francis

So when I, when I come back to Bento after leaving a tab open for a long time, it has this notification that's like, "Websocket thing has been lost," and I'm, you know, this is leaving it open for 24 hours.

57:07

Jesse Hanley

That's what that is.

57:08

Aaron Francis

I'm like, "What's these, what's it using WebSockets for?" Everything is the answer.

57:11

Jesse Hanley

Everything.

57:11

Aaron Francis

Everything.

57:13

Jesse Hanley

You, you, so, so, and, and, and, and, like, another thing is, like, you know, when you go to Flows, I do think I, I got a Postgres query for this. You know when you go to Flows and every node has stats on it, right?

57:21

Aaron Francis

Yes. Yes.

57:22

Jesse Hanley

And so I, I obviously have to do a, I obviously have to do a count on that. Now, if I had to do a count on the web request when you loaded that page, it would-

57:30

Aaron Francis

Your host

57:30

Jesse Hanley

... it would explode

57:31

Aaron Francis

... came over.

57:31

Jesse Hanley

It-

57:31

Aaron Francis

Yeah

57:31

Jesse Hanley

... what happens if someone has 2,000 nodes on there, which some people do, right?

57:36

Aaron Francis

And users-

57:36

Jesse Hanley

It would explode

57:37

Aaron Francis

... users will be doing stuff, so you know that somebody has 2,000 nodes.

57:41

Jesse Hanley

And that's the, that's the thing. So users will always be doing stuff. And they'll always be breaking things in, like, the weirdest ways.

57:47

Aaron Francis

Uh-huh.

57:47

Jesse Hanley

And so with that one what I did... Like, let's say, now talking about Flows.

57:50

Aaron Francis

Yeah.

57:50

Jesse Hanley

With Flows, I have it so we'll, uh, I'm using, like, a React observer, um, uh, library.

57:59

Aaron Francis

Okay.

57:59

Jesse Hanley

And when the, when the node comes into view, I create a WebSocket connection.

58:04

Aaron Francis

There you go.

58:04

Jesse Hanley

That then joins a background queue. That does the SQL count, and then it streams it in. Um, and so a lot of the, the product design decisions have actually been arou- around me being mindful that, okay, I wanna be, like, a little bit more generous on my Postgres instance, and I wanna allow-

58:20

Aaron Francis

Mm

58:20

Jesse Hanley

... it to have time even if a query is not optimized. And so I take that out of the web request, put that in a background job, and then that allows things to be perceived, be lightning fast even if they take a couple of seconds to compute. Because if you click a button and it takes two seconds, that sucks, and that happens in every other email marketing provider-

58:38

Aaron Francis

Totally. Totally

58:38

Jesse Hanley

... that I've ever personally used.

58:40

Aaron Francis

Yeah.

58:40

Jesse Hanley

Because they're doing it in the web request. And so it just gives you a lot more grace.

58:45

Aaron Francis

Who can blame them? Everyone does that, Jesse. Everyone but you has... Nobody's figured this out. So what do you send me-

58:51

Jesse Hanley

Yeah

58:51

Aaron Francis

... when I click a button? What do you send me? Just a shell? Just, like, an HTML shell that you then populate?

58:57

Jesse Hanley

Depends on the page. So, like-

58:58

Aaron Francis

Okay

58:58

Jesse Hanley

... um, it depen- it depends on the page. So, like, uh, let's say the tags page. I mean, people only have 100 tags querying. That's very easy.

59:05

Aaron Francis

Mm-hmm.

59:06

Jesse Hanley

So there's no WebSocket for that. But there-

59:08

Aaron Francis

Mm

59:08

Jesse Hanley

... there's a, a counter on the right-hand side of the tags. Each individual tag-

59:12

Aaron Francis

Mm-hmm

59:12

Jesse Hanley

... has a count of how many people-

59:13

Aaron Francis

Mm-hmm

59:13

Jesse Hanley

... have the tags. That's tag.usertags.count or whatever.

59:17

Aaron Francis

Mm-hmm.

59:18

Jesse Hanley

That is... Yeah, that's a WebSocket request. I'm always gonna WebSocket request that one 'cause, I don't know, maybe the count's slow or let's say, um, someone's doing a lot of writes. Uh, there, there's so many things that could go wrong, and so-

59:31

Aaron Francis

Of course

59:31

Jesse Hanley

... I always, I always push that to... Yeah, I always push that to a WebSocket and then stream in the HTML. Um-

59:40

Aaron Francis

So have you built, like, a little, kinda like a little homegrown framework to say, like, on the front end, what is being requested, and then on the back end? Like, how, how do you tie all this stuff together in a way that's not bespoke for each t- each time?

59:55

Jesse Hanley

Yeah. So it's using Action Cable.

59:57

Aaron Francis

Okay.

59:58

Jesse Hanley

So it's... And, and it's very lightweight code, so I, like, kinda create a connection to Action Cable, and then I use, like, Sideki- Kick effectively to create, like, a background job.

1:00:08

Aaron Francis

Mm-hmm.

1:00:08

Jesse Hanley

And then I stream a partial or some JSON or whatever, um, and then that actually populates. I don't even know why this, like... I feel like this should catch on 'cause it's very efficient.

1:00:20

Aaron Francis

This should catch on.

1:00:20

Jesse Hanley

It's very-

1:00:21

Aaron Francis

This rules. I love this.

1:00:22

Jesse Hanley

Y- yeah. It's very, very handy. Like, and it, it... Again, it takes... Like, for example, let's say an Elastic Cluster goes down. Like-

1:00:28

Aaron Francis

Mm-hmm

1:00:28

Jesse Hanley

... my whole app doesn't break, and I can actually also stream in an error response to say, "Hey, we're struggling at the moment," and have, like, a spinner there. So there, there's o-

1:00:36

Aaron Francis

Uh

1:00:36

Jesse Hanley

... there's other benefits. But especially for those, like, N+1s, N+1s aren't inherently bad, and you, you sometimes can't optimize them away a lot of the time.

1:00:47

Aaron Francis

Mm-hmm.

1:00:47

Jesse Hanley

Or sometimes there's, like, not even any point to optimize them away.

1:00:50

Aaron Francis

Yes.

1:00:50

Jesse Hanley

So you can just load the content a little bit different or think about loading it a little bit different. And, um, I found that to be another calm way to kind of, uh, on the product side to, to make Postgres a little bit easier to work with by just, yeah, streaming stuff through background workers.

1:01:06

Aaron Francis

Just giving it-

1:01:07

Jesse Hanley

Yeah

1:01:07

Aaron Francis

... a little bit of time. I like that.

1:01:09

Jesse Hanley

Yeah.

1:01:09

Aaron Francis

This is-

1:01:10

Jesse Hanley

Yeah, yeah, yeah

1:01:10

Aaron Francis

... this is exceedingly clever. I wanna steal this and bring it to Laravel in some cleverly named package. Hmm.

1:01:16

Jesse Hanley

Yeah. Stream, Stream, Stream Blade. Stream Blade or something like that.

1:01:20

Aaron Francis

Stream Blade.

1:01:21

Jesse Hanley

When you sh-

1:01:21

Aaron Francis

That's a good... You know, we'll workshop it-

1:01:23

Jesse Hanley

Blade Socket

1:01:23

Aaron Francis

... a little bit, but that is a good first, that's a good first step. I like that. No, that's super clever. I didn't realize, um, I didn't realize that that's how you're doing it. I think the, the combination of a WebSocket and offloading it to a background job is wild to me.

1:01:40

Jesse Hanley

'Cause most, um... 'Cause, like, what, what, what I r- very early on before I started using Elastic, th- this was the issue. This is where I actually started doing it. When I, when I was predominantly on Postgres, stuff w- would be occasionally slow. There'd be querying a custom-

1:01:53

Aaron Francis

Sure

1:01:53

Jesse Hanley

... field, and it would be slow. And I hated the, the page would take 30 seconds to load. And, and-

1:01:59

Aaron Francis

Sh-

1:01:59

Jesse Hanley

... Heroku has a 30-second timeout.

1:02:01

Aaron Francis

Yeah.

1:02:01

Jesse Hanley

Heroku has a 30-second timeout, right?

1:02:02

Aaron Francis

And humans have-

1:02:03

Jesse Hanley

Now-

1:02:03

Aaron Francis

... like a four-second timeout. Nobody's waiting around.

1:02:05

Jesse Hanley

Hu- h- humans have much less than four. So, um, and so by re-architecting, I gave myself some grace-

1:02:15

Aaron Francis

Mm-hmm

1:02:15

Jesse Hanley

... and a, a little bit of breathing room, and then I could obviously work out stuff, um, after that, and I obviously restructured and refactored stuff. Um, but yeah, trying to take stuff and responsibility out of the web request, uh, has been very, very, very, very, very, very helpful. Um, yeah, especially when bringing in a lot of data. Well, like, let's say, uh, like a visitor profile page, doing user.events.

1:02:40

Aaron Francis

Right.

1:02:41

Jesse Hanley

Like, even paginating through some of those, some of them have, like, 10K events, and, like, no matter how much I kind of optimize that pagination, it's too... It can be very, very tricky. Um, and yeah, n- not, not optimizing it, it's, like, sometimes okay if that takes, there's a spinner for three seconds, you know?

1:03:00

Aaron Francis

Mm-hmm.

1:03:00

Jesse Hanley

Like, that, that, that's okay and it's not too much stress on the Postgres instance, but having the page take three seconds, nah.

1:03:08

Aaron Francis

Yeah.

1:03:09

Jesse Hanley

So-

1:03:09

Aaron Francis

No, that's no good.

1:03:10

Jesse Hanley

Yeah. I, I, I think my advice on the product side would just be trying to, like, re-architect your product in a way that, like, you know, give yourself some grace, you know? Maybe push stuff off to background jobs, or push stuff-

1:03:20

Aaron Francis

Uh-huh

1:03:20

Jesse Hanley

... off, or just change how you render stuff, um, so it's, it's not so much an issue.

1:03:25

Aaron Francis

Okay, so final question on this because my mind is blown. The- When you... I don't know much about Rails, but so you have this Active Cable-

1:03:34

Jesse Hanley

Yeah

1:03:34

Aaron Francis

... Action Cable, Active Cable?

1:03:35

Jesse Hanley

Action Cable.

1:03:36

Aaron Francis

Action Cable.

1:03:36

Jesse Hanley

Action Cable.

1:03:37

Aaron Francis

So you have this Action Cable concept. Do you hand off some sort of unique, uh, uh, like, Action-

1:03:44

Jesse Hanley

Job ID?

1:03:44

Aaron Francis

... Cable instance ID to the job? Or how does the job know who to phone home to?

1:03:50

Jesse Hanley

Mm-hmm. So, um, so Action Cable creates a connection. I think they call it, like, rooms. So it k- kind of-

1:03:56

Aaron Francis

Okay

1:03:56

Jesse Hanley

... c- creates a connection. There's now a persistent connection from, like, uh, the client to the Action Cable server. So that's-

1:04:05

Aaron Francis

Mm-hmm

1:04:05

Jesse Hanley

... that's unique, and Action Cable keeps a lot of that... Like, it handles all that kind of stuff.

1:04:11

Aaron Francis

Okay.

1:04:12

Jesse Hanley

Then from, from there, I can then, uh, I kind of create, like, a unique job ID o- on the client-

1:04:20

Aaron Francis

Mm-hmm

1:04:20

Jesse Hanley

... side. Um, so it's just, like, a random hex or whatever.

1:04:24

Aaron Francis

Sure.

1:04:25

Jesse Hanley

Uh, and then that creates the job ID. The job then gets processed, and the, the job has knowledge of, like, the job ID and the Action Cable user, and then I stream it back in, and then the, the user gets it to, to populate. This also works really well with, like, AI type stuff because some of those-

1:04:42

Aaron Francis

Mm-hmm

1:04:43

Jesse Hanley

... take a little while. So if I'm-

1:04:44

Aaron Francis

Mm-hmm

1:04:44

Jesse Hanley

... doing, like, a compliance check on an email, it's okay if that takes 20 seconds to load because it's, um, happening in a background job, not a web request.

1:04:52

Aaron Francis

Mm-hmm.

1:04:52

Jesse Hanley

Um, and so that, that's super useful as well. Yeah, so yeah, Action C- connection gets created, job gets enqueued, then job streams down a partial or some JSON to then render, uh, in the app. So yeah. Again, with this theme of making my Postgres calm -

1:05:12

Aaron Francis

Right, yeah

1:05:13

Jesse Hanley

... um, by taking a- all, all, all, all, all this... Like, it, it's all related. It's, it's, it's all related, um, and just taking a lot of the anxiety off me and being able to build super fast apps where the web requests have very low responsibility on the Postgres side.

1:05:26

Aaron Francis

It's funny because it seems like everything has low responsibility. Like, the Postgres has low responsibility, the web request, the background job's just doing a little count. Elastics just, you know, you've got four different elastics. They're all just doing their own little thing. It's like, who's got the responsibility here? It's all little responsibility-

1:05:45

Jesse Hanley

Not me

1:05:46

Aaron Francis

... all the way around. Not you. It's great. I love it.

1:05:50

Jesse Hanley

Yeah, yeah.

1:05:50

Aaron Francis

This is fascinating.

1:05:52

Jesse Hanley

Yeah, so it's, it's-

1:05:53

Aaron Francis

I mean-

1:05:53

Jesse Hanley

... it's different, right? Um, and, and same-

1:05:55

Aaron Francis

It is different

1:05:55

Jesse Hanley

... same with like Redis.

1:05:56

Aaron Francis

Yeah.

1:05:56

Jesse Hanley

Yeah. It's, it's different.

1:05:57

Aaron Francis

Yeah, what does Redis do?

1:05:57

Jesse Hanley

Same with, like, Re- so, so Redis is, like, Action Cable has its own Redis instance. This...

1:06:02

Aaron Francis

Mm.

1:06:03

Jesse Hanley

Someone's probably gonna call me out on how dumb this is, but Action Cable has its own instance. Rails Cache has its own instance. Sidekiq has its own instance. Our rate limiter has its own instance. Now, is that overkill? Yes. Is Redis cheap?

1:06:15

Aaron Francis

Yes.

1:06:15

Jesse Hanley

Not on Heroku, but yes.

1:06:17

Aaron Francis

It's the same price it was 10 years ago.

1:06:19

Jesse Hanley

Same price it was 10 years ago. But, um, but re- relatively it's cheap, right? You know, I'm talking, uh, you know, a couple of customers per Redis instance, uh, means that I at least have that reliability, and I'm moving in the same direction for Postgres. So this has been my theme. My theme is, is that I end up trying to... I start with one, I started with one Elastic instance.

1:06:41

Aaron Francis

Mm.

1:06:41

Jesse Hanley

I started with one Redis instance, and I start kind of breaking them down into much smaller responsibilities, um, and then that makes the problem set a lot easier to solve. I'll probably go-

1:06:52

Aaron Francis

Mm-hmm

1:06:52

Jesse Hanley

... one of the reasons I'll go to single node, like multiple single node instances on Postgres is that'll be step one, and then maybe the emails one becomes gigantic, and then I just have that emails database to deal with then. I can then go, "Hey, you know what? I'm gonna move that to Citus" or-

1:07:09

Aaron Francis

Mm

1:07:09

Jesse Hanley

... "Hey, I'm gonna move that to, to Vitess," because that's a good next step for me. Um, and it just, it, it just makes things a lot easier to manage, right? Whereas if I just have one big monolith of any of these, it's like, oh, oh boy, this is a little bit stressful. If, like, let's say on the Redis side, if I get DDOSed, right?

1:07:29

Aaron Francis

Mm-hmm.

1:07:29

Jesse Hanley

Well, now my Sidekiq's down. That's not great. Um-

1:07:33

Aaron Francis

That's not great

1:07:34

Jesse Hanley

... hmm, no, that's not great. Or now people can't load... Uh, I, I had, I had this one user who left a book on their re- refresh button on their computer.

1:07:47

Aaron Francis

That is some Silicon Valley stuff right there.

1:07:51

Jesse Hanley

Massive account. Massive account, right? Complex Elastic query on the, on the people users page, just like refreshing, right?

1:08:01

Aaron Francis

Just hammering.

1:08:02

Jesse Hanley

And, um, just j- j- just hammering, right? And, um-

1:08:05

Aaron Francis

And they're behind the auth wall. They're inside the castle.

1:08:08

Jesse Hanley

They're, they're inside the castle, right? And so I, I ended up using, uh, Cloudflare to make sure that never happens again. Um, but, uh, dur- during that happened, that, that, that, uh, that backlogged, uh... What did that do? That, that killed my Action Cable Redis instance, which then, which then meant things in the app didn't load, not great, but because Sidekiq was still up and everything else was still up, um, basically no one

1:08:38

could... Like, there was spinners, but our app is like, people do stuff and then they leave, right? And we're sending-

1:08:43

Aaron Francis

Mm-hmm

1:08:43

Jesse Hanley

... emails automatically on their behalf. Everything else continued to run smoothly. Yeah? So, so having things split means the problems that... By the way, when I was doing that, I was like at a Best Buy on the trip to Canada from Japan-

1:08:59

Aaron Francis

Oh, gosh

1:08:59

Jesse Hanley

... with a two-year-old that had just woken up. Yeah. Um, but having all these small things, it's very easy to like, you know, just restart a single instance and all that, so.

1:09:10

Aaron Francis

Mm-hmm.

1:09:10

Jesse Hanley

Yeah, a little bit of a, a tangent, but at least, at least that-

1:09:13

Aaron Francis

No, fantastic story

1:09:13

Jesse Hanley

... that's how I think about it.

1:09:14

Aaron Francis

Great story. We love a good story. So the only, I think the only monolith I'm hearing is your Rails monolith, and you mentioned early on you've got a fast, uh, fast Ruby team working on that.

1:09:26

Jesse Hanley

Yeah, I do.

1:09:26

Aaron Francis

So let's wrap there. What's, what's going on on the Rails monolith side?

1:09:30

Jesse Hanley

Yeah. So, um, on the Rails monolith side, so Rails 7.2 I think, so Rails 7.2, and obviously like Rails 8 and stuff, um, comes jam-packed with really great, uh, stuff for multi-tenant DB. Um, and so I want to get m- my app up to like the latest on, at least on 7.0-

1:09:51

Aaron Francis

Mm

1:09:51

Jesse Hanley

... just so I can pull in a lot of that stuff just to make my life a lot easier.

1:09:55

Aaron Francis

Mm-hmm.

1:09:55

Jesse Hanley

Things like joins across multiple databases, all that kind of like good stuff. Um, and by being on the latest version, it just allows a more seamless transition over. Um, and then once, once that's done, then, uh, we can start, you know, experimenting by rebuilding the world and, uh, seeing how that kind of, you know, seeing how we're gonna orchestrate a lot of that.

1:10:17

Um, but yeah, so Rails, Rails 7 comes with a lot of... And from my understanding, a lot of it's pulled from GitHub, like how GitHub does-

1:10:26

Aaron Francis

Mm

1:10:26

Jesse Hanley

... multi-tenant DB. So I think GitHub has m- multiple databases for all kinds of things, and a lot of Rail 7 is kind of in their philosophy of doing things from, from my, from like what I've, what I've read. Um, and yeah, I'm probably gonna follow that path for, for, for the, the most side of things. Um, so yeah.

1:10:48

Aaron Francis

Wow. So cool.

1:10:50

Jesse Hanley

Thanks, man.

1:10:50

Aaron Francis

This has been a delight. Is there, is there, um... So two things, one, anything else on the technical side that you, we haven't covered that you want to cover?

1:11:01

Jesse Hanley

No. No. I'm, I'm... No. I, I think, I think, I think that, that, that's most of it. My, my like, my, my big kind of, uh, I guess ask for anyone that is trying to like build something is like don't overcomplicate it. You can stay on a single node for like quite a long time. It's very rare that people are storing like as much data as, as we are, and from my understanding and like talking to some of the, um, yeah, like some of the Postgres experts, people are running very large multi, multi, multi, multi-terabyte, uh, single node instances kind of pretty calmly

1:11:32

and well, and a lot of that is like trying to... It's just like how you use the database.

1:11:36

Aaron Francis

Mm-hmm.

1:11:36

Jesse Hanley

So your database can get quite large if you use it in a certain way. And so just trying to work out, all right, like how, how do I wanna use this database? Are there ways that I can use it that are less stressful and are a little bit calmer? And then try and like design your app around that. And a lot of the times when you do take some responsibility off the, the database, I don't know, you sometimes you build better products because of it.

1:11:57

I think Bento is very, very fast. I think it is like quite delightful to use, and a lot of that is because of the decisions I've had to made because of Postgres, um, to try, try to make it like a, a better experience for me, and that's led to a better experience for my users. I don't know if that makes sense, but it make, feels right to me.

1:12:15

Aaron Francis

Yeah. No.

1:12:16

Jesse Hanley

Um-

1:12:16

Aaron Francis

That, that makes perfect sense. Um, okay, so the last thing I want you to say is give us your pitch for Bento, but before we do that, um, you are not out on Twitter doing a lot of like thought leader-y stuff, but you are a-

1:12:31

Jesse Hanley

Mm-hmm

1:12:31

Aaron Francis

... one person bootstrap company, profitable, calm. So give us your... G- give me, give me your pitch to the aspiring, the, the young Jesse Hanley, the person that wants to be in your position, running a software company without losing their mind, without having to raise VC if they don't want to.

1:12:52

How, how would you encourage the next generation of, of aspiring, uh, builders?

1:12:58

Jesse Hanley

That's a big responsibility. Um, okay. So like I think, I think something that has been true to me, and I actually mentioned this to like another guy on, on a demo call who asked me, like my advice is like you got to stay true to, you know like when you start out, you've kind of got those like rose-tinted goggles of like how a startup should be and how a company should be. You know, you follow Basecamp and all that.

1:13:20

Aaron Francis

Mm-hmm.

1:13:21

Jesse Hanley

You have to stay true to that, and sometimes that sucks, and sometimes it's actually not too much fun. It's not fun. Bootstrap is not really that fun. You gotta like take money- ... from your own pools of cash. Um, sometimes you gotta pay yourself not that much for a while.

1:13:35

Aaron Francis

Yeah.

1:13:35

Jesse Hanley

Um, it takes a really long time. Um, like I'm seeing, I'm seeing one of our competitors that has, uh, a bug as their logo. You know, they're, they're multiple times larger than us- Um, but I, I don't think they're profitable, and it sounds really-

1:13:51

Aaron Francis

Mm-hmm

1:13:51

Jesse Hanley

... stressful in there, right? And I'm like, "Well, I could potentially be like that. I could raise some money." Um-

1:13:57

Aaron Francis

Mm-hmm

1:13:57

Jesse Hanley

... but I, I don't want to. Like, I love living in Japan. I have a two-year-old daughter who I absolutely adore. I've been able to be home for all of this time. Um, I love my wife to bits. I'm able to go get lunch with her whenever I want.

1:14:09

Aaron Francis

Mm-hmm.

1:14:09

Jesse Hanley

I can chill. Like, it's, it's just... It's a good lifestyle. But I've stayed committed to what I wanted, and I've been okay with the trade-offs of what, what that's entailed, right? Like, I've been, I've been okay with not growing that fast. I've been ocr- okay with taking things slow. Um, and it's turned out o- it's, it's turned out fine for me. So I think, like, if you have rose-tinted goggles of, like, the business that you wanna build, try not to make compromises.

1:14:34

Be, like, super patient with it. Um, listen. Work obviously very, very hard. I've worked very hard on this business. Very, very hard.

1:14:41

Aaron Francis

Mm-hmm.

1:14:41

Jesse Hanley

Every day I work on it, and, uh, and it's paid off. It's paid off for me. And so I think-

1:14:47

Aaron Francis

Mm-hmm

1:14:47

Jesse Hanley

... hard work, staying committed to your ideals, t- s- most often figures itself out if you kinda stay in the game long enough. That... Maybe that's the, the one caveat I wanna put. If you stay in the game long enough, you'll hopefully figure it out. Uh, otherwise, maybe try something else. Maybe give it a go for six years and, and haven't found product market fit. May- may- maybe you should try something else.

1:15:08

But, um-

1:15:08

Aaron Francis

Yeah. Maybe pivot a little bit. Yeah.

1:15:10

Jesse Hanley

Yeah.

1:15:11

Aaron Francis

I like that.

1:15:11

Jesse Hanley

But-

1:15:11

Aaron Francis

That's a great answer. I, I put you on the spot there. That's a great answer.

1:15:15

Jesse Hanley

Thanks, man.

1:15:15

Aaron Francis

I know that, uh, I know that you wanna lead a quiet life and work with your hands, but we could use more people like you being vocal on Twitter. But I won't, I won't put-

1:15:22

Jesse Hanley

Ah

1:15:22

Aaron Francis

... that on you. That's, that's a lot.

1:15:24

Jesse Hanley

But, but, but, but, but, but-

1:15:25

Aaron Francis

You don't wanna wade into those waters.

1:15:27

Jesse Hanley

Yeah, I mean, like, slight, slight tangent. Th- part of not... I, like, I don't wanna be a thought leader and, like, I don't actually wanna attract too many customers. Like, this-

1:15:35

Aaron Francis

Hm

1:15:35

Jesse Hanley

... this is a weird, this is a weird thing. I don't wanna attract too many customers. Like, I, I love that you're a customer. I love that some of your friends are customers. I love that, like, a lot more of our friends are trying Bento out-

1:15:46

Aaron Francis

Mm-hmm

1:15:46

Jesse Hanley

... and, and using that, and the company is profitable. And, like, frankly, like, I, I think I mentioned on, on the preamble before we, like, kinda went into this, my rent's, like, under 1,500 a month, including utilities and stuff. I live in Japan. Food here is, like, I can have an amazing, like, teishoku meal for, like, 5 to $7. I don't-

1:16:06

Aaron Francis

Psh

1:16:06

Jesse Hanley

... I don't really need to, I don't really need too much more money. Uh, uh, our daycare's $4 an hour. We were talking about daycare before this. Um, you know? How much more money do I need?

1:16:16

Aaron Francis

Love it.

1:16:16

Jesse Hanley

So, like, but-

1:16:17

Aaron Francis

A bunch of people just cursed at you, just screamed out loud at you- ... for that one.

1:16:22

Jesse Hanley

Yeah. So it's like, after I paid myself, like, what I was earning, uh, when I was running the agency-

1:16:28

Aaron Francis

Mm-hmm

1:16:29

Jesse Hanley

... I, I don't, I don't really need too much more than that. So, um, yeah. But it, it did take... It took, it took... I've got it in, uh, the footer of our website. It took, right, to get to this point, six years and 251 days.

1:16:45

Aaron Francis

Oh, wow.

1:16:45

Jesse Hanley

So-

1:16:45

Aaron Francis

We're almost at seven. Almost.

1:16:48

Jesse Hanley

Yeah. Al- almost at seven.

1:16:49

Aaron Francis

That is wild.

1:16:49

Jesse Hanley

So it just, it just takes a really long time.

1:16:52

Aaron Francis

Well, you are, uh, you're doing an incredibly good job, and if you're not-

1:16:56

Jesse Hanley

Thank you

1:16:57

Aaron Francis

... you should be proud of yourself, um, because this is, this is very inspiring for me. So tell us, uh, I know you don't want-

1:17:03

Jesse Hanley

Thanks, Aaron

1:17:04

Aaron Francis

... too many more customers. But tell us, uh-

1:17:07

Jesse Hanley

I'll take 'em

1:17:07

Aaron Francis

... why people, why people should at least consider Bento.

1:17:12

Jesse Hanley

Yeah. So, um, Bento is very good at a couple of things. We're very good at sending marketing email. We send all your newsletters and all that kind of stuff.

1:17:19

Aaron Francis

Mm-hmm.

1:17:19

Jesse Hanley

We're very good at sending automated email. So if someone signs up to Aaron's, uh, wait list, you say, "Hello, I'm Aaron. You're on my wait list." We're very good at that. We're also very good at a couple of other things in that automation area. Um, and then now we're getting ver- we're getting better at sending transactional email.

1:17:36

Aaron Francis

Mm-hmm.

1:17:37

Jesse Hanley

So in the last two weeks, we've actually... You know how you hacked on that Mailer for Laravel?

1:17:43

Aaron Francis

Mm-hmm. Mm-hmm.

1:17:43

Jesse Hanley

We now have an official Laravel SDK-

1:17:46

Aaron Francis

Hey, look at that

1:17:46

Jesse Hanley

... with that baked, with that baked in. You can now say, like, whatever it is. You can do the Mailer Bento thing and the transport-

1:17:53

Aaron Francis

Uh-huh

1:17:53

Jesse Hanley

... that's what, that's what it is, right? Yeah.

1:17:54

Aaron Francis

Yeah.

1:17:54

Jesse Hanley

You can do the transport Bento-

1:17:56

Aaron Francis

Yep. Yep

1:17:56

Jesse Hanley

... and it all just works.

1:17:57

Aaron Francis

Amazing.

1:17:58

Jesse Hanley

And then we've got all these nice Laravel methods. We shipped a Python library. We shipped a, a new Rails library, shipped a Swift library for funsies. We shipped- We're gonna do a Unity library, so we can serve video game developers.

1:18:11

Aaron Francis

Why?

1:18:12

Jesse Hanley

I don't know. It's just fun. Um, there was a, there's a guy, there's a guy in, uh, called Zach. I actually wanna give him a little bit of a shout-out. There's a guy in Zach, uh, called Zach, uh, who lives in Dazaifu, which is some neighborhoods away. He signed up to Bento as a customer, made us the Laravel SDK, and has just kept hacking. He doesn't stop.

1:18:32

Aaron Francis

He just kept going.

1:18:32

Jesse Hanley

He's a mad- he's a mad man. He's like, "I, I built a Swift library for funsies." Now we've got a Swift library. So, um, Zach's been, Zach's been a machine. I, uh, yeah-

1:18:41

Aaron Francis

Amazing

1:18:41

Jesse Hanley

... I just wanna give a public shout-out. So-

1:18:43

Aaron Francis

Good job, Zach

1:18:44

Jesse Hanley

... so... Yeah. He's, he's, he's been a, he's... I, I am paying him for his work, but he's just... He, he was, like, a customer that wanted to, like, just help out for fun. Um, and so yeah, he's... Been paying him to build these libraries, and so we've got SDKs coming out the wazoo. So, uh-

1:19:00

Aaron Francis

I love it

1:19:00

Jesse Hanley

... that, that's been, that's been good. So for most, for most things, people, you know, Next.js and all that stuff-

1:19:06

Aaron Francis

Mm-hmm

1:19:06

Jesse Hanley

... um, most frameworks people are building on that are watching this are dealing with databases. Uh, Bento's got very easy ways now, and much better docs, to get started-

1:19:14

Aaron Francis

Nice

1:19:14

Jesse Hanley

... to send marketing and transactional email. So that's the pitch.

1:19:18

Aaron Francis

Yep. And I, I cosign that. I use you for marketing and transactional, so we do all of our password resets through Bento. Obviously, we send all of our, uh, SQLite, Postgres, aaronfrinst.com, screencasting.com, all of those go through Bento. And just, I think yesterday or the day before, uh, I was DM'ing you about pulling down tags from the API.

1:19:40

I use your API for everything. I'm pulling down, syncing down all the tags, so I know locally when somebody, like somebody from SQLite signs up for Mastering Postgres, I can look and see, like, what tags do you have? All right. Let's, let's do a sync job to make sure you have all the right tags in Bento, and then I can keep them locally. It's great. I love it. I love it. It's great. Great product.

1:20:00

Jesse Hanley

Thanks for saying that. And thanks for being a customer.

1:20:02

Aaron Francis

Yeah.

1:20:02

Jesse Hanley

It like puts food on the table-

1:20:03

Aaron Francis

Of course

1:20:03

Jesse Hanley

... for my family, so I appreciate it. Thank you.

1:20:05

Aaron Francis

Of course, yeah. Well, um, thank you for doing this. Uh, I know that, uh, I know we've been trying to do this, but Japan and Texas are not lined up, uh, on time zones quite as easily, so I'm glad we finally got to make this work. This has been a delight.

1:20:19

Jesse Hanley

Same.

1:20:19

Aaron Francis

Thank you. Uh, thanks for giving us all of your knowledge. And where can, where can people find you online?

1:20:26

Jesse Hanley

Uh, on Twitter I've got bento, @bento the handle. Um, and so that's that. And then I think I've tagged, my ego's tagged myself in the bio, so you can type in my name. It's Jesse T. Hanley. You can cl-

1:20:39

Aaron Francis

Perfect

1:20:39

Jesse Hanley

... click through there, but it's a lot easier to remember, @bento on Twitter. Um-

1:20:42

Aaron Francis

Perfect

1:20:42

Jesse Hanley

... and then yeah, and then bentonow.com to start a trial. I don't know.

1:20:47

Aaron Francis

Okay. Giving 'em the hard close, Jesse.

1:20:53

Jesse Hanley

You can talk to me. This way, um, may, maybe, maybe like a, maybe like a GIF. If anyone wants to like just chat about stuff, um, or chat about like database stuff, there's a, there is a demo link. Just tell me that you, you don't wanna be sold, and, and I'm, I'm happy to chat about database stuff. I'm happy to talk about scaling Rails. I'm happy to talk about anything that like we've covered in here, even just as like a friend.

1:21:15

'Cause building apps is hard, building apps is stressful, and it's a lot easier when you know there's approachable people out there to talk to. And so open invite for anyone to click the demo link and just tell me ahead, "Hey, this isn't about Bento. I just wanna talk about Rails," and I'll happily talk to anyone for 30 minutes about whatever problem they've got. So yeah, there's a-

1:21:32

Aaron Francis

Awesome

1:21:32

Jesse Hanley

... if anyone wants it.

1:21:33

Aaron Francis

So ge- yeah, so generous. Thank you. All right, y'all. Well, um, if you liked this episode, please either I guess subscribe on YouTube, uh, Aaron D. Francis, or there is an RSS feed somewhere. Uh, it's in the show notes, so go down there and find that, and I'll put links to everything Jesse, uh, does and has mentioned in the show notes. And until next time, we'll see you later.

1:21:56

Jesse Hanley

Bye.

Career & craft

More videos on career and craft

All videos

Get the next one by email

I’ll send you some more. Not too many.

Join 7,500+ other readers.

Read past issues