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

Send many many push notifications #36

Open
pjebs opened this issue Jun 9, 2015 · 5 comments
Open

Send many many push notifications #36

pjebs opened this issue Jun 9, 2015 · 5 comments

Comments

@pjebs
Copy link

pjebs commented Jun 9, 2015

According to Apple Docs, they want you to send as many push notifications using the one connection. The documentation states that you can actually send the data to each push notification next to each other instead one at a time.

In fact the docs state that if you send many push notifications separately, it may interpret it as a DoS attack.

Is there any way to do this using your package?

@pjebs
Copy link
Author

pjebs commented Jun 9, 2015

I guess what I'm trying to say is how cam I satisfy this recommendation from Apple:

You may establish multiple connections to the same gateway or to multiple gateway instances. If you need to send a large number of remote notifications, spread them out over connections to several different gateways. This improves performance compared to using a single connection: it lets you send the remote notifications faster, and it lets APNs deliver them faster.

Keep your connections with APNs open across multiple notifications; don’t repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack. You should leave a connection open unless you know it will be idle for an extended period of time—for example, if you only send notifications to your users once a day it is ok to use a new connection each day.

@pjebs
Copy link
Author

pjebs commented Jun 9, 2015

And also this https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3

The binary interface employs a plain TCP socket for binary content that is streaming in nature. For optimum performance, batch multiple notifications in a single transmission over the interface, either explicitly or using a TCP/IP Nagle algorithm. The format of notifications is shown in Figure 5-1.

@0x7061
Copy link

0x7061 commented Aug 18, 2015

+1 Can this lib send only one push through one connection?

@vinceyuan
Copy link

+1 for sending many push notification in one connection.

@coder-han
Copy link

how one connection sending many?

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

4 participants