问题
I am trying to write a server side code for sending push notifications for my applications. As per Apple recommendation, I am planning to retain the connection and send push notification as required. Apple also allows opening and retaining multiple parallel connections for sending push notifications. "You may establish multiple, parallel connections to the same gateway or to multiple gateway instances." For this purpose I would like to maintain a connections pool. My question is what is the limitation of connections pool, or the number of persistent connections with APNS can I maintain? Thanks for anticipated help.
回答1:
Don't know if you're going to get a precise answer to this one. As large and dynamic a system as APNS is, it behooves Apple to be ambiguous about such a number; it gives them liberty to change it at will. I found a similar vagueness here.
- From this discussion it appears a rule of thumb is 15 connections max
One suggestion is to have an open-ended pool where new connections can be created until they start being refused. Just an idea.
回答2:
I agree with @paislee, I don't think you'll get a precise number. I'm opening over 20 distinct connections simultaneously and there are ok.
In order to help you with your test, use TcpView, where it is possible to see every opened connection.
Regards
来源:https://stackoverflow.com/questions/9086956/what-is-the-number-of-persistent-connections-to-apns-allowed