The #infrastructure of #Hachyderm was discussed at #FOSDEM in a Birds Of a Feather. We talked about the different components and why they are structured as they are now, explaining both their history and the financial aspect.
In the photo below @hazelweakly and @esk ; @e_nomem and myself were also there.
=> View attached media | View attached media
=> More informations about this toot | More toots from slamp@hachyderm.io
@slamp @hazelweakly @esk missed a set of nginx's between puma and cdn edge β buttons & fritz both have nginx to expose mastodon web (puma) to the CDN nginx
So:
Edge nginx -> Node nginx -> puma
Edge nginx -> streaming
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem @slamp @hazelweakly yup - we were short on time even with an hour m, so we didn't hit quite everything π
=> More informations about this toot | More toots from esk@hachyderm.io
@esk @slamp @hazelweakly I mean, theoretically we could tell mastodon-web (puma) to serve the static assets instead of using nginx for that since edge could cache those long term, but it's fine
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem @esk @slamp @hazelweakly this also reminds me that we need to move the static assets to a separate domain so that we can cache it at the edge better. At that point it may not matter if we have nginx or puma serving up those files.
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@e_nomem @esk @slamp @hazelweakly I don't think Mastodon supports that?
=> More informations about this toot | More toots from thisismissem@hachyderm.io
Oh, actually, CDN_HOST environment variable, didn't know about that
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem yep, was about to link it but static.hachyderm.io should definitely be a thing
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@e_nomem I'm just not 100% sure how this would affect deployment of new versions? Would we back static.hachyderm.io with a bucket? Then have a step to copy public/ to that bucket?
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@e_nomem we can also split streaming to a subdomain too, but not all clients correctly discover the streaming server (this is something I want to tackle in "streaming v2")
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem Should be a non-issue. Pretty much all of those CSS/JS/whatever atifacts that are served up have a hash as part of the URI because they're generated during the asset precompilation step. That makes them pretty unique so multiple versions of mastodon can be served up side-by-side without issue.
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@e_nomem right, I more mean we'd need to do a build of mastodon somewhere, with tangerine UI, and then push those static assets somewhere to be loaded up by the new version
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem or we just serve them directly from puma? E.g. hachyderm.io and static.hachyderm.io basically just point at the puma nodes (with static file serving enabled), but the static domain just has super heavy caching enabled. The overhead of having puma serve up static files vanishes because it basically only happens the one time before it gets cached by the edge nodes.
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@thisismissem Alternately, we don't have puma serve up static assets and we can keep the local nginx for the web instances and nothing else really changes in our current infra
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@e_nomem I think regardless there still needs to be some file that the rails servers need to know the paths to the files, so we'd need that on each mastodon-web and mastodon-sidekiq node
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@e_nomem additionally there's the potential thought here to switch to containerized mastodon processes such that we don't have to build assets & manage dependencies on each server
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@e_nomem true, but you could always then hit the asset paths on puma directly (i.e., havhyderm.io/assets/foo.png) which would cause extra load on puma
=> More informations about this toot | More toots from thisismissem@hachyderm.io
@thisismissem@hachyderm.io @e_nomem@hachyderm.io You could yes, presumably using a tool like rclone with them both entered as remote targets. Although... that sort of brings into question "why?". Assuming these are referring to stuff like hachyderm.io's logo, icons and other branding, wouldn't the point be to keep them separate? They aren't going to change much unlike user uploaded content. I think it'd be interesting to have some sort of version control backing your static assets. Not sure git is the answer here but presumably the workflow would be "commits a change -> approved -> some action invokes rclone to copy the newly changed asset and deploy it".
=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social
@thisismissem@hachyderm.io @e_nomem@hachyderm.io never mind - i see this includes scripts served for mastodon's front end.
=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social
@puppygirlhornypost2 Yeah, it's not super clear but the 'assets' referenced here are the sort of things that get updated only when we update to a new version of mastodon itself. They're highly cachable
=> More informations about this toot | More toots from e_nomem@hachyderm.io
@e_nomem@hachyderm.io Before I make an ass of myself further - Does the talk from earlier go into detail how you deploy new versions of mastodon? I am thinking that if you do continuous deployment it shouldn't be that hard to have a stage where you copy files like https://hachyderm.io/custom.css to the bucket used in serving these static assets?
=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social
@slamp @hazelweakly @esk @e_nomem awesome, maybe there will be a recording to catch up on later
=> More informations about this toot | More toots from webframp@hachyderm.io
@webframp @slamp @hazelweakly @e_nomem no recording, but we'll do a deeper dive and record that post fosdem!
=> More informations about this toot | More toots from esk@hachyderm.io This content has been proxied by September (3851b).Proxy Information
text/gemini