DEV Community

Cover image for πŸ’» Get started: MongoDB Cluster Infrastructure and Cryptographic Security πŸ’»
Danny Chan for MongoDB Builders

Posted on

πŸ’» Get started: MongoDB Cluster Infrastructure and Cryptographic Security πŸ’»

πŸ”’ Considerations for Managing Data Security:

  • Compliance and privacy regulations πŸ”
  • Penalties: Leaders fully aware of costs for storing and managing data πŸ’°
  • Scalability: Grow in the future, demand requires πŸš€
  • Legacy Infrastructure: Easily comply with data regulations πŸ‘¨β€πŸ’»
  • Flexibility: Meet regulations, grow in breadth and complexity 🧠
  • Cost: Manual processes, noncompliance πŸ’Έ


🌍 Zones in Sharded Clusters:

  • Sharding to deploy large data sets πŸ“Š
  • Create zones of sharded data based on the shard key πŸ—ΊοΈ


πŸ” Network Isolation and Access:

  • Virtual private cloud (VPC) πŸ›‘οΈ
  • Isolating data, systems πŸ”’
  • Highly available within each region ↔️
  • Each shard of data will have multiple nodes πŸ’»
  • Automatically and transparently failover for zero downtime ⚠️


🌐 Multi-Cloud Clusters:

  • AWS, Microsoft Azure, Google Cloud 🌍
  • Define a geographic location for each document πŸ“
  • Keep relevant data close to end users for regulatory compliance 🌍


πŸ”’ IP Whitelists:

  • Allow to specify a specific range of IP addresses to access πŸ”
  • Granular control over data πŸ”


πŸ”’ Queryable Encryption:

  • Encryption of sensitive data from client side, stored as fully randomized πŸ”
  • Without sacrificing performance πŸš€


🌍 MongoDB Atlas Global Clusters:

  • Control data deployment to specific geographical regions for fulfilling data policies and compliance 🌍


πŸ”’ Client-side Field-level Encryption:

  • Protect data while being transmitted, at rest and in use πŸ”’
  • Database never sees plaintext, but data remains queryable πŸ”
  • Privacy regulations (GDPR, CCPA, PII) 🌍
  • Make data unreadable, unrecoverable: in memory, at rest, in backups, in logs πŸ”’


πŸ”’ KMIP: Cryptographic Operations πŸ”’

  • Defines how key management operations and data exchange between client and servers πŸ”‘
  • Supports any KMIP-enabled key provider (e.g., AWS, Google Cloud, Azure) 🌍
  • Allows the use of custom in-house key management software πŸ’»


πŸ”’ Encrypted Data Example: πŸ”’

  1. MongoDB driver requests key from KMIP key provider (e.g., AWS) πŸ”‘
  2. Driver uses the key to encrypt the SSN number πŸ”’
  3. Driver submits the query to the database with the encrypted SSN number as ciphertext πŸ”’
  4. Database returns the encrypted query results to the driver πŸ”’
  5. Driver decrypts the query results using the keys πŸ”“


πŸ”’ Encrypted Data Advantages: πŸ”’

  • Reduces the risk of unauthorized access 🚫
  • Reduces the risk of sensitive data disclosure 🚫
  • Data is encrypted before leaving the application πŸ”’
  • Protects data over the network, in database memory, at rest in storage and backups, and in system logs πŸ”’



🌍 MongoDB Segmenting Data by Location with Sharded Clusters: 🌍



Challenges:

  • CPU and/or memory becomes overloaded πŸ”₯
  • Cannot respond to request traffic 🚦
  • Increase in database response time πŸ•°οΈ
  • Out of storage πŸ’½
  • Network interface is overloaded 🌐


Solution: Sharding πŸ”§

  • Horizontal scaling πŸš€
  • Additional database nodes (replicas) to share request traffic πŸ’»
  • Distributed across nodes in different regions for a balanced cluster 🌍
  • Create zones of sharded data based on the shard key πŸ—ΊοΈ
  • Associate each zone with one or more shards in the cluster πŸ”—


Sharding Details:

  • If additional database nodes go down, other nodes (replicas) can still serve read & write operations πŸ”
  • If additional database nodes go down, other nodes (replicas) can only serve read operations πŸ“–



Reference:

https://www.mongodb.com/library/mainframe-modernization/reference-architecture-mainframe-modernization?lb-mode=overlay
Reference Architecture: Mainframe Modernization

https://www.mongodb.com/solutions/solutions-library
Solutions Library


Editor

Image description

Danny Chan, specialty of FSI and Serverless

Image description

Kenny Chan, specialty of FSI and Machine Learning

Top comments (0)