Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max. number of token to send notification to? #123

Closed
baden32 opened this issue Feb 3, 2021 · 3 comments
Closed

Max. number of token to send notification to? #123

baden32 opened this issue Feb 3, 2021 · 3 comments

Comments

@baden32
Copy link

baden32 commented Feb 3, 2021

In the sample code, we can see
$deviceTokens = ['<device_token_1>', '<device_token_2>', '<device_token_3>'];

At this time, for me it works fine for 3 tokens, all devices received the message.

So my question: is there a max. number of token I can send the notification at the same time?

If I have 4000 receivers, coud I add my 4000 tokens at a time and then call the push function or should I split into smallest packages (ie 1000 receivers)?

Thank you in advance for your help.
Regards
Joe

@edamov
Copy link
Owner

edamov commented Feb 3, 2021

I didn't try to send so many notifications so I can't say for sure

@edamov edamov closed this as completed Feb 16, 2021
@yosus
Copy link
Contributor

yosus commented Feb 17, 2021

Yes, you can put in thousands of tokens into the request.

Just to share some stats that I have after using this library. The old binary-method (sending to gateway.push.apple.com) which may/will be discontinued by Apple on 31-Mar-2021, is still the fastest way.

Sent using Amazon EC2 T3.small server with ssl-verification turned off.

Seconds Token Count Seconds / 1000 token-count Remarks
20.00855127 2224 8.996650749  
119.7289643 12421 9.63923712  
10.31108534 1104 9.339751216  
85.24094299 8918 9.558302645  
10.16839604 1091 9.320253019  
188.0041651 21137 8.894552922 Completed time 19:22:17
261.361829 21134 12.36688885 Completed time 19:20:31
227.3990977 21139 10.75732521 Completed time 19:03:58

*note : Note the time, thus affecting the speed.

@baden32
Copy link
Author

baden32 commented Feb 17, 2021

Great thank you for your complete info and answer, great help.
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants