Home / Companies / Pusher / Blog / Post Details
Content Deep Dive

How the Pusher team built subscription counting at scale

Blog post from Pusher

Post Details
Company
Date Published
Author
Ashmeet Singh
Word Count
953
Company Posts That Month
1
Language
English
Hacker News Points
-
Post removed?
No
Summary

The Pusher development team recently introduced Subscription Count events to manage large presence views within their Channels apps, addressing previous limitations of the Presence channels that were effective for small groups but not scalable for larger audiences. The traditional method of using Presence channels allowed for a maximum of 100 subscribers, beyond which it required frequent API polling to update subscriber counts, which was inefficient for channels with thousands of users. To solve this, Pusher devised an event-driven model that uses Redis to manage connection counts and employs a locking mechanism to broadcast updates efficiently in large channels, minimizing message overload. The implementation distinguishes between small and large channels, broadcasting updates immediately for the former and employing a 5-second broadcast lock for the latter to manage high-frequency updates. While this approach streamlines scalability, it poses a trade-off by potentially delaying accurate count updates during high join activity within the lock period, making it less suitable for use cases requiring precise real-time updates. The Pusher team continues to explore more complex solutions to further optimize this feature for diverse applications.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 1,661 424 140 +18%
Serverless 1 684 130 58 -16%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.