Skip to main content
View on YouTube to comment and like!

over 2 years ago Syntax Podcast

Cloudflare Analytics Engine, Workers + more with Ben Vinegar

Ben Vinegar

Ben Vinegar Guest

Wes Bos

Wes Bos Host

Scott Tolinski

Scott Tolinski Host

Topic 0 34:06

Ben manages Syntax, facilitates goals and growth while maintaining creative independence

Guest 1

I have a lot of anxiety about being on this podcast, but first but I have no I have no anxiety about And, you know, sometimes I maybe could see that perspective because maybe there are a bunch of reasons why they feel that they need to meddle with it. It's like, just let them cook. I don't know. Yes.

Guest 1

You know, that's what I would be doing with with with with software people. And I think that that idea, I don't find is too different from what you all do. So that's why I have very little to say about sometimes And everyone's kinda pointing fingers at each other.

Guest 1

but, you know, as much as possible, try to figure out what what people are interested in and try to find a great fit for them. And then but not really get And I I didn't wanna use Google Analytics

Guest 1

gee, what has that been? I mean, I think You don't wanna have to, you know, have an endpoint that handles data. Node you Scott query a database. You just wanna write it and then So wait. Quick answer is you gotta write your own stuff. You gotta it it's sort of like a free form object store for you to store data that you want. Mhmm. So counter scale JS, like, the script is basically pulling browser device, analytics engine also gives you you get a 100,000 rights as well per month on the free plan.

Scott Tolinski

yeah, I I would never put that together, but yeah.

Wes Bos

Because we are going to react Miami, and we wanna have a bunch of beer for people. You know? Like, there's just, like,

Scott Tolinski

I think that was the biggest thing for us.

Guest 1

So I think, you know, to get into, but, you know, it doesn't have to go through every row of the database. It just has to go through the unique values of that of that column. This is a real deep dive into this right away, and I hope I'm not butchering this whole ESLint. No. It's super interesting. Yeah. We first heard about ClickHouse when we heard that Century was using ClickHouse. And that was the 1st time they crossed my my radar in general.

Guest 1

It doesn't always work out perfectly that way in engineering,

Scott Tolinski

You join a you join an established media product.

Scott Tolinski

a restaurant here, and Wes and I are cooking up. And now we we Scott another chef in. We got a, you know, expediter in. We got all the, we got all the parts ESLint, and you're the Node ordering up the the food and making sure we have what we Node. And yeah. Yeah. Like,

Wes Bos

I I order ice for a bunch of guys to talk about JavaScript. Yeah. Yeah.

Guest 1

You know, it's been a lot of fun. So I think, you know I don't know. I know there's a great there's a personal answer for me is that I've I've personally really enjoyed just kind of learning new skills just as I think many software developers

Guest 1

getting everybody aligned on ideally on, like, what they wanna do. K? It just kinda works. That's the cool thing about it. You know? You just kinda blast it with data, podcasts and YouTube and that kind of stuff, hey, that's learning too. At least it is for me, and I I enjoy, okay. This is the the most basic query,

Wes Bos

the the the infrastructure, the the taxes, the, like, the time, all of that stuff. Right? And so, like, Ben will tackle

Guest 1

I'm on trying to avoid going, like, crazy deep on this. I think that, you know, my experience as a as a software manager and as a senior

Wes Bos

at React Miami and have on sites and and plan Wow. And Yeah. And, like, you what kind of events

Scott Tolinski

But we tried our best. Yeah. That fulfillment software stuff was a wild task, and and I think Wes and I SMART goals or whatever a tamer in in house, and and Ben kinda showed up and whipped us into shape. And it ever since Ben has showed up, it it feels like the amount of progress we've made as a team has

Wes Bos

Yeah. Mhmm. Right?

Wes Bos

can not not to say that Ben is, like, just doing our

Scott Tolinski

What did you do to not mess up the vibes?

Scott Tolinski

That's a good point. And and

Guest 1

in the way. You know? I it's kinda strange because I I wrote a book on JavaScript, so I, you know, I I certainly have opinions on, I kinda relaunched my my my personal website, which is no. I'm not gonna plug that. We'll see. Yeah. Let's what is it? Benz.ca.

Scott Tolinski

Yeah. No. I I think that that initial getting us into a room and talking about, you know, actual

Wes Bos

do fun stuff, like have merch and and have beer at,

Guest 1

century and syntax. And I think it's worth talking about that because we you talk about on the show, but probably never heard it from someone like me that's, like, you know, we we run syntax pretty independently. Wes and Scott and the team run, you know, content and figure out what they wanna talk about, what they wanna write about. And I think that, you know, going back to my Node, my role is to sort of empower you guys, these guys. I'm like, who am I talking to here? You know, to just kind of achieve what they wanna do. So, And there JS no way in hell that I wanna learn how to run Kafka or how to run all this complicated infrastructure. Yeah. You know? and I happen to know that I've that I I personally as a developer have put browser name

Wes Bos

stuff like that is

Wes Bos

make it so that we can we can do more. You know? Like Yeah. The effect. Merch is a good example. Right? Like, we never had syntax merch, not because we didn't And I'm just looking at the docs for ClickHouse here, and it looks like there it doesn't make sense to me. Like like, the the schema itself. Like, let's say you wanna track

Guest 1

You know? Yeah. So there's there's certainly some differences. I wanna be I wanna be clear.

Guest 1

The way I think about it is on shoving column names in there to make the code string

Guest 1

Mhmm. Yeah. I forgot about the store. That's 1. Yeah. Yeah. You know, thank you to all the people who bought from the store, by the way. And if I

Scott Tolinski

you know, one thing that I think we've all been very

Wes Bos

fulfillment provider, which which we just did, you know,

Guest 1

I feel like this is like the trope movie thing that you've that we've all seen a 100 times. This just feels like you've seen this situation depicted many times where into look. My website gets, like, you know, optimizing some code.

Guest 1

my title is general manager. So, technically,

Guest 1

Okay. My bad.

Guest 1

talking about what we want to do and then and then working backwards like what would we need to,

Guest 1

it it it's kind of the job. Right? The technology is always changing.

Wes Bos

these things so that we can

Scott Tolinski

Yeah. For us, even though you didn't come to us and say, hey. We need SMART goals.

Scott Tolinski

on your end and on centuries end in general is that there's been a a distinct do not mess up the vibes angle for from everyone. You Node, we all know what could happen if the vibes are off or or or if, you know, corporate overlords do come in and and kind of ruin what's going on. But I think that has been a focus of century from the Scott, and, specifically, Ben has always been, I do not want to mess up the vibes. And, I think you've done a really awesome job with that. So, you know, hopefully, the audience feels the same way that the goal here is just to take what we are doing and

Wes Bos

Ben does the stuff we don't want to do, but, like, it's a lot of, like, bigger picture stuff of trying to organize and figure out how to tackle

Scott Tolinski

No. No. I think that Just Let them Cook describes it all. I mean, if we if we go back to our tried and true Wes of, method of using food metaphors for everything, you are basically the general manager of, of a restaurant here, and

Guest 1

would. You know? So with you all. Like, I'm I'm really the student here to be frank, and to level up my CSS as I've as I've commented earlier.

Guest 1

look. I think the software developers love learning. I Think there's something

Wes Bos

an order like that, and he does everything from, like, figuring out how much,

Scott Tolinski

very quickly handling trying to handle all that stuff on on top of doing the show. Personally, though, for you, how does it feel like going from a software project to a media project? Like, what what how different is that? That is a very good question and probably one that I get all the time when I explain to people what my job is, which usually takes, like, 10 minutes,

Guest 1

is you know, sort of sample that data and they don't have to store every single data point. I'm getting a little deep here. I'm sorry. Oh, yeah. It's interesting. Yeah. The the sampling, we talked to Armin from Sanity on it, and we're just like, how But analytics ESLint, actually, just like the schema JS sort of

Guest 1

you know, how many spaces those challenges, the system is gonna throw out some numbers or it's gonna make estimates is how I would kind of simplify it. But everything does that. Google Analytics is not storing every data point of every visitor that ever visited your website.

Guest 1

at at parties and so on.

Guest 1

You know, I'm trying to set the stage for listeners here, but it was like you know getting into a room

Wes Bos

want to, but we just never had the

Wes Bos

more YouTube stuff. And, yeah, so Yarn, it's working out really well.

Scott Tolinski

tangible

Scott Tolinski

even just you expressing all of that made me realize how similar that is because that is all all you're doing with us in a a very positive way. So do it better and and scale it up and be more efficient.

Wes Bos

talking through how much should a T shirt Scott. You know? What are our costs here? Do we need to go to a different, Given these caveats, work within those boundaries, and you will have a good day.

Scott Tolinski

appreciative

Wes Bos

like Ben was searching, how much does ice cost right before this call. Yeah. You know?

Guest 1

was Gee, I don't know. Wes this an analytics engine or is this no. This is just on ClickHouse's engine or ClickHouse.

Scott Tolinski

But it it was more or less like, you know, what what can this be and where can we get?

Scott Tolinski

But,

Guest 1

and into an on-site, and really just talking about, like, what do we want this to be in a year? which is what this worker stuff is built on And not too different. Yeah. I mean, there's a lot of you know, strangely,

Scott Tolinski

I don't know. Nice. Oh, one last1.

Guest 1

finding really great people, and then

Guest 1

emailed you and told told you that sometimes the shirt was laid, I'm sorry about that. I'm sorry.

Guest 1

I swear Wes didn't ruin it.

Guest 1

I've learned so much working, this is the like, I have not really used this very much. I'm more this is a really tricky thing where it's sort of, like, I I guess I sort of managed a team that's worked with it, but that doesn't mean that I know, you know, it's API or or exactly

Scott Tolinski

You had to download TikTok.

Guest 1

you know, I I I like to describe myself as the as the corporate wrangler. The the sort of go between, double columns you can use, and that's it. There are a bunch of limitations on this database that are like, you know, even an individual 30 visits a month. Yeah. Right? Okay.

Guest 1

blasting open source code.

Topic 1 27:58

Cloudflare owns infrastructure, uses v8 isolates, different strategy and goals than AWS/Azure/GCP

Wes Bos

it will do it all. It will do it all really fast, really cheaply,

Wes Bos

Hano is trying to be because Hano was just a like, an express alternative that works on everything. Right? Like, it's just Wes, response, fetch. And then, like, what I found myself being like is, like, I would start something in Deno, and then I go, you know what? I need, like, I need a UI, and then I would just move to Next. Js or move to Remix or something like that. And I think that they they don't want people jumping off there because now you can run

Wes Bos

Next. Js and React stuff, all running on Cloudflare with a d one SQLite database.

Wes Bos

server components,

Wes Bos

it times out. You know? Oh, I need a long run database connection. I need WebSockets. Like, they're trying to they fixed the database connection thing. They fixed the the WebSocket thing. You know? They're they're fixing a lot of that stuff, and I post anything on Twitter about video editing, there's everybody's JS tuning in. Like, a good chunk of developers

Guest 1

a and a mission to see if it was possible, and I was willing to sort of put up with those like, a fire and forget system would look like. Like, could you just press a button and deploy this kind of software stack?

Wes Bos

a lot of people, like, oh, I'm gonna host it on Cloudflare, and then you hit the one of the blockers, you're like, oh,

Guest 1

v eight isolates, row I think can only be 5,000 characters. So it has a whole bunch of wacky limitations that you have to be aware of. But if you if the software that you're writing

Scott Tolinski

Cloudflare.

Guest 1

they're not built on AWS or Azure or Google, like, they are their their own kinda cloud provider.

Wes Bos

but it still is not exactly where it needs to be. Yeah. I posted on pages specifically,

Wes Bos

you know, just to just to make this happen. That makes sense. Yeah. Yeah. It's it's always interesting, the the Cloudflare stuff. I find like, I've I've launched

Guest 1

most people who've worked with, like, Lambda's or or GCP's, I had to. Yeah. I do think that Node thing, working with you all that is and and working in, I guess, more media is

Wes Bos

their their Next. Js.

Guest 1

sort of quicker to run. And it also has, like, different performance characteristics, like, you know, spinning up a a serverless worker is really fast. And I That's what they put on their docs. As far as I understand,

Guest 1

You know, one is that select But I'm trying to it's, onto your onto your camera output so that you can just kinda like go into Zoom calls and and Google Meet,

Guest 1

So that's one. Another reason is that they've developed this kinda unique technology, Hey, guys. This is weird. We were we were just in a Slack channel together, and now we're recording this.

Wes Bos

I probably have, like, 4

Wes Bos

to slowly get away from that because

Wes Bos

they they replicated all most of the React hooks, and they replicated, like, state management and all of that good stuff in Hano. So, like, maybe Hano JS gonna be

Wes Bos

that I use daily running in Cloudflare. And On workers or what? and process that much data at once? You know? Like, it's just it's a fire hose of data. And I thought it was really interesting how he explained how they're using queues and,

Guest 1

they actually manage their own infrastructure, by which I mean the hardware. Right? So they're not

Wes Bos

On workers and pages. So my last Node was I your Century is putting a script on, like, half of the Internet.

Wes Bos

front end support, which is like Yeah. I think it's there.

Wes Bos

got Next. Js

Wes Bos

It wasn't without its, like, hiccups. Like, I I went into the Discord probably 6 times over building the entire thing. And that seems to be the the thing with Cloudflare is that

Wes Bos

and there's that seems to be extremely cheap. I mean, you went off and and built this thing that seems to have have caught on. So do you wanna give a rundown on what that is? the analytics engine?

Guest 1

which they they're switching over to Vite now.

Wes Bos

Did did they acquire Hano JS? What what was the situation there? They hired the, like, lead dev behind Hano Wes. And then a couple months later, Hana rolled out, like, and and see that type of thing as well where it's not just become a,

Scott Tolinski

but I've always had just a,

Scott Tolinski

a fair enough easy experience with adapter patterns. Right? You just push it live. I I think I I wonder a lot about that Hano JS since

Wes Bos

often some gotchas. Like, you often have to think about it from the start of, like, how am I gonna approach this in the Cloudflare way? And I think they're trying

Wes Bos

app router, like, all the brand new

Topic 2 43:02

Syntax success is judged by reach/listeners, not hard metrics; goal is lightly sprinkle Sanity

Scott Tolinski

wild ride here.

Guest 1

even anything from upgrading, like, a really gnarly dependency to,

Scott Tolinski

internally

Guest 1

We need the syntax you know how there's the epic stack? We should have the syntax stack, and that also includes, you know, all the video and audio, you know, descriptions, tools.

Wes Bos

that's part of communicating well is getting your your tech set up. Alright? And, like, I'm I'm imagining it allow you to share stuff right over your webcam so you don't have to do the whole, can everybody see my screen?

Guest 1

the success is really syntax's success. Right? If we're you know, it's not really

Wes Bos

fixing bugs or a podcast about,

Guest 1

And so I think that that's is telling me a different number than this system? and then and then people kinda meddle with it. Right? per day.

Wes Bos

like, I often think about how hilarious it JS. That's the stuff you do in a single day of, like,

Wes Bos

Ben, do you got a sick pick for us? Okay.

Scott Tolinski

I I know a lot of people might be wondering about, like, Beautiful. Scott and West's

Scott Tolinski

Synstack.

Scott Tolinski

Yeah. We have Caitlin rocking the newsletter and, Someone please correct me if I'm wrong. No. They aren't. That's true. That's all accurate. Everybody's becoming a Vite app these days.

Wes Bos

get a half decent microphone and camera

Scott Tolinski

is is all about

Guest 1

Counter scale? Yeah. That's an easy one. I, And if somehow you showed up on the top of Reddit tomorrow, I don't think the DX of Cloudflare, you know, is as good as Vercel. Mhmm. Just, you know Not even close. Yeah. Yeah. Yeah. And and I I do think that there have been painful parts of of working on this. Like, the stack traces that I get out of the out of the workers are pretty painful, to be honest. Mhmm. And I've kinda dorked around with trying to get source maps working the way that I want. Counter scales also built in remix. That's another random thing. I'd never done that before. So I didn't have a lot of familiarity with that stack, and it's got its own it's got its own little server as well as I understand, or it had its own kind of build tool, And then I think the third thing is they can have a set they might have a completely different strategy of being, like, super cheap for hobbyist, you know. Yeah. A lot of people say enterprise is paying for it. Yeah. I have no insight into that to be clear. Like, that could be true. That could be false. I'm just I wanna be clear here. We're not in a in a in a complete love fest for this for this infrastructure.

Wes Bos

a podcast about or is there, like, dozens of them that are available? I don't even know if you know this, but, like, I see there's 4 different geolocation

Guest 1

and you can have your title on there. You can have a logo or you can add some filters. Right? It's sort of Cool. Yeah. It's like a like, having, like, a Snapchat

Wes Bos

and describing columnar databases, like I just said, ordering ice, So maybe scalable web analytics, all the way to just

Wes Bos

All of the stuff. Yeah. The syntax stack. It's true. Honestly, I I was thinking that we should do, like, have Randy on at some point and just talk video editing because anytime

Scott Tolinski

Being invited onto a podcast an hour before Oh, yeah. Wes recorded it. Yeah.

Guest 1

it's a virtual camera that lets you just sort of put professional overlays stopped using Google Analytics. We've stopped, right. So this is often why you'll see how do you actually know how many people have visited your website? in a in just a fire and forget kind of way. And I think that analytics engine is Here's another one to you know, how do you pronounce this? You know, column store database.

Guest 1

is is what they're going for. I happen to have a a beta version. I got an early access, and I was playing around with it with CJ actually those details.

Wes Bos

tracking what's going on with your website because it's Mhmm. Like, there's so many

Guest 1

and I really wanna preamble this. Like, this is this is really like a personal project that that that is not an early moment for us website provider and I wanted my own thing that I could drop on my page. Yeah. You don't wanna be, is that the data is stored

Scott Tolinski

you have a wild idea. How do you quickly

Guest 1

you know, have a great show and to have great education about Right? Yeah.

Wes Bos

and then trying to understand

Guest 1

and, you know, lightly sprinkle some century on there, which which we do during the intro.

Guest 1

I was just thinking of this one because we warp talking we were talking about the syntax stack, and we're talking about Randy and and production. And I think it would be fun to even have Randy talk about get people to match them with their interest as much as possible, like, does that sound like software engineering, or does it sound like just sort of general, you know, working with teams? I think it's more of the the latter.

Guest 1

I think something that I left out of that is, you know, not only did I just kinda wanna make this for my website, but I think in working with you all and wanting to, columnar.

Guest 1

people or the product people who work on those things. They often talk about it still.

Wes Bos

You heard it here.

Wes Bos

Beautiful. And a shameless plug. What do you got for us? hover over top of navigation items and time spent on page, things like that?

Guest 1

So a lot of things I would do with software teams is

Scott Tolinski

Warp.

Wes Bos

also make videos, you know, and and they're always interested in what the editing stack and the process looks for that. And that's just one little part of the syntax stack.

Guest 1

is really important.

Scott Tolinski

syntax

Wes Bos

companies bringing on a a piece of media and just absolutely ruining it. And I've been really happy with how everything's gone so far because we we've get to do more things rather than than less things.

Guest 1

So that's my sick pick. Awesome.

Scott Tolinski

explore that idea? And that's, like, very much the feel of, like, what we're trying to do around here. So love that. You Node, beyond just managing the team, you're diving into

Wes Bos

I think it's pretty wild that you can

Guest 1

See you guys. See you see you on

Wes Bos

sorry. My Internet is crappy. Like, figure it out. Like, you know, like, that's part of your job is communicating with people

Scott Tolinski

How do you sell

Wes Bos

Or worse things. They get to be better. Yes. Yes. True. Yeah. Yeah. Like, we have a full time producer now. You know? We have YouTube, which is something that we we just launched. You know? We have CJ who's able to,

Wes Bos

You know?

Wes Bos

create supplementary content and throw up stuff on video. So it's been all all good in my opinion.

Guest 1

here in Toronto. Getboom.app.

Guest 1

some super deep thing. I I, hey. Well, let's let's hire a producer. You know? What does that look like? Yeah.

Wes Bos

to touch upon everything.

Scott Tolinski

it's coming out very soon. It's out by the time you listen to this, I think,

Wes Bos

and stop the whole,

Wes Bos

we were saying on the episode that came out last week of, like, how to level up at your job, And, like, one of them was, like,

Wes Bos

What a wild stack to

Wes Bos

all the media outlets that are

Wes Bos

SynStack.

Scott Tolinski

income from products? would have been very overwhelmed heard the heard the podcasters.

Guest 1

on the topic of this sort of stack and and audio production, like, you know, Randy's talked about, you know, $50 microphones that are really great. You know? Like, there there are tools out there that could kinda like raise your professional acumen, Look, this podcast is brought to you by Sanity.

Guest 1

Yeah. That's a super good question. And I think even maybe a chance to, you know, offer some transparency on that. Right? I think that one thing that I learned from being a senior software

Guest 1

marketing leads or, you know, hard numbers that we're trying to hit.

Scott Tolinski

Node of the episodes, I think, that's coming out,

Guest 1

blouses, etcetera. Right? Now mostly a lot of people are working remotely from their homes. And equivalent thing. GCP functions

Wes Bos

are out there, which is

Wes Bos

Awesome. Thanks so much for coming on, Ben. Appreciate it, and we will catch you later.

Wes Bos

and get it dialed in because I don't know if you I if you call them production apps, but for real things

Guest 1

engineering manager is internal storytelling

Guest 1

what's going on in our industry for developers, like, as a general manager, I feel I feel the need to, you know, invest my time and to work with new tools and just try to reactivate myself into what's going on. And I think that that was a little bit, you know, a small driver and working on that project. So I do wanna kinda add that. Yeah. Absolutely. And I think that's I mean, it's very fitting with what we're kind of about here.

Guest 1

and that's kind of event based system or or who Node. Right? Turns out Vercel solutions are commercial paid offerings, Right? It's not effective for that. It's not effective for them to do that. I also think this is why I'm sure you I'm sure you guys have encountered this. You ever have a situation where you have a bunch of sort of, like,

Scott Tolinski

what we're doing in those regards. But also you're making videos, you learn video editing, you learned the social media platforms we're pushing out to. It's like, I think that all all really, really helps.

Scott Tolinski

you sell what we do here to a company that has very real,

Guest 1

you know, I designed it for for my 30th Then I could say, you know,

Guest 1

earlier earlier this week. I think it's pretty neat. So that's that that's my sick pick. Little weird because it's not you know, might be out by the time this this launches, but,

Wes Bos

building,

Scott Tolinski

Yeah.

Wes Bos

so many sad stories of

Guest 1

We started with this talk about couple decades ago, you have to buy nice suits to to go into the office or or nice wardrobe, So yeah. I think I just kinda looked at this as like, what would be the system Analytics Engine.

Scott Tolinski

to Century?

Wes Bos

Yep. Alright. Let's move into the last section of the show, which is sick picks and shameless plugs.

Wes Bos

Yeah. And I I think, hopefully, people appreciate

Wes Bos

take it in so many different areas. And that's also what makes this job so exciting for me as well, being able

Scott Tolinski

is it clicks? You're tracking clicks? Like, how do you how do You Node, Syntax,

Guest 1

that's it's very similar to what we do. Right? Our goal is really just to to grow the reach of the podcast, microphones and stuff. Right? Like Yeah. Look, here's a little preamble to the to the sick pics, but

Topic 3 14:04

Counter scale uses Cloudflare Workers and Analytics Engine to build cheap, scalable web analytics

Guest 1

at high throughput, Yep. You know, so I while building this, like, I was getting some pretty gnarly stack traces, and debugging stuff was hard. Just wanna be clear. Right? Yeah. But I think, you know, for me, I think in Node ways, this was a little bit of a an exercise and a and And then I think the 4th thing I would add is this, is that I just

Scott Tolinski

Wild that you have to

Guest 1

count, comma, blob 6 from this data set,

Guest 1

The way that it works, it is it is a worker systems like that to just sort of accept data into a big queue. And then you got a bunch of workers that work on that data, write it to a database, maybe do some some kind of computation or whatever.

Scott Tolinski

It's wild to think about. You know?

Guest 1

SQL like computation I think, you know, there's there's a lot of, like, don't fix what's not broken. Right? And so, I guess, some old cooked

Guest 1

And while I don't really think this is gonna be a problem for the 30 people who visit my blog every website, I So

Guest 1

is some kind of number, integer, whatever. Yeah. And and blob, I think Yeah. You don't mess up the vibes. It's it's it's good that we started this episode with by the way, someone fell through, so we threw Ben in here rather than, like, here's the apology tour.

Guest 1

But what happens when that just sort of explodes with data? It's not

Guest 1

and number it writes a data point to So they were thinking about it that way. At least that's how the docs kind of read. But I was looking at it and I thought, you know, this could be why couldn't we just sort of use this as a as a way of forwarding

Wes Bos

And,

Scott Tolinski

Yeah. Right? The hug of death.

Wes Bos

Let let it will allow you to scale it up as if it were the actual traffic. I don't know if I've ever had such large traffic that I've needed to worry about that, but Mhmm.

Wes Bos

somebody visits the website you wanna track what their their browser user agent is,

Guest 1

on blob 6, which is a string.

Wes Bos

how do you not, like, DDoS Century when, like, you I don't know what it is that caused you to sort of dip into it, but you created this thing called counter scale, which

Guest 1

trackers, like, I think Cloudflare's free plan right now, you know, for free. If you just sign up, you get a 100,000 worker in vacations The story here is it began with a problem. I don't know that I necessarily started with Cloudflare.

Wes Bos

every time there's an error or any time there's, like like, if you're doing the session replay, right,

Scott Tolinski

working on Century? I mean, I know Century and an analytics tool have a Scott in common. So

Guest 1

All these services use sampling. So, you know, somebody came out of the woodwork and was like, you better explain that this uses sampling. And I'm like, okay. I'll I'll I'll put an issue about that. And the concern there, it just means, like,

Guest 1

sorry, every month. I guess I wanted to just sort of explore what what a, what I just described. It is a system that lets you write data, write data events analytics engine.

Guest 1

you Node, 24 blob columns you can use, and 24

Guest 1

they Yarn unders they're under

Guest 1

inside of the analytics engine. So when you query it, you actually send it a SQL query. If I wanted for example, every unique browser name out of this thing. It's like select, I think the company is really just sort of

Guest 1

I think it's that so when I did look at Open Source Analytics

Wes Bos

the version of the browser that they're on,

Guest 1

Yeah. That is similar. Right? So, you know, in the magical world where you just got the perfect amount of data, or a 100,000 people visited your website every day, is anyone gonna need that? Yeah. That's a lot.

Guest 1

under the hood. There are these primitive types that exist inside of ClickHouse.

Scott Tolinski

look somewhat like it makes sense. Yeah. Yeah. I pulled up the schema, and it's, like host blob 1 user agent blob 2. It's like that name.

Guest 1

Yeah. If you look up, there's, like, a SQL API for for this Analytics ESLint. Okay. They only support Blob and Double. They do expose this index column, which they describe as the index value that was logged with the event. The value in this column is used as a key for sampling. They also sample data. This is part of how 30 visitors a month blog to be clear. Right? But it looks great. Yeah. It looks in in functions. Great. Yeah. I think this plug is hey. Check it out. It's counter Scott dot dev. Is there's a website. You can actually browse the dashboard and take a look, and then there's link to GitHub in there. But if you think this is interesting, like, I would love for people to open up issues, pull Wes, try it, you Node. I really love for this to be a community project, not a me project.

Guest 1

column. K.

Wes Bos

the Cloudflare Node is a little bit more restricted, which is often the case with Cloudflare stuff. It's like, hey, this is extremely cheap, extremely fast.

Guest 1

Right? And double So, really, like, most of how we communicate The number columns doubles, like, you can do some and average. You can actually do math. Okay. So it it does it does allow for you to do some quick bio.

Wes Bos

Wes the mouse goes or or where you clicked on a thing, so much data is being is being sent. I was like, how is it possible that you can store

Guest 1

is it's either I mean, it could just Yeah. We talked about this on our on the last time I was on the show, but I'm a very lazy Vercel, and I I don't work there. Yeah. However, I'm gonna I'm gonna offer my own random theories.

Guest 1

I happen to know that browser name is stored in blob 6. K. And Blob is just a free form pretty down with look. We're pretty transparent and clear that Century produces the show. The show continues to be good. We hope that they the audience recognizes that, 5, 10, $15

Guest 1

analytics engine has a fixed schema. And what that means is and my understanding is that ClickHouse I think it's launching in a week or 2. And this is sort of like inside of your company. I think that's interesting.

Guest 1

the system works for you at scale. Basically,

Guest 1

or I I work hard to be lazy. And what that means really the best. You know, I I've seen enough from my work to to say, like,

Wes Bos

is is the technology that that allows that. That's cool. It it seems also Cloudflare does provide the sample interval, take a look. That's awesome. It it's true. Like,

Wes Bos

is additional data types for things like geolocation.

Guest 1

I'm not pulling up the ClickHouse docs here. Right? But in my mind, these are effectively just sort of, like, micro criticisms on on the shows. Although, sometimes I do, I share some feedback, but mostly from a, hey, what do you think about this? I guess what I'm trying to say is I don't know if for if for everybody this would make a lot of sense. But I think for the way that I like to work with software development teams, which is really high level, hold people to goals, I just don't wanna do any of this. Right? Yeah. I just wanted a software system that I could put live, forget about it. And I've been running this for about, I think 4 months now, 3 months, and I've literally never had to do anything with it. So it's it's sort of fulfilled that from my side.

Guest 1

the Blob. I think there's a Blob column type in Postgres.

Wes Bos

And but what is a blob, and what is an index?

Guest 1

you want those things to be. Okay. Right? So when you write them,

Wes Bos

once everything got back up and running.

Guest 1

stuff like that, and then pushing that

Wes Bos

sampling and whatnot to be able to just, like, ingest all of that data. And they also told us a really a story about how there was a huge backlog at once where it had to be and it it could still be processed maybe the city that they've been visiting from. How how do you then make that schema in

Guest 1

it's it's like blob 1, blob 2, blob 3, blob 4, blob 5, double 1, double 2, double 3. It's basically just got free form text I'm like, oh, what do you do?

Guest 1

at low volumes that's perfectly fine. But at high volumes, codeters and all that.

Scott Tolinski

Yeah. The answer sampling. Well, it is a It could be among among a great many other things, but that's one of them. Yeah. So are these all decisions that were influenced by

Guest 1

I don't know. Maybe I've been in a bunch of sort of meetings and stuff where that that's happened.

Wes Bos

one day do. Yeah. Yeah. Wish my my stats will be sampled. But let's talk about, like like, pricing for this type of thing. I know that you have said it was extremely cheap. Yeah. Can you run this for free for most websites?

Guest 1

you can choose what to do with.

Guest 1

it would be okay, If that makes sense?

Wes Bos

Yeah.

Guest 1

relational data, if that makes sense. It's not really what if they ingest a ton of data points and that and that data looks similar,

Wes Bos

7,000,000 events and it only sampled 90% of those,

Guest 1

works within those constraints, then you get all these incredible properties. Right? You can write sort of near infinite data points. You can aggregate a 1000000 data points and read them back and be like, oh, a a 1000000 people visited my website yesterday, and it will probably return, you know, in a second or 2. That's pretty wild. Okay.

Wes Bos

and some functions to scale them up.

Guest 1

I think at least an early version of that was Postgres.

Guest 1

is I don't wanna have to monitor my databases and sort of figure out how to back them up or figure out Just to be clear here. And something about just sort of spending, you know, more money

Guest 1

Well, this is trivia time, Wes. I wasn't I wasn't prepared for this.

Wes Bos

types, point, ring, polygon, and multi polygon, which could be helpful for, like, geolocation data.

Wes Bos

And I understand what a double is. Like, a double would be a number.

Guest 1

that would allow for this type of software to exist that's what we're going for. Mhmm.

Guest 1

columns that you can use that they've already defined in their schema

Guest 1

analytics trackers or counters and and or or been in a company where it's like, why don't these add up? Yeah. Why is it that your system and then group by blob 6. And then I'll get a I'll get in the results effectively, like, a a table output of every unique browser name and then the count. Right? Oh, okay.

Guest 1

when I when I launched this project,

Wes Bos

So if you do like, if you have

Guest 1

what's in here.

Wes Bos

And most of what Ben does is

Guest 1

also needs schemas just like Postgres or MySQL. You gotta define So that's 1 worker invocation, and that's 1 Analytics Engine write I've done everything from work on our client SDK development, specifically the JavaScript stuff, does some really light, you know, data munging, and then that is

Guest 1

it's just kind of exposing these really raw primitives Mhmm. And that turned ESLint,

Guest 1

that database was designed for.

Topic 4 32:45

Cloudflare acquired Hana JS lead dev, Hana now supports front-end similar to Next.js

Scott Tolinski

And

Scott Tolinski

a

Scott Tolinski

We did our our big announcement on our 600th episode. We had David on to talk about that.

Scott Tolinski

Syntax and Sentry 1 year later.

Scott Tolinski

on Syntax and, like, what you do for the team for people who don't know? You know,

Scott Tolinski

I don't know. I don't cowboy coding type of deal. You Node, we're we're working on the site kind of we're very siloed. We're working on our projects. We're working on our site. We're used to being

Scott Tolinski

it has been 1 whirlwind year of a lot of stuff. Half of maybe not half of which, a quarter of which Ben Ben was, on sabbatical for. But when he when Ben showed up, we were kind of I don't wanna say So,

Scott Tolinski

last March, end of March.

Scott Tolinski

stallions, as Wes would say. And we we definitely needed

Scott Tolinski

Maybe. Pretty interesting stuff. Yeah. Go ahead. Let's take a detour here into,

Scott Tolinski

we joined Sentry

Scott Tolinski

you know, folks who have been doing this all very,

Scott Tolinski

but we were a team of,

Scott Tolinski

directionless,

Scott Tolinski

just kind of blown blown up completely. So, Ben, do you wanna give, you know, a quick overview of your role

Topic 5 24:35

Cloudflare Analytics Engine pricing starts free for 100k events, $5/month for 10M events

Wes Bos

talking about,

Scott Tolinski

counterscale,

Wes Bos

both, like, the privacy angle, right, you're I guess you're storing it yourself. You're not really storing it yourself. I guess you're you're given it to Cloudflare, but seems a little bit different, Ben.

Guest 1

I think success really. Really just kind of the big picture stuff.

Guest 1

per Analytics ESLint. Does that make sense? K? As I understand, using marketing cookies on our website. We've written about that, and I kinda wanna do the same thing.

Wes Bos

And then I don't know what the the analytics ESLint. Let's see here. 10,000,000.

Wes Bos

330,000,

Scott Tolinski

you know, have have used a lot of these things, you don't have to have your website

Wes Bos

You get 10,000,000 on that. So, yeah, you get you get quite a bit for for $5 a month, and if you're sort of weighing We had,

Scott Tolinski

So Cloudflare is only there to host the tool, which is free to use outside of your usage.

Scott Tolinski

And and to be clear for the audience who who might not,

Wes Bos

a fraction of the price of everything else. Like, requests on a worker per day. So you you immediately have three x that for $5 a month.

Guest 1

It's absurd. Yeah. Yeah. The

Wes Bos

And then with that, you get 10,000,000

Wes Bos

of of how it Scott. Like, a lot of people are

Wes Bos

Why it seems like everybody's just like, yeah. CloudFlare is

Guest 1

and and a analytics engine. Right? So every time that, like, a user visits your website there should be in a tab and and making sure everybody knows what we're doing. Yes. I think even as a even to to bring this, like, full Vercel.

Wes Bos

do Node to try to get around ad blocker, I'm sure you could do that with this. Let's talk a little bit about just, like, Cloudflare in general and and infrastructure

Wes Bos

and you get you get full control over it. And if you want, like, we just talked about,

Wes Bos

$5 a month, like, that's the thing about Cloudflare Workers is you can do quite a bit on the free plan, and I'm pretty sure it's a $5

Guest 1

and sort of request that tracking script, the tracking script makes a request to a worker.

Scott Tolinski

you host it on a worker.

Scott Tolinski

hosted on Cloudfly. This is just for the tool itself. The tool itself,

Guest 1

That is an important clarifying

Wes Bos

ad blockers blocking analytics, and we're trying to, like, proxy it through a different URL on a previous show. Like, you have full control over it. So if you do wanna

Wes Bos

subscription.

Wes Bos

per month, which is

Wes Bos

their server prices are going up. A lot of people are are going back to maybe, should I be self hosting?

Wes Bos

Jeez. $5 Yeah. For, like, their their base plan.

Guest 1

you run a bunch of commands, you generate an API key, and then it's just up there and it's just working, you know, and then you drop the script in your website. So, yeah, this is just referring to just this thing. Just counter scale. This is what it Scott to host it. Those numbers are absurd. Right? Like However, I do like I do like Cloudflare stuff, so I definitely went there pretty early. And then I found this service called Analytics Engine, which was in beta at the time.

Guest 1

It it's basically, like, 3 commands from the command line. Like, you clone you clone this, from MySQL or Postgres or those sort of traditional relational databases The techniques are always changing, like the tools.

Wes Bos

why why is Cloudflare so cheap?

Wes Bos

How much does this stuff cost?

Topic 6 00:27

Ben is Syntax's manager, holds everything together

Guest 1

If you're a software developer and you're pushing things into production, You basically have your own code do translation for what Cloudflare stuff.

Scott Tolinski

Sign up and get 2 months for free. Man, that was excellent, Ben. Thank you. I mean,

Guest 1

Didn't really worked out. Got into web development. Was an early employee at the startup called FreshBooks and then discussed doing embedded comments.

Wes Bos

Yeah. There you go.

Guest 1

painfully, like, 20 years. I I really don't like how that number has gotten pretty high

Guest 1

Trying to retread a little bit of that last episode. Mhmm. But, you know, I got into software to make video games. That was my original original career ambition.

Scott Tolinski

yeah, it's a nice fun. Yeah. Yeah. And do you wanna do you wanna give a shot at doing a, a century,

Wes Bos

what, probably 4 years,

Guest 1

My name is Ben Vinegar. I've been working in software and web development for, you can do a whole bunch of cool math on it. And that's really what is driving counter scale. It is a very sort of like, very simple application.

Guest 1

presented by? Oh, man.

Wes Bos

some interesting stuff about how Century has saves his stuff in the database and the stack there and his time at FreshBooks and all kinds of interesting stuff. So we have him on again today to we're gonna talk about some Cloudflare stuff that he's working on, some really interesting a lot of people are really interested in, like, the new stuff Cloudflare has been putting out as well as and we'll talk a little bit about syntax. We've been doing this for 1 year now, and we'll sorta look back on it. So welcome, Ben. Thanks for coming on. Thanks for saving our butts.

Wes Bos

at least 50 episodes a year.

Guest 1

And for the last

Scott Tolinski

it's super reasonable considering, you know, you've worked at Sentry for so long now. So you know the product.

Guest 1

working on the product UI, camera, but for the professional setting

Guest 1

Sentry is just something that helps you understand

Guest 1

how your software is performing in production, whether it's telling you about errors and exceptions that you have, or telling you that your website is slow, gives you tools to just sort of become informed, really, which is the most important thing. And then gives you tools to remediate those problems and and get your software back on track. I love it. Very well done. If you want to give Sanity a try, head on over to century.i0forward/syntax.

Guest 1

eight and a half Yarn, I've been at Sanity Wes

Guest 1

Oh, yeah. But I said I've heard. Oh, you've heard. Yeah. Yeah. Yeah.

Guest 1

Yeah. Sure.

Wes Bos

Ben is our manager here at at Syntax, and, he holds everything together. And we've had Ben on the show previously as well beef before Syntax was even part of Sanity.

Guest 1

I don't know. This is getting a little a little questionable here, but I'll I'll give it a shot.

Guest 1

Well, this the challenges of that. You Node, what what a high throughput ingestion stat kind of looks like. And I am not an expert to be clear.

Wes Bos

So, yeah, we've probably done, like, a century read.

Wes Bos

You wanna give a quick introduction, who you are and what you do?

Guest 1

your software is gonna break. I've been building some software lately and it it broke a lot faster than I was expecting, frankly. It's a really harsh reminder of how easily that happens. And, But it does what I understand is that it does have a SQL like language.

Wes Bos

And, he he told us all about

Wes Bos

Ben and I think you just sort of built it on being like, This is an interesting product from Cloudflare like, is there only 3 or

Wes Bos

and they sponsored

Topic 7 04:00

Cloudflare Analytics Engine beta stores analytics data cheaply and at scale

Guest 1

And I was looking at, you know, okay, if you don't want Google Analytics, counter Scott, this project, and, Bos, basically, how you work with the class is very different from how you would work with MySQL or or Postgres. It's not a situation where you can just, like I got this data and I'll just load it up over here and it will work work the same way with the same queries. You have to work with it differently.

Guest 1

Riffing around, I'd be like, you know, it'd be really neat if somebody if there's just some hosted service that understood this pattern, that would let me just sort of ingest data at scale and write it, and I could read it back in kind of a in kind of a queryable way. So I started exploring tools online.

Guest 1

you know, Scott at like, I don't know,

Wes Bos

Cloudflare analytics engine because

Guest 1

in the summer of the pandemic, I think I went Deno. This could have been like 2020. Just sort of interested in in Wes new infrastructure comes out, like, what what does that make possible? Mhmm. Right? from something like, I don't know the exact number, but what we need to do between now and this kind of, like, result that we wanted. We wanted to do some more stuff on YouTube. We wanted to reach more people. We wanted to make better episodes. Right? between

Guest 1

I don't even think my head space was there, Scott, to be like, oh, I'm gonna use this built in thing. I was just I just totally went to what is an external Google Analytics thing that I could drop.

Guest 1

I was lamenting this problem with, some other, you know, early century people. And, you know, one thing about centuries is that we ingest a lot of data, and I've learned a little bit about doing great on platforms, if we're if our listeners are up, which they have been, we just sort of tell that story internally and try to explain, you know, what is it that we're doing that we think is driving this. We don't have comment that I probably should have opened with earlier. Yeah.

Guest 1

Kafka rolled up into sort of or or similar kind of like, It's an open source project. It was spun out of Yandex several years ago.

Guest 1

US a month, which seems, I don't know, a little those are really minor very minor details that are really not gonna in a row column oriented. So if you wanted to sort of figure out every single unique column name, you know, this would be great with some with some visualizations on the screen. I don't know if this is making sense, this is JS, you you know, they're spinning they're spinning something up, a different kind of environment, and it's slower.

Guest 1

you wanna have it somewhat portable. Right? Yeah. I I wasn't I, you know, they will, And they have basically you know,

Guest 1

than my hosting provider. Right? Like, I'm not paying anything to host the website, but to actually host my analytics, Plausible is open source, and they run it as a as a commercial offering as well too. And so I I, you know, I poked at that source code just to sort of understand how they did it. And to analytics engine, and then the dashboard reads back

Guest 1

that's the underlying technology where all the sort of, you know, all the all the event data is written. And what is ClickHouse

Guest 1

You know? I just I just wave my hands a lot. But I do know a couple things. Okay? Which is if you wanna ingest a lot of data really quickly, you wanna write that immediately.

Guest 1

that Scott money. And I don't know. I I mean, those Yarn those commercial products. Fathom, Plausible, they're good products. I wanna be clear, but they do charge money. Mhmm. And I was just sort of curious why there wasn't, you know, just something sort of easy to use. Now I understand there is some baked in analytics with Vercel and other platforms and stuff, but, you know, I was just using some

Guest 1

let some other job deal with it later. So usually that's a queue

Guest 1

I'm always interested when people make new stuff in this industry. And when workers first came out, I thought I thought those were super neat, and I played around with that. I wanna say database, you're you're kinda saying like, Vercel.

Wes Bos

Plug away.

Wes Bos

for anyone? Sounds fun.

Scott Tolinski

I don't know, reliant

Guest 1

for a variety of reasons. For example, Century little company,

Guest 1

This is a long preamble. I'm sorry. But No. It's interesting. I was interested in sort of, like, what would an open source kinda, like, analytics thing look like, but I knew that those kind of systems need to ingest data quickly I do know the product. I've also heard you heard you guys say that say a version of that line probably, like, you know, 50 to a 100 times at this point. So You've given us notes. More than that. I Yeah. Like, how many times? Like like, Century sponsored the podcast for, be binary data. It could be a string. Right? I think it's equivalent to

Guest 1

managed ClickHouse

Guest 1

I wasn't using a baked in solution. So even if even if

Guest 1

Yeah. I mean, I think this I think this even goes back to syntax, which is, you know, working with you all, wanted to do more in HTML and CSS, and and

Guest 1

And I didn't quite understand it when I first saw it, but effectively, and at scale.

Scott Tolinski

upon your host just for your analytics, at least in my opinion, especially

Scott Tolinski

database that they're running. So it is ClickHouse?

Wes Bos

Awesome. So I wanna talk first about

Guest 1

and and, you know, revamping the website really early way to get started with that.

Topic 8 09:11

ClickHouse is a column-oriented analytics database by Yandex, used by Posthog and Sanity

Guest 1

and I think Posthog, like, a bunch of a bunch of products are built on this, analytics products.

Guest 1

Now let's say that you wanna select 1 attribute. You're like, oh, select browser name from clicks from Postgres. K?

Guest 1

usage tables, Yeah. I I think even some background, like, building the product. And then I also kinda became our 1st engineering manager and and had a stint as our VP of engineering for 4 years, and now I work with you all. Yeah. Now you get to, use the blob blob 6 instead of, like, naming the columns. Right? Yeah. If you look at the code that I've written, it is it is a bunch of string, you know, that are that are sort of fixed, but you can make them whatever you want. Right? I don't know if that kinda makes sense. Yeah. It's wild.

Guest 1

and then Right? So if you think about it, most people, if they sit down, I'm gonna write an analytics tracker, and you think about what you Node. It's like, oh, yeah. Okay. I'm gonna write this to a data write this to a database.

Guest 1

web browser traffic analytic events? Yeah. In this case oh, you're right. And they have an pnpm.

Guest 1

a columnar

Scott Tolinski

databases being a thing. Is is it specific you said it is like an analytics, like, widely used for analytics companies. Is it something, like, that's practical to be used outside of analytics?

Guest 1

real benefit that you're getting out of using it. Like, it's not a real alternative, I think, for 95% Sanity, whether we, you know lately. And,

Guest 1

Yeah. So ClickHouse is That worker

Guest 1

ever, but I don't really have a coherent answer for this, Scott. I'm sorry.

Guest 1

that engine using a SQL dialect. Wow.

Guest 1

group it, you can sum on it, That's part of why this exists.

Guest 1

So And on that note, I guess, because I was thinking about this. There's a software that's yet to be released called Boom. It's a it's an independent which, this kinda great thing joins a bigger joins a bigger company.

Guest 1

That worker

Scott Tolinski

But I've never even, like, really thought about a column oriented

Guest 1

Is it used outside of that setting? It probably shouldn't be. It's really Mhmm. You Node, I I I'm not an expert, but I think you really would wanna derive some

Guest 1

and it ingest it all. It stands up. It doesn't seem to really fall down, and then you can read it back. It does expose really encourage them to, you know, talk about their successes

Guest 1

you know, if you've got some And we still do that a lot internally at Sentry, and I think you can see that even on Twitter from the the software

Guest 1

of what web development is out there. Right. Does that make sense? Yeah. Cool. So I was checking out this analytics engine docs, and I think you know what? I think how even Cloudflare built it was more, like, hey, if you're building products on Cloudflare, you can track your own analytics from your products into the system and you can bring that back to your users. Like, you could use this for

Guest 1

Postgres still has to go through every row to accumulate those names. Mhmm. Does that make sense? So, you know, at the end of the day, there is still a file system. There's there's or how this data is stored in memory is that it has to rip through every single row of data. But a column store database is different because it's storing sort of all the unique column events So that's the preamble to writes affect anybody's You know, this is the part where a producer could pull this up and verify this for us.

Guest 1

postgres will basically just like or the underlying database engine will sort of, you know, scan every single row, collect all of those. Right? getting everybody together engineering manager person

Guest 1

Couldn't maybe just like 2,000 lines of code that is it is a it is a script that you drop on the page. That script forwards events to a Cloudflare worker.

Guest 1

It is if you think about the name, it's it's ClickHouse. It's designed to store clicks. This is it is like an analytics sort of, database. Mhmm. What's different about it

Guest 1

Select star from this table,

Guest 1

a Vercel like sort of query language that you can use to read back that data. And you can

Wes Bos

are you are you tracking with this? Like, does it default to anything, or do you have to explicitly go and say, I wanna track page views and

Guest 1

in columns instead of rows. Mhmm. If you think about when you're querying a Postgres onto onto a schema that they've defined, and I can come back to that. They queue it up. They ingest it. They write it into their own ClickHouse, And It has different sort of advantages and limitations.

Guest 1

I think so

Topic 9 00:00

Transcript

Wes Bos

Ben.

Wes Bos

Welcome to Syntax. Today, we've got

Wes Bos

we got a crazy week here at, Syntax here. We've got we're gonna react Miami in Scott lineup tomorrow. I'm flying out the day after that, so we're just recording for the week, getting ahead of everything. And we had a guest cancel, and we can't leave you folks without a show. So we did we got you the next best thing,

Share

Empowering developers for over 286200318529 milliseconds!