Giter VIP home page Giter VIP logo

Comments (2)

hirotakaster avatar hirotakaster commented on September 18, 2024

I think that's system architecture question. You means like following.

[Photon(MQTT Client)]  <----> [MQTT server 1(health: good): IP Address : X.X.X.X]
                              [MQTT server 2(health: good): IP Address : Y.Y.Y.Y]

when MQTT cluster server1 down because of some problems, MQTT client re-connect to the other MQTT server.

[Photon(MQTT Client)]  <-|       [MQTT server 1(health: down): IP Address : X.X.X.X]
                         |---->  [MQTT server 2(health: good): IP Address : Y.Y.Y.Y]

maybe you can do this using by isConnected() method or tow MQTT object. But if I build same system, I will do following.

[Photon(MQTT Client)]  <-----> LVS(HA and keepalived or heatbeat): Virtual IP : A.A.A.A)
                                [MQTT server 1(health: good): IP Address : X.X.X.X]
                                [MQTT server 2(health: good): IP Address : Y.Y.Y.Y]

LVS check the MQTT server 1,2... health status and switch the connect packet from the client, MQTT client only always connect to the LVS virtual IP A.A.A.A.
There is good MQTT client no need to have two MQTT client object(only implements re-connect) and LVS manage some MQTT servers(1,2,3...) health-check and more(load-balance) very easily.

from mqtt.

duffo64 avatar duffo64 commented on September 18, 2024

Yes, I know thanks. I have already two distinct HAproxies, each of them is balancing 3 mqtt brokers. I simply would avoid clustering HAproxy itself, since I know that one day the whole system will fail (split brain, network partition issues, and so on...) so I would like to manage two instances in code. Moreover, an HAproxy cluster is more difficult to configure, and this system will work with almost untrained personnel, so I would keep things simple.

Thank you, nonetheless.

Claudio

from mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.