Notification Hubs - Active devices vs max devices

Christer Alm 61 Reputation points
2021-03-09T09:09:32.403+00:00

@ajkuma

Hi,

In our test environment, we use the free version of Notification Hubs, with a maximum of 500 units registered. We use Templates for all our push notices.

Questions:

  1. What happens when you have more active devices than what the limit says (see picture)? Will not all notices be sent?

75750-notificationhubs-devicesregistered.jpg

2) Is it up to us developers to remove devices from NH, or is it done automatically based on inactivity or the like?

Best regards,
Crippe

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
314 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 21,346 Reputation points
    2021-03-09T14:37:33.627+00:00

    Thanks for asking question! If I have understood right you are using free tier. You may want to know that Active devices are devices eligible to receive notifications. They are defined as unique registration IDs for devices using Google Cloud Messaging or Amazon Device Messaging, channel uniform resource identifiers (URI) for devices using Windows notification service or Microsoft push notification Service, or device tokens for devices using Apple push notification service.

    And when active device quota is reached, All new registrations against any hubs within the namespace of whose active device quota is reached will be interrupted.

    In order to add more active devices you would need to create another notification namespace if the current limit hits the maximum value as per the quota limit that is limited to namespace level.

    Please refer to the Notification Hubs Pricing page for details on the number of supported devices if send push notifications via Notification Hubs.

    Please let us know if you have further query on this or issue remains.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Christer Alm 61 Reputation points
    2021-03-10T08:29:42.52+00:00

    @SnehaAgrawal-MSFT | @ajkuma

    Hi,

    Thanks for the reply.

    So these 500 represent all devices regardless of which third party the push notifications are sent through?

    I interpret your answer as meaning that we need to delete registrations if we do not want to increase to another pricing tear or create new namespaces when the current one reaches the maximum number? (According to my question two above.)

    Yesterday I removed all registrations ( DeleteRegistrationAsync ) that are not used, however, it was over 4000 - not just over 900 as the picture shows above. Is there an explanation for that?

    When you mentioned interrupted, how can you find out that it happened? We use CreateOrUpdateInstallationAsync from https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs/ and I can not see that exceptions are thrown or error codes are returned when a maximum limit has been reached. Are there other ways to find out?

    Questions in brief:

    1. Do we have to remove devices ourselves?
    2. How come there is a difference between what is shown in the interface and what is in Notification Hubs?
    3. How do we find out when we can not make more registrations?

    Br,
    Crippe

    0 comments No comments

  2. SnehaAgrawal-MSFT 21,346 Reputation points
    2021-03-15T00:49:45.87+00:00

    Thanks for asking question!

    1) Do we have to remove devices ourselves?

    Installations are not automatically removed from our end unless they expire. The expiration is set at the hub level and will default to never expire; overriding this will give an expiration time to each device registered from the hub. See expirationTime property on the request body for creation of an installation.

    2) How come there is a difference between what is shown in the interface and what is in Notification Hubs?

    Our service should be checking for device counts when a device is registered. It’s possible there’s caching and the device counts are updated on a schedule which may allow the customer to register more devices than expected until the device counts are refreshed. In addition, if a customer sends a message targeting a device with an expired/bad channel, we invalidate the specific device on our backend. In this case, the customer may have more than 500 devices registered, but not all of them may be valid.

    3) How do we find out when we cannot make more registrations?

    From our documentation for creating/overwriting an installation, a 403 status code will be returned in the event that there are too many installations in the namespace.

    Hope this helps.

    0 comments No comments

  3. Hassan Nazir 1 Reputation point
    2022-02-11T12:43:06.373+00:00

    A quick question- If I want to send notification on more than 500 devices at a time. 500 registered on one namespace and others on another namespace. How can I send the notification to all devices across the namespace?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.