Server Configuration and System Architecture
// Smart Watches / GPS Locators / RFID / IoT Devices
Traxbean electronic monitoring system is a safety and health monitoring platform based on the SaaS architecture, designed to provide comprehensive monitoring solutions for care recipients. The platform mainly relies on smart watches, smart GPS locators, Bluetooth beacons, and IoT devices to monitor the real-time location information, behavior patterns, and health indicators of individuals.Our solutions include:
Community correction electronic monitoring: Monitoring for individuals serving sentences outside of prison.
Monitoring of personnel in construction sites, mines, and large venues.
Monitoring for the elderly and special populations.
Traxbean offers flexible service options, where customers can directly use our platform to provide services to their end customers, or choose private deployment. Whether using Traxbean's cloud servers or private deployment, we can provide highly customized services, including branding, login interfaces, national languages, and customization of specific functions and interface styles for customers. In addition, Traxbean not only provides a web login interface but also develops mobile applications and offers large-screen LED display solutions for customers with private deployments, widely used in call centers.
The Traxbean system adopts an advanced distributed design concept, with strong flexibility and scalability, supporting millions of concurrent connections, and can simultaneously serve thousands of enterprises, making it an ideal choice for large-scale electronic monitoring platforms. In private deployment scenarios, all components and databases can be installed on a single server, reducing costs and maintenance complexity.
Furthermore, Traxbean can also provide RESTful APIs for third-party platforms or mobile applications, simplifying the system integration process for customers and facilitating seamless integration with other systems.
Traxbean Personnel Intelligent Positioning Platform
According to the carrying requirements of different smart watches and IoT devices, the Traxbean electronic monitoring system can be deployed on a single server when the number of devices is small and the user base is not large. The system architecture mainly consists of three core modules:
1. Gateway: responsible for communicating with smart watches and IoT devices to ensure real-time data transmission.
2. API: serves as the core layer of the database and business logic, with all services interacting through this module.
3. Application: provides a management interface and business processes for users to operate and monitor.
The entire system is developed based on Node.js, using TypeScript as the development language. The business database uses MySQL, while Redis is introduced for queue and cache management to optimize performance. In addition, MongoDB is used to store device-related data, including location data, status data, health data, and alarm data. MongoDB is the database with the highest data access frequency and query volume, and the system design takes into account the need for efficient queries and flexible and secure long-term data storage.
Single Server Deployment Method for Platform Software
Traxbean electronic monitoring system is platform-independent software that can run on Linux and Windows servers. Taking the example of supporting 5000 smartwatches (80% simultaneous online rate), the recommended server configurations are as follows:
Windows Server:
- CPU: 8 cores ≥ 2.5 GHz, Memory: ≥ 32 GB, SSD hard drive ≥ 500 GB, IOPS ≥ 5000, Operating System: Windows Server 2016 or above.
- Software: Node.js, PM2, Nginx, MySQL, MongoDB, Redis.
Linux Server:
- CPU: 8 cores ≥ 2.5 GHz, Memory: ≥ 32 GB, SSD hard drive ≥ 500 GB, IOPS ≥ 5000, Operating System: Ubuntu 20.04 or above, or CentOS 8.0 or above.
- Software: Node.js, PM2, Nginx, MySQL, MongoDB, Redis.
This configuration ensures efficient system operation and meets the requirement of storing historical data for six months.
Platform Server Requirements
We mainly serve professional clients who need to manage a large number of online devices, such as smartwatches and other IoT devices. As a result, clients often deploy three or more servers to run the Traxbean platform to ensure higher concurrent connection numbers, while also considering data backup, disaster recovery, and fast fault recovery.
Although this architecture is complex and cannot be detailed in one article, we can provide a rough deployment plan. We recommend deploying the database, gateway, and application separately on three different servers. The API component is installed on the server where the main database is located to improve data access efficiency and simplify maintenance. The gateway server also installs MongoDB and Redis because the gateway needs to handle queue services and a large amount of device uplink data, which can improve processing efficiency.
This three-server architecture configuration is similar to the aforementioned server configuration and can handle concurrent connection numbers 3-5 times that of a single server. For more details, please consult our engineers.
Distributed deployment of multi-server architecture
When it is necessary to manage a higher number of concurrently online devices, the architecture of a single server or three servers may not effectively handle the huge data throughput. Continuing to use this architecture may lead to system crashes, increased data latency, and significantly decreased query speeds. Therefore, we need to start from the gateway side to address these issues.
We will introduce a load balancer to distribute massive data throughput to multiple servers for processing. The introduction of a load balancer allows us to dynamically scale servers based on the increase in the number of online devices without affecting the normal operation of the system. This dynamic scaling capability enhances the flexibility and scalability of the system.
To further accelerate data processing efficiency, the MongoDB storing device data will be deployed on the same server as the gateway. MongoDB will form a replica set with other MongoDB instances through Replica Set. This configuration not only enhances data redundancy and availability but also significantly improves the efficiency of querying data at the application layer, ensuring that the system can still respond quickly under high loads. This architectural design combines load balancing and efficient data storage solutions to meet the needs of large-scale device management.
Load balancing at the gateway layer to support high concurrency processing capabilities
When the Traxbean platform faces more complex issues, such as serving global customers, handling massive online devices, and meeting customer demands from different countries and regions, relying solely on a set of load balancers is not enough to meet these requirements. Therefore, we need to deploy data centers on every continent to ensure that each region has servers for efficient data processing.
Receiving data in local data centers can significantly improve response speed and data transfer efficiency. By building a replication set architecture between various data centers through a backbone network, we can achieve real-time data synchronization. This architecture ensures the timeliness of global data and avoids data loss due to network delays. For example, when a user in an Asian branch queries data located in Europe, the replication set architecture can effectively reduce query latency and improve overall system performance.
Furthermore, adopting this distributed architecture enhances the system's fault tolerance and scalability, supporting the dynamic addition of servers to cope with the growing number of online devices and user requests. The combination of high-bandwidth connections between data centers and load balancer configurations enables the entire system to flexibly meet the needs of different regions, ensuring the efficiency and stability of data processing. The overall architecture design is shown in the diagram.
Global cross-continent multi-data center distributed architecture design
In a scenario where a group manages a large number of online devices, users may be distributed across different regions and time zones, frequently querying data. Therefore, in addition to ensuring that the gateway receiving device data has efficient load balancing capabilities, our design also needs to include application-layer load balancing.
At the application layer, we not only need a load balancer to intelligently distribute requests to different servers, but also need to localize data processing as much as possible to reduce latency. For frequently queried data, we will adopt a read-write separation architecture, with the main database handling write operations and the slave database focusing on read requests. This approach ensures data consistency, improves query efficiency through data redundancy, and ensures that the system can respond quickly even under high concurrency.
In addition, considering the need to store a large number of images and video files in the system, we must optimize the file management strategy. It is not feasible to directly synchronize files to various application servers behind the load balancer quickly. Therefore, we will introduce an object storage solution (such as AWS S3 or similar services) to store and manage large files. This not only reduces the burden on application servers but also improves file access speed through a CDN (Content Delivery Network), ensuring that users can quickly download and view media content in any region.
In summary, our design not only focuses on efficient data processing and load balancing but also comprehensively considers the optimization of file management and storage to build an efficient, flexible, and globally responsive system architecture.
Integration Architecture of Application Layer Load Balancing and CDN
ThinkRace is an intelligent watch manufacturing factory. Although we are not a traditional software company, after more than ten years of hard work and perseverance, we have participated in hundreds of large projects, including important events such as the Special Olympics. Our partners are spread all over the world, closely cooperating with more than 20 telecommunications operators. Our products and software have been widely used in over 50 countries, including some countries' health and justice departments.
Throughout this process, we have always believed that protecting the safety and health of workers is our mission and responsibility. Our products and software help manage hundreds of construction sites, ensuring that the safety of every worker is taken care of and guaranteed. This is not only our business but also our commitment to society. When facing challenges, we always remember our original intention and strive to improve the quality of work because we deeply understand that this concerns everyone's life and health.
Although we may not be the best software company in the industry and may not achieve perfection in documentation and design, we believe that it is this dedication to our mission and the responsibility to society that makes us the most dedicated team in this field. We will continue to work hard, pursue excellence, and strive tirelessly to create a safer and healthier future.
Global Cross-Continent Multi-Data Center Distributed Architecture Design