terebat

joined 1 year ago
[–] terebat 1 points 1 year ago

Other types of tests**.

For instance integration with other services, performance regressions, etc.

[–] terebat 1 points 1 year ago (1 children)

Yup, in my experience E2E tests have been super successful at catching bugs not surfaced through others.

[–] terebat 10 points 1 year ago

It is fairly relevant to lemmy as is. Quite a few instances have ram constraints and are hitting swap. Consider how much worse it would be in python.

Currently most of the issues are architectural and can be fixed with tweaking how certain things are done (i.e., image hosting on an object store instead of locally).

[–] terebat 18 points 1 year ago

On the other hand, Rust is fairly resilient. The issues Lemmy is experiencing wouldn't be fixed in Python vs Java, it's more of an architectural constraint. Those issues, experienced devs can fix mostly regardless of language.

[–] terebat 2 points 1 year ago* (last edited 1 year ago) (1 children)

Sorry if I was curt! No reason to be sorry for throwing out a decent idea

[–] terebat 6 points 1 year ago (3 children)

Caddy is not going to fix anything, on the contrary, it consumes more ram. Generally the instances have been slowing down when swap gets hit by the db, so lowering ram usage and optimizing that should be the first priority.

[–] terebat 4 points 1 year ago

It's often useful to have a discord or something to throw around approaches and discussions more conversationally before formalizing an issue or RFC imo, but happy to do it via github too.

I would think it helps newer people to get set up and hacking on it as well

[–] terebat 24 points 1 year ago

The issues I've seen more are around images. Hosting the images on an object store (cloudflare r2, s3) and linking there would reduce a lot of federation bandwidth, as that's probably cause higher ram/swap usage too.

pict-rs supports storing in object stores, but when getting/serving images, it still serves through the instance as the bottleneck IIRC. That would do quite a bit to free up some resources and lower overall IO needed by the server.

[–] terebat 24 points 1 year ago (7 children)

I will be working on this when I get cycles. Barring the issues already above, there are a lot of areas for optimizations, for instance how images are handled (i.e., they can be handled through object storage like Cloudflare R2 to decrease bandwidth/ram costs). Some is more dev-ops on how common instances are setup, others are code changes to make things more efficient.

Perhaps we should start a community or communication group for this?

[–] terebat 10 points 1 year ago

+1, lemmy/kbin/mastodon are communities users can shape and contribute to (literally to the code as well) far more than reddit. That alone with along with the recent influx of users, makes it a far more interesting place than reddit.

[–] terebat 1 points 1 year ago (1 children)

That latter part is the same reason we mainly just use it in unit tests, and not much else. It's such a baffling situation when there's an assert, but the code still executes despite the assert. Debugging an incident or issue just becomes super annoying when that can be the case.

[–] terebat 2 points 1 year ago

Was playing around with a small in memory cache as well as materialized views to prevent the swap hits. Hard to prevent the inbound traffic though, maybe a CDN could help, but need to see what the traffic patterns look like.

view more: next ›