Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Olly Headey

๐Ÿ‘ค Speaker
310 total appearances

Appearances Over Time

Podcast Appearances

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

is still a mystery and and i i wasn't that interested enough to actually go and understand exactly why but i did document it in this article like here's what i did partly for my own benefit because like if i have to do this again i'm literally never going to be able to understand what to do because it you know it took me a while to figure it out because not that information not that much information was

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

is still a mystery and and i i wasn't that interested enough to actually go and understand exactly why but i did document it in this article like here's what i did partly for my own benefit because like if i have to do this again i'm literally never going to be able to understand what to do because it you know it took me a while to figure it out because not that information not that much information was

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

was out there, bits and pieces on the Rails forums and various blogs. So I thought I'd try and encapsulate it. And it does seem to work because I have had a few people get in touch saying, thank you. Thank you for writing that because I was banging my head against a brick wall trying to figure out how to make it work.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

was out there, bits and pieces on the Rails forums and various blogs. So I thought I'd try and encapsulate it. And it does seem to work because I have had a few people get in touch saying, thank you. Thank you for writing that because I was banging my head against a brick wall trying to figure out how to make it work.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

So another thing, I suppose, that maybe that Rails could make a little bit easier. Oh, look, it is quite complicated, isn't it? All of this... Direct uploads, if you look at the code in Rails for how that works, it's quite hardcore in my opinion. That's where it came from and how I approach it.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

So another thing, I suppose, that maybe that Rails could make a little bit easier. Oh, look, it is quite complicated, isn't it? All of this... Direct uploads, if you look at the code in Rails for how that works, it's quite hardcore in my opinion. That's where it came from and how I approach it.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

I mean... The correct thing I should have done, because it was AWS, was to write that as code. Here's a Terraform script that will set up your... I didn't do that. It's probably slightly beyond me, or beyond my patience, I should probably say. I have this patience problem where I'm just impatient. The correct thing would be to study the Terraform and beautifully present this.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

I mean... The correct thing I should have done, because it was AWS, was to write that as code. Here's a Terraform script that will set up your... I didn't do that. It's probably slightly beyond me, or beyond my patience, I should probably say. I have this patience problem where I'm just impatient. The correct thing would be to study the Terraform and beautifully present this.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

I haven't got time for this. The crazy thing is, of course I have time. I just choose not to. But yeah, I think that could help because then you're expressing in code exactly what you're doing on the cloud front and on the S3 bucket in the case of active storage. But on the Rails side, I mean, there's not that much to do. I mean... With the assets, there's virtually nothing to do.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

I haven't got time for this. The crazy thing is, of course I have time. I just choose not to. But yeah, I think that could help because then you're expressing in code exactly what you're doing on the cloud front and on the S3 bucket in the case of active storage. But on the Rails side, I mean, there's not that much to do. I mean... With the assets, there's virtually nothing to do.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

You just have to set the asset host. All the configuration is in AWS. Whereas with the active storage, you have to create this direct route. And then with that action text, you have to then go and... find the blob partial, you know, and go and change the route in the blob partial and things like that. But once you've done that, it's kind of straightforward. But it's, yeah, fiddly.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

You just have to set the asset host. All the configuration is in AWS. Whereas with the active storage, you have to create this direct route. And then with that action text, you have to then go and... find the blob partial, you know, and go and change the route in the blob partial and things like that. But once you've done that, it's kind of straightforward. But it's, yeah, fiddly.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

But I think it's mainly fiddly because of the AWS. And if you could automate all that stuff yourself. But I suppose a good test would be to try it on another CDN, of which I've not done. You know, would it work on DigitalOcean or

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

But I think it's mainly fiddly because of the AWS. And if you could automate all that stuff yourself. But I suppose a good test would be to try it on another CDN, of which I've not done. You know, would it work on DigitalOcean or

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

or some other, you know, people have the other image CDNs, image-specific CDNs, and they, especially on the larger side of, if your app is, you know, a big commercial app, you might not use CloudFront at all. You might go for one of these proper image CDNs. I have no idea whether that would be easier or more difficult, but presumably from a Rails point of view, kind of the same.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

or some other, you know, people have the other image CDNs, image-specific CDNs, and they, especially on the larger side of, if your app is, you know, a big commercial app, you might not use CloudFront at all. You might go for one of these proper image CDNs. I have no idea whether that would be easier or more difficult, but presumably from a Rails point of view, kind of the same.

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

You just have to get this route to point to the right thing. So it is...

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

You just have to get this route to point to the right thing. So it is...

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

But yeah, the article does... That one is pretty straightforward to do that. You just have to... Once you've set up your CloudFront... instance and set the kind of core stuff then you just set the asset host in your Rails app and it just works it literally just works and you know none of those requests are now hitting your app every time you know

Ruby Rogues
Cloud Migration, Server Costs, and CDN Challenges - RUBY 650

But yeah, the article does... That one is pretty straightforward to do that. You just have to... Once you've set up your CloudFront... instance and set the kind of core stuff then you just set the asset host in your Rails app and it just works it literally just works and you know none of those requests are now hitting your app every time you know