text
stringlengths
0
2.29k
[3412.58 --> 3413.54] On both our parts.
[3413.70 --> 3414.62] On both our parts.
[3414.90 --> 3415.98] Let me chase that rabbit down.
[3416.08 --> 3416.98] I got a question for you.
[3417.06 --> 3422.16] So once we put this experiment into production here, what's going to happen?
[3422.84 --> 3427.34] Can you come back to the beginning where if we get this potentially smart?
[3427.54 --> 3427.94] Yes.
[3428.02 --> 3428.88] Postgres feature out there.
[3428.92 --> 3429.66] Let's say it's successful.
[3430.04 --> 3430.38] Yes.
[3430.68 --> 3431.32] What happens?
[3431.40 --> 3433.16] What happens as a result of that being successful?
[3433.16 --> 3446.92] So what happens is every single request that goes to one of our feeds will be served live from Postgres from what I call like a feeds cache inside our Postgres instance.
[3446.92 --> 3454.20] So it's effectively, it's as if it was reading off disk, but we don't have disk because we're in fly land.
[3454.70 --> 3456.86] But it's just on disk inside of Postgres.
[3456.86 --> 3460.38] And so it goes out of Postgres, goes out live.
[3460.48 --> 3461.56] So every request is immediate.
[3461.56 --> 3469.88] And then every time that we change something that's going to change the feeds, we blow that one away and we rewrite it.
[3469.94 --> 3470.96] So we recompute the feed.
[3471.18 --> 3476.36] It's basically a cache inside of Postgres because that's already our single source of data.
[3476.90 --> 3477.18] Right.
[3477.18 --> 3483.68] Whereas if we did it anywhere else, we'd have to have a shared data source, et cetera.
[3483.68 --> 3489.36] I think what's more important is that this enables us to run more than one instance of changelog.
[3489.88 --> 3490.32] Exactly.
[3490.52 --> 3494.60] Right now, because of how caching is done, we can only have one instance of changelog.
[3494.82 --> 3497.86] And we have been on this journey for quite some time now.
[3498.20 --> 3498.62] Right.
[3498.66 --> 3501.08] If you remember, we had a persistent disk.
[3501.26 --> 3503.06] So we did have local disk.
[3503.06 --> 3510.08] But when we had that, it meant that we could only get have a single instance because all our media assets were stored on that one disk.
[3510.52 --> 3514.18] So we pushed the media assets to S3 and now we could have more than one.
[3514.30 --> 3516.96] But then the next thing was like, oh, damn it, the caching.
[3517.72 --> 3521.96] So once we solve the caching, we can run more than one instance.
[3522.10 --> 3523.64] We can spread them across the world.
[3523.76 --> 3530.46] We can serve dynamic requests from where users are rather than everything going through the CDN.
[3530.46 --> 3533.54] And CDN really only caches the static stuff.
[3533.86 --> 3535.82] And even then, it has to time out.
[3535.92 --> 3538.30] That's why we have also like the time, right?
[3538.32 --> 3540.68] Because CDN also caches for about 60 seconds.
[3541.30 --> 3541.42] Right.
[3541.88 --> 3542.12] Yeah.
[3542.14 --> 3548.26] The other thing that's lets us do is serve different feeds to different requesters.
[3548.96 --> 3550.46] And so here's why this might be interesting.
[3550.46 --> 3557.52] So Spotify specifically supports, well, allegedly, I haven't seen it working very much.
[3557.72 --> 3564.84] They support chapters if you put them as text in your show notes using the YouTube style timestamps thing.
[3565.30 --> 3567.66] So I just put it in for everybody at this point.
[3567.66 --> 3578.14] But it's silly to put it into the show notes for listeners who have regular podcast apps that support chapters the way that you should, not because they're Spotify.
[3578.50 --> 3580.90] Well, we could just serve from using this system.
[3581.10 --> 3594.92] We could have two different versions of the feed, both put into Postgres, use the request header to identify Spotify because it has a standard request, and serve a slightly different feed to Spotify than we serve to everybody else.
[3594.92 --> 3597.08] And give them those timestamps.
[3597.20 --> 3601.28] And so you get the chapters over there, but you don't clutter up your feeds for everybody else.
[3601.88 --> 3606.62] And you can't do that very well with caching because it's like, well, we got a cache version, right?
[3607.00 --> 3609.12] And the requests never hit our server.
[3609.24 --> 3609.96] They're just Fastly.
[3610.56 --> 3615.42] And maybe you can put that logic inside of Fastly, but now you have to point it to different places and manage that whole deal.
[3615.42 --> 3626.14] And so this also enables that, where you can basically have n caches per request and serve the right one dynamically, but still have it pre-computed.
[3626.32 --> 3627.54] So it's kind of a best of both worlds.
[3627.84 --> 3631.24] By the way, to our listener, I realize this is kind of a dumb way of doing it.
[3631.38 --> 3637.08] If it's super dumb and you have reasons why, please tell me because I'm about to roll it out.
[3637.70 --> 3638.80] I'm about to roll it out.
[3638.94 --> 3639.92] I don't think it is.
[3640.02 --> 3640.68] Why is it dumb?
[3640.92 --> 3641.68] Why do you keep saying this?
[3641.72 --> 3642.36] Why do you think it's dumb?
[3642.78 --> 3644.12] What's the logic behind it being dumb?
[3644.12 --> 3648.26] I'm storing pre-computed text inside of Postgres.
[3648.40 --> 3649.30] It's somewhat large.
[3649.44 --> 3651.08] I read some, like, how big is it?
[3651.10 --> 3651.76] It's too big.
[3652.30 --> 3655.86] And it's like 2.3 megabytes in a Postgres record.
[3656.26 --> 3657.40] Seems like it's fine, actually.
[3657.68 --> 3660.36] But once you start getting up to like 100 megabytes, now you're in trouble.
[3660.76 --> 3662.96] We're not going to make it there with any of our documents.
[3663.58 --> 3667.60] But maybe even at 2.3 megabytes of scale, it's just going to read too slow.
[3667.84 --> 3668.36] Or I don't know.
[3668.80 --> 3672.74] It seems like a very low-tech, kind of silly way of doing it.
[3672.74 --> 3677.38] And so maybe it's just lack of confidence is why I think it sounds dumb.
[3677.88 --> 3684.02] I think this is a step in the right direction because Fly brings the app closer to the users.
[3684.56 --> 3684.68] Right.
[3684.68 --> 3692.42] And Fly really makes it less necessary to run a CDN or maybe completely unnecessary, depending on the case.
[3692.82 --> 3707.74] If we want to depend less on the CDN, which I think is a good idea, and if we distribute the app, our apps around the world, that means that we can rely less on the CDN, which, by the way, had like all sorts of issues which we are yet to solve.
[3707.74 --> 3710.74] And serve directly from our app.
[3710.74 --> 3716.38] So basically, we are reverting back, putting changelog.com behind the CDN.
[3716.52 --> 3718.80] And we had to do that because we had a single instance.
[3719.06 --> 3721.06] We had like all sorts of issues related to that.
[3721.06 --> 3732.12] But now, if we have multiple instances, one per continent, again, depending on where our users are, we no longer need to depend on the CDN as much as we did before.
[3732.56 --> 3735.14] And by the way, Fly itself, it has a proxy.
[3735.24 --> 3744.96] It has a global proxy, which means that depending on where you are, those edge instances, they will connect to the app instance which is closest to the edge.
[3744.96 --> 3763.40] So then we are pulling more of that stuff in our app, which makes us be able to code more things, as Jared mentions, pull more of that smarts in code rather than in CDN configuration or other things, which are very difficult to understand, very difficult to troubleshoot.
[3763.60 --> 3765.82] I mean, we've had so many hair pulling moments.
[3765.82 --> 3775.84] That's why we have so, so, so little hair, probably a few sections, like going like, why the hell, how this, yeah, like how this is varnish even work because it doesn't make any sense.
[3776.26 --> 3776.36] Right.
[3776.48 --> 3788.52] And we built our own little version control inside of Fastly between Gerhard and I by adding a comment and putting whose name it is that last edited it, which we would love to just have, you know, our actual programming tooling.
[3788.96 --> 3789.64] Seems smart.
[3789.64 --> 3811.24] I mean, I think if we can get, I mean, if it takes us to where we're going to go, I agree with you 100% that having our app be its own CDN, so to speak, closer to all the users, which is what Fastly is giving us at the app level, then it can be dynamic in ways that is possible with Fastly, but it...
[3811.24 --> 3811.84] Yeah.
[3811.84 --> 3811.96] Yeah.
[3812.52 --> 3821.94] And I guess one more layer here is we haven't truly embodied the vision of Fly, which is our app close to our users because of this cache issue.
[3822.04 --> 3822.94] This is full circle.
[3823.10 --> 3832.36] The whole reason for this cache experiment was to be able to bring to fruition that actual dream with no ops or, you know, very, very little ops.