| For the vast number of sub-health, chronic diseases, aging population, a domestic scientific research unit developed an application named Xhealth based on intelligent device for fast and accurately detecting human vital signs. The user can know their health status at any time by using it. Because so many Xhealth users use the app nearly at the same time, vital signs data are produced with characteristics of high concurrency and large quantity. Vital signs data have high medical and economic value, so storing them is quite necessary. So how to build a suitable data storage platform for high concurrency and massive vital signs data has become an important research subject. This article has carried on the following work:1. Most of the traditional Web servers use multi-threading synchronous I/O. They will start a thread for each network connection. When concurrent requests to tens of thousands of growth, the memory will be soon run out of. In this paper, we use a single thread, event driven, asynchronous I/O Node.js to replace the traditional Web server. And develop Web application of data storage platform by the flexible, lightweight Express framework to handle HTTP requests of users. At the same time, we run on multiple Node program on several servers to build the application server cluster, with using Nginx server to average request on each Node in the cluster, to prevent the addition of single point of failure and improve the ability of handling the request of the system.2. At the same time, due to the traditional relational database has been unable to meet the requirements of high concurrency, huge amounts of data efficiently store and management, this paper adoptes a non-relational database MongoDB to store vital signs data. Mongo DB has a very high read/write performance and very good level extension ability at the same time.3. Deeply study the MongoDB’s replication and sharding. Analyze the composition and realize the function of replication, and put forward the optimization measures of replication. As for sharding, study the components and the principle of automatic sharding, present methods to avoid large blocks.4. Create the replica set. By saving a copy of the data to multiple servers, it enhances the usability of the database system. Establish the mongo database cluster and spread vital signs data storage to different shards. It improves the concurrent processing capability of database.In this paper, the main work is using the Node.js and MongoDB to build suitable data storage platform for high concurrency, mass vital signs data. Further study replication and sharding. |