Functioning of the /api/v1/server/followers endpoint

Hi PeerTube community :smiley:
I am a CS student and as my bachelor thesis I am studying the interconnections between fediverse instances, and PeerTube is a part of it (one of my favourite to be honest).
In order to build the connections between instances I use the public data from the /server/following endpoint, and I don’t use the /server/followers endpoint, because if A follows B, my program automatically creates the inverse relationship from B to A.

What I found interesting is that for some instances I get a number of inverse connections (followers) that is higher than the number stated in the /server/followers endpoint.
It would be ok if it was lower, because in each part of my program I check that the instances are up and running. But that it is higher is weird.

I tried to read the source code of the api but I don’t understand typescript, express, or nodejs at all, so it would be fantastic if some of you could tell me why I am observing this behaviour.
Thanks a lot and have a nice day
Answers in french/german/italian are also accepted!

Luca

Hello,

** english version bellow **
La fédération de peertube n’est pas nécessairement symétrique. Par exemple, l’une des instances que je gère a fait le choix d’une fédération asymétrique. Je veux qu’elle reste thématique, donc je ne follow personne (jusqu’au jour où je trouve des instances compatibles, avec lesquelles je me fédererais). En revanche, j’ai plein d’instances qui suivent la mienne. C’est un choix.
Il faut donc que tu compte dans les 2 sens.

** english version **
Peertube federation is not symmetrical. For example, one of my instance choosed to federate asymmetrically. I want my instance to remain thematic, so I follow no other instance. On the other hand, many other instances are following mine. It is a choice.
So, you have to count in both directions.

(dans mon pc il n’ y a pas d’accents, excuses moi, et je ne suis pas francais)
Bonne soiree et merci beaucoup pour ta reponse!
Je crois que ma explication etait un peu moche:
je ne considere pas les relations symetriques. Ce que je fais est: si A suit B, j’ ajoute une relation A->B. B c’est le following de A et automatiquement A est le follower de B, mais ca n’est pas la meme chose.
Si on prend l’exemple de ta instance, je ne trouve aucune relation de ta instance vers les autres, mais au moment dans lequel je vais inspectionner les instances qui suivent la tienne, je trouve les connections qui partent de ces instances vers la tienne.
Ce qui etait un peu bizarre est que en faisant ca, je trouve de temps en temps plus relations que quelles repertoriees dans /api/followers
Par exemple, si dans /api/followers de ta instance il y a un total de 10 followers, peut etre que en utilisant le following endpoint de toutes les autres instances de peertube je trouve 15 instances qui suivent la tienne.
J’ espere que tu as pu comprendre mon francais terrible et je te souhaite une bonne nuit.
Luca

P.S.: Quelles sont les instances que tu geres? :smiley:

I though you were french, sorry.

I think the api hide some followers. For example, activitypub users. See this issue: https://github.com/Chocobozzz/PeerTube/issues/2234
Can it be that?

Tips: you can follow a peertube instance with a mastodon account by following @peertube@instance_uri.tld. In peertube version prior to 2.0.0, all followers were listed, including some mastodon accounts. This was a privacy issue.

PS: I’m the owner of yiny.org. A peertube instance dedicated to punk culture. And I’m launching an other instance for globenet, a french non-profit hosting organization.

No need to apologize at all, I had fun writing in french after many years :smiley:
I am not sure that that is the issue because I only investigate PeerTube instances (I am investigating the different softwares separately at the beginning), so I never run into an instance of another software, e.g. a mastodon instance that knows about a PeerTube instance.
Thanks a lot for your answers!

Hi,

We have issues with the folllowings/followers counts, that should be fixed in the next release by this commit

1 « J'aime »