uniqush / uniqush-push

Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.

Home Page:http://uniqush.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uniqush-push cluster

EmMerry opened this issue · comments

Well its not an issue to create but i was just wandering that how do we create uniqush-push cluster on different nodes, having a single DB node. The default config file does not have such information.

I looked into the uniqush-conn but thats not what i am looking actually. I want to distribute the load on several uniqush-push nodes.

  1. You just run uniqush on multiple hosts, with the same config. Clients can randomly choose instances, or you can put uniqush hosts behind a load balancer.

    If one host is running multiple uniqush instances, then just create copies of the configs with different listening ports.

    Addpsp, subscribe, and the responses of APNS/GCM should get synced automatically.

    There is one issue - APNS (by default) expects feedback on unsubscribes of device tokens to be sent to the same instance that sent the push, but a random host picks it up. Fortunately, the device token will get unsubscribed eventually.

    APNS HTTP2 doesn't have that problem (search other GitHub issues for usage)

  2. You should remove dblock (all refs such as lock/unlock) from https://github.com/uniqush/uniqush-push/blob/28795218d856f4a66550164b7e00f69ef2edbbc7/db/pushdb.go
    Since there's no locking across different hosts, there's no longer a reason to lock on the same host.

    The uniqush maintainers already added fixes for inconsistencies that could come up.

Thank you for your quick reply.

Running uniqush on multiple nodes you mean uniqush-push not uniqush-conn. I have tried uniqush-conn for joining with other nodes but for uniqush-push i havent seen such clustering thing yet.

So the implementation would be on the developer side. Whether i use pacemaker and HAProxy or VIP for load balancing.

Yes, I mean uniqush-push on multiple nodes, not uniqush-conn (edit: fixed typo)

I've used HAProxy with success. The health check I use: http://uniqush-push-hostname:9898/version returns HTTP 200 if the server is running.

The first line (in your reply) again is confusing. :)

Updated that line.

I see it. HAProxy maintains the cluster. There isnt anything (yet) related to clustering specifically from uniqush.

All those other uniqush-* projects are pretty much dead. uniqush-push is the only relevant component now. There are no plans for having a clustered uniqush. Use your favorite load balancer (AWS ALB/ELB, HAproxy, Netscaler if you have one, etc.) with multiple uniqush-push instances. My company sends hundreds of push notifications / second just fine :)

@TysonAndre We probably need to update the website so it doesn't talk about the "Uniqush" ecosystem that never saw light. uniqush-push is Uniqush now

i get uniqush_success but cant recieve it in my mobile app i check every thing can you help me?

{
"date": 1601717483,
"droppedCount": 0,
"droppedDetails": [],
"failureCount": 0,
"failureDetails": [],
"successCount": 1,
"successDetails": [
{
"code": "UNIQUSH_SUCCESS",
"deliveryPoint": "fcm:75375a17a6fd337953168aa6fd342a2f6b94a0b0",
"from": "127.0.0.1:60968",
"messageId": "fcm:864978a323fc4681a186c02b9e2773aee5c6255c:0:1601717483897836%08a68949f9fd7ecd",
"pushServiceProvider": "fcm:864978a323fc4681a186c02b9e2773aee5c6255c",
"requestId": "5f7844eb-mJmNCurHIfc2voRi4jqnXQ==",
"service": "android-notification",
"subscriber": "com.narvan.pushtest"
}
],
"type": "Push"
}
fa