Push-stream replication
M1ha-Shvn opened this issue · 3 comments
Hey.
I want to create multiple push-stream instances in order to increase my service reliability and scalability.
What is the best way of doing this?
Now I see only two possibilities:
- Backend makes requests to all servers on realtime event. Plus: servers are independent. Minus: double backend work. It's critical as I have a lot of events and there were situations when backend haven't managed the load.
- Master NGINX somehow (how? I'll be greatfull for advise) resends events to all slaves which duplicate them to connected clients. Plus: reliable, easy scallable, no backend overwork. Minus: how can I achieve this?
Thanks.
@M1hacka
There isn't an option to do that only with the module yet. There is an old issue open to implement a cluster.
There is a third option that I used years ago.
Use some queue system like ActiveMQ or RabitMQ, send the message to it, and each nginx server has a listener that receives the message and forward to nginx instance running the module.
You will have a scalable cluster, not so reliable because of the new points of failures but no overhead on your backend.
@wandenberg
Does exist any plan to implement replication, maybe in nearest or farthest future?
Thank you.