Multiple Uniqush instances with unique Redis

106 views
Skip to first unread message

Maurizio Gallelli

unread,
Jun 28, 2014, 8:30:53 AM6/28/14
to uni...@googlegroups.com
Hi,
supposing to have a production environment a good configuration could be to have two serves running Uniqush connected to a Redis master.
- Did you think this scenario could have any issue?
- As you know Redis now has Sentinel as master manager, did you have any plan on supporting Sentinel (I don't know if any go library support it) ?

Thanks
Maurizio

Monnand

unread,
Jun 29, 2014, 6:01:30 PM6/29/14
to uni...@googlegroups.com
Hi,

Please see my answer below:

On Sat, Jun 28, 2014 at 8:30 AM, Maurizio Gallelli <maurizio...@acotel.com> wrote:
Hi,
supposing to have a production environment a good configuration could be to have two serves running Uniqush connected to a Redis master.

Yes. Several instances of uniqush is a good option for production environment.
 
- Did you think this scenario could have any issue?

Not yet. But a minor issue I could think of is the number of connections with APNS. Currently, each uniqush instance will have at most 13 connections with APNS. The number 13 is currently hard coded. Apple did not mention any connection limit or max request rate in their official document. In theory, we could be cut by Apple at any time. In practice, it turns out 15 connection per machine is a safe choice. So to play very safe, 13 connections would be fine. However, as Apple did not specify anything here, I cannot guarantee it.

 
- As you know Redis now has Sentinel as master manager, did you have any plan on supporting Sentinel (I don't know if any go library support it) ?

I did not check it out. Does it use the same protocol to communicate with clients?

Currently, I'm working on v2.0 of uniqush, which will support multiple backend datastore. However, I have suspended this project and it will be restarted from September.
 

Thanks
Maurizio

--
You received this message because you are subscribed to the Google Groups "uniqush" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uniqush+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maurizio Gallelli

unread,
Jun 30, 2014, 4:45:47 AM6/30/14
to uni...@googlegroups.com
Hi,
Sentinel mainly do as master manager through a quorum, so multiple Sentinel monitors master and slaves, if muster die sentinel elect a slave to master role.
Sentinel protocol is the same Redis one but mainly you can query it for master discovering.
I used it in PHP in this way:
- I've a list of Sentinel
- randomly I connect to one asking about current master
- I connect to current Redis master

It should be managed by Redis go library but doing a quick seach I was not able to find any already implemented.


Thanks
Maurizio

Misha Nasledov

unread,
Jun 2, 2015, 6:58:28 PM6/2/15
to uni...@googlegroups.com
Hi Maurizio,

I've successfully operationalized uniqush-push in production and it's handling about 400-500 subscribe requests per second over 200 GCM pushes per second.

I run 6 instances between 3 VMs balanced by haproxy. Instead of giving uniqush-push its own Redis server, I have it use a persistent Redis store I created. I use twitter's twemproxy to talk to it. Currently using some custom patch for built-in failover handling though I'm hoping andyqzb's patches that make it Sentinel-aware will make it in soon.

I'll blog all about it when things are a bit more done. Unfortunately the APNS endpoint is buggy as I've confirmed with another thread in this group and it's a little complex to debug. Now that GCM has announced they support iOS devices, we might just use this as an opportunity to migrate to GCM and call it a success.
Reply all
Reply to author
Forward
0 new messages