this post was submitted on 15 Oct 2023
2 points (100.0% liked)

Asklemmy

43826 readers
863 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
 

Does ActivityPub send those to other instances, or does ActivityPub only send the original post and the rest (upvotes, downvotes, replies) are stored only on the original server where the post was made?

top 19 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 2 points 1 year ago (1 children)

Posts and comments are federated (synchronised). Upvotes are actually a bit of a fudge, they are actually 'Favourites' if considered from an activity pub (e.g. Mastodon) perspective, and yes favourites are also federated.
Downvotes don't exist in activity pub and, as a result, they do not federate between instances.
At least that is my understanding.

[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Downvotes do federate, ~~but it uses protocol extensions to do it. So the downvotes won't federate to Mastodon~~, but it does for Lemmy and I think Kbin too

[โ€“] [email protected] 2 points 1 year ago (1 children)

Votes federate with standard Like and Dislike activities which are part of Activitypub. It's just that some platforms like Mastodon can't handle Dislikes.

[โ€“] [email protected] 1 points 1 year ago

Can't handle by choice I'd guess. Given the format of individuals following individuals rather than topics in communities it doesn't make much sense for a person to follow someone only to downvote/dislike their comments.

[โ€“] [email protected] 2 points 1 year ago

Since you've gotten enough real answers, I'll just remind you that upvotes are stored in the balls.

[โ€“] [email protected] 0 points 1 year ago (2 children)

haven't worked with AP yet, but as a webdev I'm certain it's original server only. Syncing upvotes between nodes would be an insane datavolume and one hell to properly keep in sync to begin with.

[โ€“] [email protected] 1 points 1 year ago* (last edited 11 months ago)

[This comment has been deleted by an automated system]

[โ€“] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)

My instance has 800 users, is 4 months old, and the database only is over 30GB. It is an insane amount of data.

[โ€“] [email protected] 0 points 1 year ago (1 children)

There is a postgres command to show the size of each table. Most likely it is from activity tables which can be cleared out to save space.

[โ€“] [email protected] 0 points 1 year ago (1 children)

After the second-to-last update the database shrunk and I was under the impression there was some automatic removal happening. Was this not the case?

It's helpful info for others but personally I'm not that worried about the database size. The size of the pictrs cache is much more of a concern, and as I understand it there isn't an easy way to identify and remove cache images without accidentally taking out user image uploads.

[โ€“] [email protected] -1 points 1 year ago (1 children)

Yes there is automatic removal so if you have enough disk space, no need to worry about it.

The pictrs storage only consists of uploads from local users, and thumbnails for both local and remote posts. Thumbnails for remote posts could theoretically be wiped and loaded from the other instance, but they shouldnt take much space anyway.

[โ€“] [email protected] 0 points 1 year ago (1 children)

Yes there is automatic removal so if you have enough disk space, no need to worry about it.

What triggers this? My DB was about 30GB, then the update shrunk it down to 5GB, then it grew back to 30GB.

The pictrs storage only consists of uploads from local users, and thumbnails for both local and remote posts. Thumbnails for remote posts could theoretically be wiped and loaded from the other instance, but they shouldnt take much space anyway.

I'd be pretty confident that the 140GB of pictrs cache I have is mostly cache. There are occasionaly users uploading images, but we don't have that many active users, I'd be surprised if there was more than a few GB of image uploads in total out of that 140GB. We just aren't that big of a server.

The pictrs volume also grows consistently at a little under 1GB per day. I just went and had a look, in the files directory there are 6 directories from today (the day only has a couple of hours left), and these sum to almost 700MB of images and almost 6000 files, or a little over 100KB each.

The instance has had just 27 active users today (though of course users not posting will still generate thumbnails).

While the cached images may be small, it adds up really quick.

As far as I can tell there is no cache pruning, as the cache goes up pretty consistently each day.

[โ€“] [email protected] -1 points 1 year ago (1 children)

The activities table is cleared out automatically every week, items older than 3 months are deleted. During the update only a smaller number of rows was migrated so the db temporarily was slower. You can manually clear older items in sent_activity and received_activity to free more space.

Actually Im wrong about images, turns out that all remote images are mirrored locally in order to generate thumbnails. 0.19 will have an option to disable that. This could use more improvements, the whole image handling is rather confusing now.

[โ€“] [email protected] 0 points 1 year ago (1 children)

Thanks for the info! Ior performance reasons it would be nice to have a way to configure how long the cache is kept rather than disable it completely, but I understand you probably have other priorities.

Would disabling the cache remove images cached up to that point?

[โ€“] [email protected] -1 points 1 year ago

You will have to wait for 0.19 to disable it. Pictrs 0.5 will also add a way to clear old images. See the issue: https://github.com/LemmyNet/lemmy/issues/4053

[โ€“] [email protected] 0 points 1 year ago* (last edited 1 year ago) (1 children)

Technically votes are public. Only UI is hiding them. Which should be resolved, one way or another.

Edit: there was a post with that here a few weeks ago. I understand that this isn't a real answer to your question. Maybe you find it with these hints.

Edit2: Found it. Here you'll find more. https://mylemmy.win/post/89871

[โ€“] [email protected] -1 points 1 year ago

Meaning admins are purposefully allowing other people to brigade others with alts.

Lemmy fucking blows.

[โ€“] [email protected] 0 points 1 year ago (1 children)

Honestly votes being federated seems like a bad idea imo. Would be easy to spin up an instance with thousands of fake users and manipulate posts.

Fediverse is already big enough that it could be lucrative to do so.

[โ€“] [email protected] 1 points 1 year ago

So then everyone just blacklists that instance. If the problem is really severe, we move to whitelisting.

It's not hard to identify when someone is doing this.