Comments (2)
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.
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)
- Give an example of publish with retained bit set HOT 24
- Disconnects on Particle Core HOT 2
- MQTT_KEEPALIVE 15 is expensive HOT 3
- Build error with standard example and no modification. HOT 1
- Make the publish function blocking HOT 1
- Subscribe Retain Flag HOT 3
- Async pushing of QOS0 and QOS2 HOT 2
- client.connect() blocks argon in SYSTEM_THREAD(ENABLED) HOT 2
- Facilitate PublishOnly uses HOT 1
- Connecting and specifying LWT HOT 2
- ESP8266 HOT 2
- Can't seem to get data via subscribe feed HOT 1
- REdbear duo
- Redbear
- QoS 2 eventually exceeded timeout and disconnecting HOT 6
- _client.connected bug stops loop HOT 4
- Particle.io WEB IDE: compile error for core @1.4.4 HOT 2
- Message truncated at 255 bytes even though max packet size is 512 in constructor HOT 3
- SparkplugB
- Connection timeout for attempting to connect to MQTT server? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqtt.