Kamsky / Hartnett / Bevilacqua | High Performance with MongoDB | E-Book | www.sack.de
E-Book

E-Book, Englisch, 410 Seiten

Kamsky / Hartnett / Bevilacqua High Performance with MongoDB

Best practices for performance tuning, scaling, and architecture
1. Auflage 2025
ISBN: 978-1-83702-262-5
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Best practices for performance tuning, scaling, and architecture

E-Book, Englisch, 410 Seiten

ISBN: 978-1-83702-262-5
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



With data as the new competitive edge, performance has become the need of the hour. As applications handle exponentially growing data and user demand for speed and reliability rises, three industry experts distill their decades of experience to offer you guidance on designing, building, and operating databases that deliver fast, scalable, and resilient experiences.
MongoDB's document model and distributed architecture provide powerful tools for modern applications, but unlocking their full potential requires a deep understanding of architecture, operational patterns, and tuning best practices. This MongoDB book takes a hands-on approach to diagnosing common performance issues and applying proven optimization strategies from schema design and indexing to storage engine tuning and resource management.
Whether you're optimizing a single replica set or scaling a sharded cluster, this book provides the tools to maximize deployment performance. Its modular chapters let you explore query optimization, connection management, and monitoring or follow a complete learning path to build a rock-solid performance foundation. With real-world case studies, code examples, and proven best practices, you'll be ready to troubleshoot bottlenecks, scale efficiently, and keep MongoDB running at peak performance in even the most demanding production environments.

Kamsky / Hartnett / Bevilacqua High Performance with MongoDB jetzt bestellen!

Weitere Infos & Material


Contents


  1. Acknowledgements
  2. Preface
    1. How this book will help you
    2. Who this book is for
    3. What this book covers
    4. To get the most out of this book
    5. Get in touch
  3. Systems and MongoDB Architecture
    1. What are systems?
    2. Characteristics of systems
      1. Changing systems is a risky business
      2. A system with no delays is simple
      3. A system with delays can behave in unexpected ways
      4. Trying to fix oscillations
      5. Systems surprise us
    3. A typical software system
      1. Algorithmic efficiency (complexity)
      2. Avoid premature optimization
      3. Amdahl’s law (limit of parallel speedup)
      4. Locality and caching
      5. Little’s law (throughput versus latency)
    4. Understanding MongoDB architecture
      1. The document model: MongoDB’s foundation
      2. Key architectural components of MongoDB
    5. The data services system
      1. Query engine
      2. Storage engine/WiredTiger
      3. Libraries
      4. Other system components that mongod uses
    6. Managing complexity in modern data platforms
      1. Flexible data model with rigorous capabilities
      2. Built-in redundancy and resilience
      3. Horizontal scaling with intelligent distribution
    7. Performance tools
      1. Finding bottlenecks
      2. An incremental process for optimization
    8. Summary
    9. References
  4. Schema Design for Performance
    1. Understanding the core principles of schema design
      1. There is no single right way
      2. Data collocation
      3. Read and write trade-offs
      4. Small versus large documents
      5. Common myths
    2. Key strengths of the MongoDB schema design
      1. One-to-many relationships
      2. Embedding weak entities
      3. Dynamic attributes
      4. Caches and snapshots
      5. Optimization for common use cases
      6. Schema evolution
    3. Schema validation
      1. Common schema design mistakes
        1. Overnormalizing
        2. Overembedding
        3. Other common anti-patterns
      2. Schema design patterns by benefit
        1. Patterns for read performance optimization
        2. Patterns for write performance optimization
        3. Patterns for query and analytics optimization
        4. Archive pattern for storage optimization
    4. Real-world application: The Socialite app
      1. Scenario 1: User profile and activity feed
      2. Scenario 2: Chat system
    5. Summary
  5. Indexes
    1. Introduction to indexes
      1. What is an index?
      2. Resource efficiency and trade-offs
      3. Resource usage
      4. Common misconceptions about indexes in MongoDB
    2. Types of indexes in MongoDB
      1. Single-field indexes
      2. Compound indexes
      3. Multikey indexes
      4. Sparse indexes
      5. Wildcard indexes
      6. Partial indexes
    3. Designing efficient indexes
      1. Cardinality and selectivity
      2. Constructing compound indexes
      3. Equality queries
      4. Sorts and range queries
      5. The ESR guideline
      6. Maximizing resources with partial indexes
      7. Covered queries: the performance holy grail
      8. Ascending versus descending index order
      9. Indexing and aggregation pipelines
    4. Summary
  6. Aggregations
    1. MongoDB’s aggregation framework
      1. Core concepts of the aggregation pipeline
      2. Performance considerations
        1. Aggregation pipeline flow
        2. Optimizing aggregation pipelines
    2. Optimization techniques
      1. Filter data early
      2. Avoid unnecessary $unwind and $group
      3. Design efficient $group operations
      4. Avoid common $lookup performance issues
      5. Efficient use of $project and $addFields
    3. Working with large datasets
      1. Aggregation pipeline limits
      2. Managing memory constraints with allowDiskUse
    4. Aggregation in distributed environments
      1. Optimizing aggregation for sharded collections
      2. Understanding shard-local versus merged operations
      3. Monitoring and profiling aggregation performance
      4. Utilizing materialized views
    5. Summary
  7. Replication
    1. Understanding MongoDB replica sets
      1. Components of a replica set
      2. Replication and high availability
      3. Understanding the MongoDB election process
    2. Replica set configuration
      1. Chained replication
      2. Replica set tags and analytics nodes
    3. Replication internals and performance
      1. Flow control
      2. Replication and the oplog
      3. Managing replication lag
    4. Read and write strategies
      1. Read preference
      2. Write concern and durability
    5. Summary
  8. Sharding
    1. Understanding core sharding architecture
      1. Architectural components of a sharded cluster
      2. Sharding a collection and selecting a shard key
      3. Why scatter-gather is bad
    2. Strategic shard key selection
      1. Shard key for targeting operations
      2. Shard key with good granularity
      3. Avoid increasing or decreasing shard key values
    3. Types of sharding
      1. Range-based sharding
      2. Hashed sharding
      3. Zone-based sharding
    4. Advanced sharding administration
      1. Resharding: Whether, when, and how
      2. Balancer considerations
      3. Pre-splitting: Whether, when, and how
      4. Moving unsharded collections
      5. Colocating sharded collection chunks together
      ...



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.