036 — Pedal to the Metal
E37

036 — Pedal to the Metal

Ryan:

Hey. How's it going? I'm Ryan Hefner and this is the All Play podcast. So it's Saturday night and I was just sitting around trying to figure out whether I should work on anything or not and instead, I decided to pick out this, new pedal I picked up actually over a year ago that I haven't even plugged in yet. It's the Fender Shields Blender, pedal and it is pretty cool.

Ryan:

It's been fun to play around with it. And I realized that I didn't record an episode tonight or this week, so I figured why not record an episode tonight and catch you up on what I did this week, what's going on with starter packs, and some other stuff. So I ended up having that call with Vercel, and it was a really interesting call. I think, I learned a few things coming out of it, and I have some stuff that I'll probably try in the future in the event that I post something on Vercel, and I need to try to kind of like corral the cost. So couple things I ended up learning during that phone call.

Ryan:

One, the fluid compute is real and it does work. They had kind of like a an extended or like, expanded observability view that they were kind of walking me through, going over different metrics of the site. And he's like, oh, this looks like probably like I was like, I turned on fluid computing. He's like, he went to this one tab, checked it out, and you could see like a clear drop off on a function. I guess, kinda just like the the sporadicness of it.

Ryan:

As soon as fluid compute was on, it was kind of solid. Maybe good, maybe bad, but it seems like from, like, a kind of chaotic use of of functions and stuff, it seems like it smoothed it out, which was good. So I think it did what it does. It kinda made it a little bit more fluid and, consistent, which is probably what you want. As far as, you know, ways that I could have approached optimizing the site or whatever, it's kinda tricky.

Ryan:

I think there's a couple different things I could have done. One, I probably could have set my own static cache key. So there was some every time you redeploy and you're doing ISR, you're basically blowing away the, the cache every time you do that. And so any pages that you had in there, basically, are gonna get rewrote again, so they're gonna go against your ISR rights. If I had basically managed my, like, the cache prefix, I could have controlled those ISR rights, kept that cache warm between deploys, assuming that I didn't change something on the page that I actually wanted to go out.

Ryan:

So that's the reason why they do that. They basically probably peg it to, like, the git hash of the, either the commit or the the merge or whatever when that goes out. So that makes sense on why that it is. I probably could have one, reduced the amount of rights that I was doing by managing that and, I don't know, maybe maybe could have saved some stuff. The other thing that was recommended was maybe instead of doing the ISR, which obviously kind of spins up its own whole, like, cost kind of structure thing and also still does have the get static props and that all the that that method that gets called for all those pages that, that have to go in.

Ryan:

Basically, like setting the cache control header so that way, even if I was using get server side props, I could have had that cache control so every so that page sits out at the edge for a longer period of time. Because essentially right now, every time it goes, it's it's like really not hitting the edge. Obviously, if it is ISR ed, it would. But, I think it said in the cache control handler or cache control header would, have maybe helped that out a little bit. It's a tricky thing though because there are authenticated pages on the site, so you gotta kinda play around with that.

Ryan:

Again, I would probably have to to still do the, you know, the token check to see if they're authenticated and then basically, like, rehydrate the page with an authenticated state, which I already did for the ISR pages. But, you know, I don't know. It opens up its own whole can of worms. So the site is still on render. It was a great conversation with Vercel.

Ryan:

I have at least now an open line of communication with them in the event that I wanna try anything else out in the future on future sites or if I wanna explore ways of, like, migrating starter packs back. But so far, the site seems to be doing well over on a render right now. Regarding that, I did play around with writing my own cache handler that was using Redis and some other stuff. I just wasn't really able to, really, like, control the I don't know. Just the the life cycle of when it would make a connection.

Ryan:

I kinda made this ephemeral Redis client where essentially after a certain period of time, it would try to, like, disconnect and close itself out in the event that it wasn't used, and then it would try to, like, bring itself back or extend its life when, get or set, methods were called on it. It just kinda got a little bit wild. It didn't see it seemed like it bugged out the Redis instance, and, it seemed like it was kinda turning into more trouble than it was worth. I did end up actually implementing a custom cache handler, but it's using an LRU cache, and it seems like it's kinda doing the trick. It seems like it kind of smoothed out some of the the inconsistencies or the sporadicness of the, CPU and memory on the render box that it's currently running on.

Ryan:

And, I think it kind of created a little bit of buffer so that that box has a little bit of headroom. So I was able to drop the retice instance, which was $10 a month. So I and then I even toyed around with, dropping it down to the $25 a month box over on render. It was kinda holding up the site, but the problem is I think it would get these kind of bursts in traffic and bursts in memory and CPU use, and it would kinda make the box unstable. And then eventually, it would do that a certain number of times, and then it would kinda, like, trip up.

Ryan:

And so I just bumped it back up to the $85 a month plan. It seems like it has the headroom that it needs to stay up and stay live and it's fast and performant and it's gonna do the job. And at least I know that it's just the locked in $85 a month right now, and I don't really see traffic going higher. If anything, I just I need to work on ways to get people to connect and use the site more. So I have some ideas of some stuff I'm gonna do both to the homepage as well as, writing up some other stuff to make it more apparent that you can kinda like make a, you know, a starter pack real quick or quickly add someone to an existing starter pack and those kind of things as well as, see the packs that, you appear in and stuff.

Ryan:

So some ideas for that, but at least things seem to be stabilized. It was kind of a heavy client week, so, I didn't, you know, between talking with Hercel and just kind of like playing around with some stuff on starter packs, I didn't really get a whole lot done on Sky Lounge and, on that front. But I am looking for, you know, trying to get back to that because I think I do have everything to a stage where I can at least start doing some early testing and maybe do some early sessions, with people using the, you know, the WebRTC and sockets and stuff, to have some audio conversations on the site and just see what stuff I didn't account for. But just a few little odds and ends that I need to do there and basically kinda get to get a proper homepage together right now. The one kinda looks like a a show flyer, but we'll see how it goes.

Ryan:

The one thing I did end up doing because I was just kinda like getting a little bit I don't know if it's like burnout or whatever, but, you know, I was like really heavy on client stuff all week, dealing with the starter pack stuff. I just wanted to get something kind of like up that I've been meaning to get up for a while, and that is actually the instance of the opengraphs.com. So opengraphs.com is, like an OpenGraph image generator service plus. Basically, it's a re a refactor rewrite of an existing service that I was using that, was called Link Card. So linkcards.io, which actually just forward you over to opengraphs.com right now.

Ryan:

But it was a service that I was using for my sites to dynamically generate OpenGraph images. OpenGraphs is gonna be a little bit broader than that. It will do the the image generation, but I have some plans on how I can kind of, like, inspect and manage and control a little bit more than just the just the images themselves. But, again, that's to to be determined as I'm kinda, like, building out the app and some of the other stuff. But I did end up getting a early version of the renderer up that I could use to start just like basically like troubleshooting or not troubleshooting, but testing the performance of some of my assumptions around that.

Ryan:

So I actually got that spun up, got it deployed, have two sites using it. So I'm using it on my personal site, ryanhoeffner.com, as well as allplay.fm. And so, you know, I'm gonna be publishing some more pages to those sites and kind of tweaking around the images, that are rendered for those. And it seems like it's working well. It's super bare bones right now.

Ryan:

It's basically just kinda doing some some really generic stuff. There will be, you know, more advanced kind of like caching and dynamic serving of different things. But, for now, at least it's up and running and doing the job basically of what the previous one is doing with but just no admin controls right now. So gonna get start working on the app and get that up, but it feels good to just get that out. I also ended up pushing out a update to a open source package that I have, which is called Next dash Meta, which is essentially the way that I compose all my, OpenGraph data into my Next.

Ryan:

Js, projects. So I got a little bump on that because there were some tweaks that I had made that I wanted to roll into this, And so that's out and that's feeling good. And yeah. And basically, just trying to regroup. It felt like a scattered week.

Ryan:

I feel like this is a scattered, podcast episode. But, you know, that's kinda what happens sometimes. You get a little scattered. I'm gonna try to get a little bit more zeroed in this coming week on some stuff. So I'm feeling good with having that initial opengraphs.com renderer up.

Ryan:

Gonna obviously publish this episode, share it around. We'll see how those images are being, pulled in and served, in the various, you know, platforms and sites and everything. And, it'll be a good little test on the Open Graphs front, and I will be working on getting that initial beta of Sky Lounge out and also integrating Open Graphs into that site as well. So I think it'll be fun. It's kind of, you know, it's like a tool for a tool for a tool and hopefully I can also, get it to where this starts making some money and, I can still keep using it and other people can too because I do think it's valuable, and simplify some stuff even though, obviously, it still does take time to build.

Ryan:

But, yeah, I'm rambling on. It's I'm over on what I thought was gonna be a relatively short, video. So gonna leave it there and I'll play out, I guess. Alright. Have a great one.

Ryan:

Later.

Episode Video

Creators and Guests

Ryan Hefner
Host
Ryan Hefner
Having fun, building stuff. Currently building: https://www.transmits.io