Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

push: recommendation for number of goroutines / streams #69

Open
nathany opened this issue Jun 16, 2016 · 1 comment
Open

push: recommendation for number of goroutines / streams #69

nathany opened this issue Jun 16, 2016 · 1 comment

Comments

@nathany
Copy link
Contributor

nathany commented Jun 16, 2016

Apple allows between 400 to 4000 streams.

net/http2 is hard coded at 1000 streams (maxConcurrentStreams):
https://github.com/golang/net/blob/313cf39d4ac368181bce6960ac9be9e7cee67e68/http2/transport.go#L409 (thanks to @sideshow for pointing this out)

In addition to streams, multiple connections can be used. From Apple docs:

You can establish multiple connections to APNs servers to improve performance. When you send a large number of remote notifications, distribute them across connections to several server endpoints. This improves performance, compared to using a single connection, by letting you send remote notifications faster and by letting APNs deliver them faster.

You can check the health of your connection using an HTTP/2 PING frame. Docs

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

No branches or pull requests

1 participant