15

reading the pricing details

http://azure.microsoft.com/en-us/pricing/details/notification-hubs/

there seems to be a limit of number of tags used in a push.

Broadcast (tag size)    Limited to 10K  Limited to 10K  Unlimited
# of tags (broadcast groups)    Limited to 3K   Limited to 3K 3 Unlimited

Q1. so does that mean max tags per push is 10K? assuming that there is only 1 tag per device.

Q2. is the number of tags stored unlimited?

essential i need to map a tag to device id. And then send a bunch of tags in a send. sounds straight forward, but i cant determine of there is a limit.

any help appreciated.

thanks

-lp

lpic
  • 560
  • 1
  • 7
  • 20
  • 3
    This limitation of 3k unique tags is no longer mentioned on the Pricing page. I also wasn't able to find info about it anywhere else. – motto Jan 05 '16 at 23:11

5 Answers5

21

Broadcast (tag size) - Limited to 10K means that number of devices with same tag is limited by 10K. Example:

  • You have application which sends advertising according food preferences,
  • At some point you decide to send a message to all pizza-lovers and you are going to use tag 'pizza' to do it,
  • If your hub has more than 10K registrations with tag 'pizza', then send call will be failed by the Notification Hub

number of tags (broadcast groups) Limited to 3K means that you could not have more than 3K different foods for the example above ('pizza', 'pasta', 'sushi'...)

!!!Important notice!!! Tags with five or fewer devices do not accrue to the tag limit. It means that you potentially can build an application where each device has unique tag (user id or email or something similar) and that tag may be used to send a message to particular device. It is what is sometimes called 'Inbox scenario'. And Notification Hub is not going to enforce 3K limit for that case.

Update: Notification Hub is not going to enforce any limitations described above. Official documentation was updated as well. So as of now only restriction is 60 tags per single registration/installation.

However, number of devices registered should not exceed 500 for Free tier namespace, 200K for Basic, and 10M for Standard. Contact customer support to accommodate more than 10M devices.

efimovandr
  • 1,594
  • 9
  • 11
  • thanks for the clarification. where is this explicitly stated? – lpic Nov 25 '14 at 06:21
  • It is just my interpretation, I don't know if it is explicitly written in any document. – efimovandr Nov 25 '14 at 07:37
  • with the 'inbox scenario' i am limited to sending to max 20 per send. correct? is there any other option? – lpic Nov 26 '14 at 06:42
  • "Inbox scenario" fits for cases when customer wants to reach exact device or maybe small group of devices. If a lot of devices are supposed to be reached via single send operation, then "Broadcast scenario" fits better. If the number of users is expected to be big and you are worried about the limitations - just go standard once application goes to production. – efimovandr Nov 26 '14 at 20:37
  • but there is an in between scenario called 'dynamic broadcast'. where there is a large of devices to reach but the membership changes very frequently.ie. using tag expresion 'followsMe' AND 'likesXXX'. Where likeXXX is a rapidly changing property. the expression will work nicely. But the registration update to add the new property 'likesXXX' will require enormous effort to keep updated. Or is there an easier way? – lpic Nov 27 '14 at 01:20
  • There probably is a way to reduce an effort required to keep updated. Lets figure out some details about your case. Is there any reasonable (10, 20... 50) limit for number of likesXXX tags per device? Is there any back-end which communicates with devices and then keeps Notification Hub updated or device talks to hub directly? – efimovandr Nov 29 '14 at 02:18
  • the limit of likes per user is essentially unlimited. there is a server that handles all NH comms on behalf of client. If u have any suggestions i am most interested. thanks – lpic Dec 01 '14 at 04:05
  • If the number of likes is not limited, then it looks like your backend should maintain that information and perform multiple send calls. It happens because the number of tags per registration is limited by 60 now. That's it for the send flow. But there is some new API for the registration management which simplifies things in some sense. Would you like to try it out? – efimovandr Dec 01 '14 at 20:29
  • 1
    thanks for the headsup on the tag per registration limit of 60. where is that specified? i would be keen to see the new registration api. please send links. thanks -lpic – lpic Dec 01 '14 at 23:47
  • It is probably not documented but in fact right now NH enforces this limit. It may be changed in future. On your backed what platform are you using (.Net, Java, PHP...)? – efimovandr Dec 02 '14 at 19:57
  • we are using the rest api. does that help? – lpic Dec 03 '14 at 01:54
  • Yes, looks you don't need any SDK. I'll check couple of things and provide some description for new REST methods. – efimovandr Dec 03 '14 at 18:58
  • Well... my todo list contains too more items, don't have time to write any documents right now. Here is NH Java SDK repository: https://github.com/efimovandr/notificationhubs-rest-java. It has Installation API support, so you can learn REST usage easily from it. Installation itself is just single object which contains all the NH things: push channel(token), tags, templates, secondary tiles(for WNS). On the device you just generate and keep some GUID or other identifier. Then you pass it to the backend together with the push channel(token) each time last one is received from PNS. – efimovandr Dec 04 '14 at 23:21
  • Then backend typically should do ONLY ONE call - PUT (create or update) JSON-serialized installation object to the NH. And that's it, no GETs ever required, if something goes wrong then just do PUT again because it is fully idempotent. For custom scenario when some part of your system wants to update just tags or just push channel or something else you can use PATCH which performs one or more JSON Patch operations against Installation object, here is spec: https://tools.ietf.org/html/rfc6902, NH supports some subset of it, ask if have any questions. – efimovandr Dec 04 '14 at 23:30
  • DELETE allows to delete installation. GET is supported but it is designed only for debug/troubleshooting. Keep in mind that PUT, PATCH and DELETE are eventually consistent with GET, in fact NH puts operations in the system queue and processes them in background, so API calls are very lightweight. Also Installations work together with registrations in the same hub to support migration, but it is better to not mix them if not required - use only registrations or only installations for new product. And no guaranties, use on your own risk for right now, if any issue, then just let me know. – efimovandr Dec 04 '14 at 23:42
  • Yes it is published and being tested. – efimovandr Dec 05 '14 at 19:46
  • 1
    It's not longer actual, as Azure has no such limits. – saniokazzz Apr 13 '16 at 10:09
4

An update here that we have eliminated the tag limits. Please see https://azure.microsoft.com/en-us/pricing/details/notification-hubs/ for updated information.

Mimi Xu
  • 326
  • 1
  • 4
  • Can you confirm this is still the case today? I.e. there is no limit of tags per device registration. – ian Oct 13 '16 at 17:47
3

A fresh answer for Q1, which I got after sending an email to Azure's PM for Notification Hubs:

Tag expressions can contain all Boolean operators, such as AND (&&), OR (||), and NOT (!). They can also contain parentheses. Tag expressions are limited to 20 tags if they contain only ORs; otherwise they are limited to 6 tags.

See "Tag Expressions" on this page.

Since I was asking about sending an array of tags, the Azure agent added:

When you feed us an array, we pretty much just go and build an expression with your tags using ORs, aka you will be able to put 20 tags in that array at maximum.

weienw
  • 812
  • 1
  • 8
  • 22
  • 1
    Azure recently increased the tag limit for tag expressions containing only `&&` to a maximum of 10 tags ([link](https://feedback.azure.com/forums/218849-notification-hubs/suggestions/12880704-increase-tag-limit-expression)). – hvaughan3 Oct 12 '16 at 13:42
2

In the Free and Basic tier, you can't broadcast to more than 10k devices. From the pricing page (http://azure.microsoft.com/en-us/pricing/details/notification-hubs/):

Broadcast refers to the number of devices that you can send a Push Notification to with a given notification request. Tags are keywords that devices are subscribed to. A Broadcast Push Notification can be sent to all devices that are subscribed to a particular tag.

Notification Hubs in Free and Basic tier, when broadcasting to an audience, will push to at most 10,000 devices. If more devices are present in the targeted audience, 10,000 devices will be chosen at random and the remaining ones will not receive any notification.

The 3k tag limit means that you can create up to 3k unique tags that are used to send notifications. Each device can register for multiple tags (e.g., categories of breaking news would each be a tag).

lindydonna
  • 3,874
  • 17
  • 26
0

An update here that we have eliminated the tag limits. Please see https://azure.microsoft.com/en-us/pricing/details/notification-hubs/ for updated information.

This still isn't clear in the pricing, on the Azure pricing 'calculator' it states: "First 10 million pushes are included with unlimited active devices and 10K broadcast (tag size) for Basic tier"

For the basic tier it still seems there is tag limits, but not for the Standard tier which states: "First 10 million pushes are included with unlimited active devices and unlimited broadcast (tag size)". Broadcast and tag limit information isn't shown on the general pricing info here: https://azure.microsoft.com/en-us/pricing/details/notification-hubs/

Defroster
  • 13
  • 4