Reputation: 425
What architecture and application development best practices must be followed in order to scale a TWX application?
The majority of applications start with few devices but with time they quickly build up to thousands of devices. Once the amount of traffic is too much for one TWX instance what strategy should be followed? The same question applies when the front end is overwhelmed by the number of users.
Upvotes: 11
Views: 1045
Reputation: 1
With ThingWorx 9.0 release, the ThingWorx Foundation platform supports true horizontal scalability with an active-active clustering setup providing no single points of failure. The document here provides the details about the install and setup. There is also a ThingWorx 9.0 deployment architecture guide for an overview of all the architectural details.
ThingWorx High Availability Clustering setup image
Upvotes: 0
Reputation: 665
Anytime I have had ThingWorx architecture concerns, I have been redirected to the PTC ThingWorx guide linked below. I do not believe you need a PTC account to view it, but if so it is free.
ThingWorx 8 High Availability Administrators Guide http://support.ptc.com/WCMS/files/173281/en/ThingWorx_8_High_Availability_Administrators_Guide.pdf
In your case where you have big load concerns, the guide recommends using two ThingWorx instances to handle the load.
At least two ThingWorx instances are required for HA configuration. A single instance is started, which becomes leader and fully connects to the database. Standby servers boot up and can become the leader if needed, but they do not fully connect to the database or load information like the leader does. All ThingWorx servers have a service that is called by the load balancer, which indicates their availability. Different codes identify the leader, which receives traffic, and standby nodes, which do not receive traffic but may become leader.
High-Level Architecture example from the referenced guide:
The Load Balancer determines which ThingWorx instance is to be used by the user. Usually it is used to determine which is available in a redundant architecture (which is what makes it Highly Available). However, it can also be used to determine which to use based on performance. In PTC's HA Admin Guide, they use HAProxy (see page 47) as the Load Balancer. See Section 3.2 of the HAProxy Config Doc for how to configure based on performance.
Hope this helps! It is a pretty open-ended topic
Upvotes: 5