I have an .Net windows service that sends GCM push notifications via https://android.googleapis.com/gcm/send.
The service periodically sends batches of approximately 10,000 messages at a rate of 10 / second. With each batch, 5 - 10 of the messages will cause a "502 Bad Gateway" response. The messages that generate the 502 always go through with a second try.
Is this normal? Could I be sending too many messages too quickly?
According to the GCM guide, all 5xx error codes should be treated as temporary errors, and requests that get these errors should be retried :
I don't think 10 messages a second is too quick. As long as your code handles this error and retries, I don't think there should be any problem.