Ancestors

Written by slamp on 2025-02-01 at 22:31

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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 22:59

@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

Written by Esk πŸŒβš‘πŸ’œ on 2025-02-01 at 23:00

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 23:03

@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

Toot

Written by Eashwar on 2025-02-01 at 23:21

@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

Descendants

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 23:37

@e_nomem @esk @slamp @hazelweakly I don't think Mastodon supports that?

=> More informations about this toot | More toots from thisismissem@hachyderm.io

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 23:39

Oh, actually, CDN_HOST environment variable, didn't know about that

=> More informations about this toot | More toots from thisismissem@hachyderm.io

Written by Eashwar on 2025-02-01 at 23:41

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 23:43

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-01 at 23:44

@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

Written by Eashwar on 2025-02-01 at 23:50

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-02 at 00:00

@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

Written by Eashwar on 2025-02-02 at 00:04

@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

Written by Eashwar on 2025-02-02 at 00:05

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-02 at 00:17

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-02 at 00:20

@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

Written by Emelia πŸ‘ΈπŸ» on 2025-02-02 at 00:16

@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

Written by Amber (deilannist) on 2025-02-01 at 23:55

@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

Written by Amber (deilannist) on 2025-02-01 at 23:55

@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

Written by Eashwar on 2025-02-01 at 23:59

@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

Written by Amber (deilannist) on 2025-02-02 at 00:03

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113931194764187377
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
361.011239 milliseconds
Gemini-to-HTML Time
8.760074 milliseconds

This content has been proxied by September (3851b).