Push 2.0
Last week we launched a major upgrade to our push notification server. We had added some tweaks and minor enhancements to our server previously, but otherwise, the code was pretty similar to our original proof-of-concept. And that implementation held up pretty well for us — until recently. Our aim was to consistently poll Twitter for updates every 3 minutes which meant push notifications were delayed roughly a minute and a half on average. When everything was running smoothly, we were able to do just that, but we struggled with consistency.
Those days are behind us. With some thoughtful improvements, our early tests indicate that our push server is now more than 13 times more efficient than the previous version. And, there are still more optimizations we can make. Additionally, while our push server hardware is respectable, there’s a lot of room to upgrade.
The performance improvements aren’t the whole story, however. Twitter is doing its part to make timely notifications possible. As much as computing resources are a consideration for determining a polling frequency, so is Twitter’s quota on updates for 3rd party applications. When we started development on Twitbit that quota was 100 updates per hour. If we query your account for both DMs and mentions, that’s 100 updates per hour / 2 updates per query / 60 min. per hour = 1 query every minute and 12 seconds. And of course we didn’t want to consume your entire quota just to support notifications. Today, Twitter allows 350 updates per hour and they’ve announced that the limit will eventually be 1500! That means Twitter quotas are becoming less relevant and we can start to query for updates as often as our computing resources will allow.
Bottom line?
Reliability: Our server has been cruising without so much as a hiccup since the upgrade.
Promptness: Messages are currently being delivered in less than a minute and are taking mere seconds on average.
We don’t want to make any promises yet, but suffice it to say that we’re still in the process of pushing the delay time down — not letting it creep back up. Look for even more improvements in the coming days. Don’t take our word for it either, test it out and let us know what kind of delays you’re seeing. Send your results to @twitbitapp. We appreciate your patience while we worked through this growing pain. Thanks!