Last week we made it possible to push almost anything from your Android phone to Chrome on your computer. It was an instant hit, but we ran into an unexpected snag: we hit the quota of 10,000 push messages per day in just 12 hours.
Why is there a quota?
When you push something to Chrome using Pushbullet, we send a notification to Chrome on your computer using Google’s Cloud Messaging Service (GCM for short). GCM is perfect for us because it enables us to deliver notifications instantly and efficiently, saving us from having to constantly check in with the server or maintain our own long lived and fragile network connection, both of which would result in a worse experience.
There is one small catch though. While there is no limit on the number of push messages we can send to Android devices, there is a quota of 10,000 push messages per day when using GCM send push messages to Chrome.
So how did you hit the quota so fast?
We use push messages for two things: to deliver a notification when you’ve pushed something to Chrome and to notify you that Chrome has successfully registered with us as a push target.
We thought 10,000 push messages would be more than enough, even on launch day. What we didn’t realize was that because we send a message to Chrome when it registers with our server, we were going to be sending out a huge number of messages to existing Chrome extension installations as they updated automatically.
These registration messages ended up overwhelming our quota, eventually preventing people’s actual pushes from showing up automatically for several hours. Needless to say, we were quite embarrassed for having overlooked such an obvious eventuality.
How did you find out you went over the quota?
We started to know something wasn’t working quite right when we heard from several users that their pushes were no longer showing up automatically. Taking a look at the logs, we saw we were now getting this from Google:
{
"error": {
"errors": [{
"domain":"usageLimits",
"reason":"dailyLimitExceeded",
"message":"Daily Limit Exceeded"
}],
"code": 403,
"message": "Daily Limit Exceeded"
}
}
Once we saw that, we knew there was nothing we could do other than reach out to Google to get our limit increased and wait for their response.
And what did Google say?
Fortunately for us, less than 24 hours later we got the response we were hoping for from Google:
I was extemely pleased with how quickly Google responded to our request and relieved that they were willing to up our limit. It could have been a real buzzkill for them to have been unwilling to give us room to grow when we had chosen to rely on their service for an important part of our product.
Cool. What’s happened since?
Over 18,000 installations of our Chrome extension have registered to receive pushes so far, with hundreds more being added each day.
Have a question about our experience with GCM (or anything else for that matter)? You can always reach us at [email protected] or discuss this post using the link below.