I moved my Mastodon server into my house
One bridge server alone has over 150,000 accounts in my database. A small 7.6 MB index took that query from 352 ms down to about 8 ms.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
One bridge server alone has over 150,000 accounts in my database. A small 7.6 MB index took that query from 352 ms down to about 8 ms.
Redis was allowed to throw away jobs. Redis holds both Mastodon's cache and its background job queue. It was set to evict any key when it got full, which in theory includes jobs. I switched it to only evict keys with an expiration time, which is all the cache stuff and none of the job stuff.
Push notifications broke for some people. About 30 users get notifications through ntfy.sh, and after the move ntfy.sh just... stopped answering my home IP. Everything else worked fine. My best guess is that a burst of backed-up notifications from a brand-new IP set off an abuse filter. The fix was a little relay: notifications headed for ntfy.sh now hop through another server I run in a datacenter. It's just passing encrypted traffic along, so it never sees the contents. Notifications started flowing again within minutes.
A few smaller things got fixed too: Postgres settings that assumed more RAM and CPU than its container actually gets, and a monthly cleanup job with a SQL bug that would have quietly done nothing.
<h2 id=正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。