cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Thingworx master select problem

Gavin2
8-Gravel

Thingworx master select problem

Hi all

I know thingworx server use zookeeper to select master

 

I start two thingworx server, and after that I check the data of znode on zookeeper, as bellow

 

2018-04-04 16_55_36-192.168.1.107_MQTT Broker - SecureCRT.png

 

2018-04-04 16_55_46-192.168.1.107_MQTT Broker - SecureCRT.png

 

I'm not sure how thingworx pickup a master in such kind of architecture,for example thingworx will read to the data of znode ,and chose the larger numbers of the two node'ip part?

 

can anybody tell me the operation process, 

 

Thanks a lot.

 

 

4 REPLIES 4
tschmitz
14-Alexandrite
(To:Gavin2)

Hi @Gavin2,

 

When starting up an HA environment, the first ThingWorx server to get a lock on the database is the Leader, and all others will be the Standby.  If you have a certain node you want to make sure is the Leader initially, start that one up first and wait until you see "System ownership locking complete" during the database initialization in the ApplicationLog.log.

 

Also, Zookeeper is not going to bring down a Leader that is currently operational.  If Server A is the initial Leader, goes down, Server B takes over, and then Server A is restarted, it will sit in standby until Server B goes down.

 

Regards,

Tony

 

 

 

 

 

 

Hi  tschmitz 

 

Thanks for your reply

 

So as you mentioned  above, I think ThingWorx use database lock to select the master .Under this circumstance, ThingWorx will use zookeeper to notify ServerB when ServerA goes down, and ServerB will use db lock again to pickup a new master. Is that right?

 

Also I want to know which table is used during master election, "system_ownership" ? 

 

Thanks again for you reply.


 

 

tschmitz
14-Alexandrite
(To:Gavin2)

Hi @Gavin2,

 

Sorry for the delayed response.  That's a good summary of what is going on.  Once ServerB has ownership of the database, it goes through the process to take over as leader.

 

system_ownership keeps track of who has/had ownership of the database.  

 

Are you thinking of configuring your own custom HA deployment?  Or just trying to get a better grasp on what's happening to see if it meets your company's business needs?

 

Regards,

Tony

Hi  tschmitz :

 

Thx for you reply. Yes, I want to figure out what is going on during master election of Thingworx server

 

Cause I've checked H/A deploy guide document and it says we solution should have its own mechanism for high availability to ensure the overall solution continues to operate even if failure occurs in the load balancing solution itself.

 

So I want to develop my own custom HA moudle based on Thingworx.

 

And my question is since Thingworx is already use zookeeper. why it still need an extra table(system_ownership) to record the master info. Because zk node can record the master-standby information and Thingworx server can check this infomation by zookeeper.

 

 

Announcements


Top Tags