Run your own push notification server to send real-time messages to Android and iOS apps without relying on a third-party service.
Deliver low-latency in-app chat or alert messages to thousands of connected mobile clients simultaneously.
Set up targeted push rules per user with the mpns scheduler to send personalized notifications based on conditions.
Replace a paid push service by self-hosting mpush with your own ZooKeeper and Redis infrastructure.
Requires JDK 1.8+, a running ZooKeeper cluster, and a Redis instance before the server can start.
MPush is an open-source real-time push notification system written in Java, designed to deliver messages from a server to mobile devices reliably and quickly. The problem it solves is a common one in mobile app development: standard HTTP connections close after each request, so there is no efficient way for a server to proactively send a message to a phone. MPush maintains persistent TCP connections with each client device, keeping those connections alive with heartbeats, so that the server can push a message to any connected device at any time with very low latency. The server component uses a Java networking library called Netty to handle large numbers of simultaneous connections efficiently. It depends on two external services: ZooKeeper, which handles service coordination when running multiple server nodes together, and Redis, which handles session storage and message queuing. The configuration is written in a format called HOCON and covers network ports, connection timeouts, heartbeat intervals, compression thresholds, and traffic shaping settings. RSA and AES encryption are built in to secure the connection between the server and each client. The project is organized as a set of related repositories. The main server lives here. A separate scheduler component (alloc) decides which server node to assign each connecting client to. A personalized push center (mpns) handles rules for targeting specific users. Client SDKs are available for Android (with a demo app), iOS in both Swift and Objective-C, and plain Java. This means an app team can run their own push infrastructure rather than relying on a third-party service. To get started, you install a JDK (version 1.8 or higher), ZooKeeper, and Redis, then download a release package and edit the configuration file before starting the server with a shell script. Detailed setup documentation and examples are linked from the repository page.
← mpusher on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.