Understanding concurrent connections and event groups #1052
Replies: 1 comment
-
No. I'll clarify this in the docs, but that means more than two concurrent connections per APNs server. You can get an idea of how many servers Apple has in play using ❯ dig +short api.push.apple.com
api-vs.push-apple.com.akadns.net.
17.188.182.11
17.188.180.14
17.188.180.78
17.188.180.201
17.188.181.73
17.188.181.202
17.188.182.138
17.188.180.202 In this case, we see that Apple is advertising 8 distinct APNs servers, and we'll probably see diminishing returns on additional connections beyond ~16.
Please see the
So, yes, if you want more than one thread, you'll need to provide your own event loop group. |
Beta Was this translation helpful? Give feedback.
-
Hello,
The documentation seems to make a clear recommendation regarding connection/loop config: "As a rule of thumb, Pushy is most efficient in terms of processing time when it has one or two threads per CPU core and one or two connections per thread, not to exceed more than two connections per server. Still, lots of factors can limit overall performance:"
But when you say "not to exceed more than two connections per server" did you really mean "server"? Does that mean if I deploy an app to a machine and configure a Pushy client, then it should not have more than 2 concurrent connections configured regardless of the cores on the machine?
And, also, the Javadoc for
setEventLoopGroup
states "Generally speaking, callers don't need to set event loop groups for clients, but it may be useful to specify an event loop group under certain circumstances" (like sharing a group across clients)So, for example, If I specify 2 connections, will Pushy match that config with a 2-thread event loop group? Or do I need to specify the 2-thread group myself if I really want a 1/1 connection/group ratio?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions