Posts with the tag s3:

How we backup

I woke up to the terrible news that our good friends on another instance had lost their database during a software upgrade. Godspeed and good luck in bringing it back online. We’re pulling for you! The Free Radical site backs itself up hourly to a private S3 bucket, and keeps a month’s worth of these snapshots. It’s configured to upload all media files to S3 and serve them from there. In the event of a complete server failure, I could – assuming all goes well – re-deploy the software on a new server and restore from backup without losing more than just users and posts created since the last hour’s backup.

S3 URLs have changed; update your Content-Security-Policy

I’m serving Free Radical’s images etc. from S3. When I updated to Mastodon v2.1.0, I noticed that all the page’s images were missing. Safari’s Show JavaScript Console menu revealed a lot of errors like: [Error] Refused to load https://s3-us-west-2.amazonaws.com/freeradical-system/accounts/avatars/000/014/309/static/91f9782fad3f6284.png because it does not appear in the img-src directive of the Content Security Policy. Turns out that some time between the releases of v2.0.0 and v2.1.0, the Mastodon switched from generating S3 URLs like:

No, really, an entire month with S3

A couple of weeks ago, I described a month’s worth of experience with hosting Free Radical’s media on S3. This update responds to some predictions now that I have an entire calendar month under my belt.

One month in with S3

When I was estimating Free Radical’s operating costs, I predicted that S3 storage growth would be linear. That turned out to be very much the case.

Costs of hosting a small server

I had no idea how much it would cost to host a Mastodon instance. This is for everyone like I was who’s thinking about running their own server but wants to know what to expect.

Free Radical currently has 62 users. The numbers here are what I pay our small little instance and would certainly jump up if we grew by a factor of 100x.

Migrating media to S3

This morning, I moved all of the user-generated content on Free Radical from local storage to S3. It was completely painless and Just Worked – yay! There are a few reasons why this can be a great idea: