posted in Selfhosted
Running web sites makes me not want to - Lowkey Party
lowkey.party/running-web-sites-makes-me-not-want-toposted in Selfhosted
Running web sites makes me not want to - Lowkey Party
lowkey.party/running-web-sites-makes-me-not-want-toReplying to @mo_lave@reddthat.com
I host a few sites and I haven’t had a problem yet. Sure, logs suggest a majority of traffic is bots, but the cheap VPS I’m hosting on hasn’t melted so I haven’t been motivated to do anything about it.
Lemmy is particularly susceptible. Hosting a static site with a limited number of pages is fine. But Lemmy needs to check all posts, find the votes, sort them, and compile the page. It does that for practically every page load, and so loading a page once is quite “expensive”.
Then add on to that the almost unlimited pages of content for bots to crawl through, bots just get caught endlessly scraping pages. Even powerful servers struggle, which is why most Lemmy instances have implemented some sort of protection against bots.
All the logged-out views in Lemmy should be cached, otherwise you’re going to have scalability problems. edit: you can probably do this without even touching the Lemmy code. There’s already nginx serving lemmy.ca, which can be configured to cache it and respect the Vary header. (I suspect the admins are already way ahead of me here, but I just wanted to share the general approach, which is pretty universal.)