How to find out which instances (tenants) are really active?

When I look at our database of a Connect app I see the following:

“We have a total of 43 Jira and 228 Confluence tenants. That’s a sum of 271 tenants. 235 are enabled/installed.”

The numbers in the marketplace for “active installations” are significantly lower: 169 instead of 228 for Confluence and 22 instead of 43 for Jira.

I have yet to find out how exactly we mark tenants as disabled or uninstalled. My question for you is:

How do you “officially” find out if an instance is active / inactive or uninstalled? Does the marketplace have an API point for this?

The problem is that there are multiple interpretations of active. The app can be installed in the instance, yet not have a valid license. At that point, the app will continue to have access to the instance and can be considered active.

The fact that the license has expired is not a great indicator for inactivity, and should not be used to determine if data should be purged. The user might renew later and still expect their data to be available.

Our approach is to:

  1. Have a last active timestamp that is updated on each request

  2. Have a scheduled task check for instances without activity after X days

The scheduled task checks if the app can still access the instance using the myself API endpoint. In addition it checks the license status.

If the instance is no longer accessible by the app, the license is inactive and there has been no activity for X days, data will be purged

1 Like

Thanks for this answer. Can I infer from it that you simply do not care how Atlassian counts the active installations in the Atlassian Marketplace? Do you have a good understanding what counts and what doesn’t. Our numbers seem to be off by up to 50%. That’s odd.

It is indeed true that I stopped relying on MPAC data a long time ago.

However, if I remember correctly, the official method for counting active installations in MPAC is all instances that have the cloud version installed in UPM (regardless of license status) + all instances that have Server/DC installed in UPM (also regardless of license status) ánd are able to phone home to report to atlassian

1 Like

How are you counting active instances on your database? clientKeys or URLs? Because you can end up with multiple active clientKeys for the same URL (although we never really found out how).

1 Like

A colleague of mine pointed out that with premium Cloud instances customers can run multiple instances of Confluence and Jira Cloud under the same URL.

But while you are true that we use URIs to decipher instances in our stats and thus are prone to this error, this would lead into our database reporting too few instances not too much.

We have 50% more “active” database entries compared to the marketplace. They seem to stop counting some instances that we still count.

I was hoping for some API point that we could trigger to get the marketplace status for it. But that’s not available, right?

Yeah, that’s what @JulianWolf told me in the first place. #donotrelyonit

I don’t see how you could run multiple instances under the same URL, since that’s what identifies the rest API endpoint (and incidentally the Jira or Confluence instance).
You can have multiple clientKeys for the same URL if the Jira or Confluence instance gets a new clientKey, which can happen during a site import for example. All clientKeys will be valid to talk to the Jira instance.

1 Like

When atlassian kills an instance due to inactivity you won’t get an uninstall hook. So in the database you will still have an active record but the instance does not exists anymore and it does not count as active installation.

Afaik active installation on Mpac = all instances that have the app installed (with or without license).
Plus it has some delays on Mpac. Have you considered that?

1 Like

I wanted to reach out to you people to learn how you solve this as internally I received a lot of frustration that reveals in your collective commenting as well. Hm. Do you have a routine that tries to validate with Atlassian or the Marketplace if there are “dead instances” in your list of active instances?

Well we do have introduced a fifth eventtype (destroyed) on our own that we set on certain errors.

We do not crawl all instances yet. Don’t see a benefit if our instance table is “correct”.
It’s been a mess for a while now :joy:

1 Like

Are you storing any sensitive data? The reason we do it is to make sure that we remove customer data 30 days after inactivity, just to be safe. Don’t want to accidentally leak stuff of clients that were inactive for 2 years.

1 Like

I see. #hmpf

A little bit late but - When should I be deleting a tenant's data? is probably relevant here.

1 Like

That’s interesting, @danielwester. Thanks for sharing. Will dive right in …