Use of MongoDB
All filesystems that contain user data, including MongoDB filesystems and AWS S3 buckets, are encrypted using 256-bit AES
End-user data and metadata is stored in AWS S3 and MongoDB Atlas databases.
MongoDB is configured in a Primary/Secondary/Secondary "replica set" configuration (see this page for more info on MongoDB replica sets). In this configuration, if the primary goes down, the secondaries "vote" on who becomes the new primary. When the old primary comes back, it is told that a "vote" occurred, and it becomes a secondary.
All writes and reads are to the Primary. MongoDB handles making the two secondaries "eventually" consistent. In practice, secondaries are consistent within a second under normal circumstances.
MongoDB databases are deployed in the same fashion and redundancy as Tidepool services, in multiple data centers in the us-west-2
region of AWS for fault tolerance and continuity of operations.
Power, network, hardware and drive failures are to be expected. Services are designed to be fault-tolerant and self-healing where possible.
The content of the Tidepool Technical Documentation is licensed under a Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.