Loomio

Expiring Old Accounts

MS maxwell salzberg Public Seen by 59

One of the reasons that Joindiaspora is slow/requires lots of resources to run (and possibly other old pods), is there are tons of old, dead accounts in the system. I don't have the exact numbers in front of me, even if we expired accounts that have not signed in in the last three years, that would drastically reduce the database size, which means messages would federate much faster, page loads be more reliable, and would be more cost effective to run. It would drastically improve the entire experience for people using using the Pod, and any new users that try Diaspora out.

There are two tables specifically which really bog down performance (Person and PostVisibilities), and drive the cost and memory of running a large pod up. I'd like to optimize Diaspora for the community who actively use it, so I'd love this discussion to turn into a plan of action to improve this scenario.

There is a few things that we would be a good idea to expire.

1) Local User accounts that have not signed up in a period of time.
as such, we could also expire...
local person objects
all post visibilities from this account (things that they can see)
contacts (both sides)

2) Expired Pods
One thing we don't keep track of if a pod goes down
a) we don't want to send messages to this pod
b) if we have not have had contact for it for some period of time, we should expire all data related to said pod (Person, contacts, post visibilities for local users)

3) Empty accounts just following dhq

4) Any other ideas?

The goal here is that if we can actually expire a proper amount of the data, JD.com (and most likely other pods) can have small data sets, and require less resources to run, which makes them more sustainable for the future. I've been paying for JD.com out of my own pocket, but its starting to become a burden, so I wanted to make sure we found a solution that people found acceptible (and share that process with others).

I'd love all of your thoughts.

JR

Jason Robinson Sun 5 Oct 2014 8:14PM

Submitted initial pull for review regarding old user removal feature: https://github.com/diaspora/diaspora/pull/5288

Comments welcome!

@maxwellsalzberg especially as you "requested" this :) Does this (calling user.close_account!) actually even do what is needed (= help pods run on less for longer)?