SlideShare une entreprise Scribd logo
1  sur  43
MongoDBEurope2016
Old Billingsgate, London
15 Novembre
mongodb.com/europe
20% de discount avec le code RF20
Back to Basics 2016 : Webinar 6
Déploiement en production
Rémi Forest
Senior Solution Architect
3
Rappel des épisodes précédents
• Webinar 1 – Introduction à NoSQL
– Les différents types de bases NoSQL
– MongoDB comme base orientée Documents
• Webinar 2 – Votre première application MongoDB
– Création de database et de collections
– CRUD, indexes et explain
• Webinar 3 – Schema Design
– Modélisation de données avec MongoDB
• Webinar 4 – GeoSpatial and Text Indexes
• Webinar 5 – Introduction à l’Aggregation Framework
4
Déploiement en production
• Prendre un projet en phase de développement et le mettre à disposition des
utilisateurs finaux
• Du point de vue de la base de données, il faut garantir :
– Le monitoring
– Les performances
– La disponibilité de l’application
– Sauvegardes et disaster recovery
– La sécurité
Monitoring
Outils
• Command line:
– mongostat
– mongo shell
– logs
• Outils tiers:
– Nombreux plug-ins pour mongoDB
• MongoDB Cloud / Ops Manager
7
Mongostat
• Accès aux statistiques principales : CRUD / Mémoire / Réseau
• Se connecte à mongod ou mongos (sharded cluster)
• Une mesure par seconde
>mongostat -h localhost --port 27017
connected to: localhost:27017
insert query update delete getmore command flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn time
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:24
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:25
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:26
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:27
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:28
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:29
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:30
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:31
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.1% 0 0|0 0|0 62b 5k 2 09:08:32
*0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:33
8
Mongo shell
• Différentes commandes pour avoir des informations sur l’état de la base.
– db.serverStatus()
– db.stats()
– db.hostInfo()
– rs.status()
9
Logs
• Niveau de logging ajustable
> db.adminCommand( { setParameter:1, logLevel:1 } )
{ "was" : 0, "ok" : 1 }
• Informations sur :
– Performances
– Efficacité des indexes
– Opérations en cours
2016-08-31T13:55:02.047+0100 [conn7] update cms.articles query: { _id:
ObjectId('532198379fb5ba99a6bd4063') } update: { $inc: { comment_count: 1 }, $push: {
comments: { $each: [ { date: new Date(1399035302013), text: "Data locality provides an
amazing performance boost over relational" } ], $slice: -10, $sort: { date: 1 } } } }
nscanned:1 nscannedObjects:1 nmoved:1 nMatched:1 nModified:1 keyUpdates:0
numYields:0 locks(micros) w:33529 33ms
10
MongoDB Ops / Cloud Manager
– Déploiements en un clic, upgrades, tâches d’administration
… jusqu’à 90% de gain de temps vs. des opérations
manuelles
– Monitoring avec alerting, charts et tableaux de bord pour
plus de 100 métriques.
– Gestion des sauvegardes / restaurations avec “point-in-time
recovery” et support des clusters shardés
Architecture de Cloud/Ops Manager
Métriques et reporting
Visual Query Profiler
Intégration avec des outils tiers
Performances
Scalabilité Verticale (Scale Up)
Scalabilité horizontale (Scale Out)
18
Quand faut-il considérer le sharding ?
• Dès qu’une ressource constitue un goulet d’étranglement sur une machine
ou un replica set:
• RAM
• Disk IO
• Storage
• Concurrence
Exemple de limitation due à la RAM
20
Partitionnement des données
• Définition d’une clé de sharding
• La clé de sharding permet de partitionner l’espace des données présentes
• La clé de sharding doit exister dans tous les documents
21
Distribution des données
• 1 seul chuck à l’origine
• Taille max par défaut : 64MB
• Dès qu’un chunk dépasse 64MB, MongoDB split et migre les chunks
automatiquement
22
Qu’est-ce qu’un shard ?
• Un shard est un élément d’un cluster qui contient une partie des données de la base
• Un shard peut être un serveur stand-alone ou un replica set
Sharded infrastructure
Disponibilité
25
Disponibilité – Replica Sets
Node 1
Node 2 Node 3
26
Replica Set Initialisation
Node 1
Node 2 Node 3
Node 1
(Primary)
Node 2
(Secondary)
Node 3
(Secondary)
Replication Replication
Heartbeat
27
Node 2
(Secondary)
Node 3
(Secondary)
Heartbeat
Primary Election
Node 1
(Primary)
Replica Set - Failure
28
Node 1
(Primary)
Node 2
(Primary)
Node 3
(Secondary)
Heartbeat
Replication
Replica Set - Failover
29
Node 2
(Primary)
Node 3
(Secondary)
Heartbeat
Replication
Node 1
(Recovery)
Replication
Replica Set - Recovery
30
Node 2
(Primary)
Node 3
(Secondary)
Heartbeat
Replication
Node 1
(Secondary)
Replication
Replica Set - Recovered
Sauvegardes
32
Outils et techniques
• Copie des fichiers
• Files system snapshot
• mongodump & mongorestore
• Ops / Cloud Manager
33
Sauvegarde niveau fichier
• Copie de fichier (lent) ou file system snapshot (plus rapide)
• Attention à la cohérence des données !
• Sauvegarde “offline” uniquement :
– Arrêt des services
– db.fsyncLock() / db.fsyncUnlock() pour figer le disque (attention aux effets
de bord)
– Backup d’un serveur secondaire (recommandé)
• Gestion complexe pour les environnements shardés
34
mongodump / mongorestore
• Création d’un fichier .bson
• Stockage sur disque ou sur le réseau
• Utilisation de --oplog pour une sauvegarde à chaud
• Dump depuis un serveur secondaire recommandé
• Attention à la cohérence des shards pour les clusters !
35
Backup avec Ops / Cloud Manager
Replica Set Ops / Cloud Manager
Hidden
Replica
Block
Store
Continuous
backup Snapshots
36
Recovery
• Restauration depuis une sauvegarde
– Snapshot / mongodump / Cloud Manager
– Redémarrage du noeud
• Resynchronisation à partir d’un autre noeud
– Copie des fichiers
– Synchronisation via réseau
Sécurité
38
Data Security
• Utilisez systématiquement SSL pour toutes les connexions
• Créez des users, passwords et access roles pour toutes les databases
• Utilisez le chiffrement si vos bases contiennent des données sensibles
• Utilisez les fonctions d’audit si vous avez besoin d’assurer une traçabilité
• Ne rendez pas vos bases accessibles depuis n’importe où !
MIIEowIBAAKCAQEAzfaU58nhc1moUquCDTbXbwkXKmc3LIBGqd4FmCeV4cM+GIh1RVtKGan4d+XT
Ga6OkyFZn9wW/cug831AokFBn3CJYzrkGHR8dDvGN/G0jIS8ftnVl/r69weYphF/nd9Nu6J0cwzn
r1XY0sv+3vlfnNXTRtEiIYyI20fsWrvjDO/IDksE14XCHQxQC6cSJ4YuoD+X+5FncmZnEPIMBLoZ
W1SeTTYp+VSKkB7MnBQH+Bi711G5FuW7OekskUI/96TMr8GYA9gavBlgUmSHmADrTayXEe6KtgIf
N5byP3QJH8Cmi6VsLzmdTG8SPYu5N+0lzdDkisDdmCUTBgXkedaa6QIDAQABAoIBAGImUtmOdBij
LjqPLr+bVdi9DUQQwdM8IfCLNEFJA/z9LNdGGBSAJ3TJcfW5GPtRGvJ0XyB2IqK5ai7+jlGEJYCU
gXQ/OTmKMVC2t4Qrc+3Ox4Dv0ADIAta70Pu6tQUHyCRVi4bULIh6sYPq4L9jOTQlFbTWrpwsO3+7
659lkBK2SfUFh4p5h1zUujtjAF4qAH8CqerMNiMl0ZAmkmQPPRqiLVstGVG4RPJnaNug2EUlQYgZ
BH3+QFchLLIKZimY8EnRE0rSptUirzZej1BLgaPolt6kqajWm5GMxBbQwnEkk/dc5BMyD0wJsZTg
ezF+tJwQwWHqxKqYRQPaF0FOtgECgYEA+yxgSmDSqws6X4SnqwLFOWu+7dwJCGF0mrTXI8HHNA0D
mVymMJJQE3QGTSa0zHVsQ+cJ5ZM1Jrc+5lJMT1j2mfSObJFSHnBglXllb1utUsxv225UgK1q5mFy
lxXIVy1ZBs4qE9CaPnrJtSME7LmoV/sGnu1/aYXXaq1J2XXpFEECgYEA0evMaUwO7BkbQLvf3wG3
r1XY0sv+3vlfnNXTRtEiIYyI20fsWrvjDO/IDksE14XCHQxQC6cSJ4YuoD+X+5FncmZnEPIMBLoZ
W1SeTTYp+VSKkB7MnBQH+Bi711G5FuW7OekskUI/96TMr8GYA9gavBlgUmSHmADrTayXEe6KtgIf
N5byP3QJH8Cmi6VsLzmdTG8SPYu5N+0lzdDkisDdmCUTBgXkedaa6QIDAQABAoIBAGImUtmOdBij
LjqPLr+bVdi9DUQQwdM8IfCLNEFJA/z9LNdGGBSAJ3TJcfW5GPtRGvJ0XyB2IqK5ai7+jlGEJYCU
gXQ/OTmKMVC2t4Qrc+3Ox4Dv0ADIAta70Pu6tQUHyCRVi4bULIh6sYPq4L9jOTQlFbTWrpwsO3+7
659lkBK2SfUFh4p5h1zUujtjAF4qAH8CqerMNiMl0ZAmkmQPPRqiLVstGVG4RPJnaNug2EUlQYgZ
BH3+QFchLLIKZimY8EnRE0rSptUirzZej1BLgaPolt6kqajWm5GMxBbQwnEkk/dc5BMyD0wJsZTg
ezF+tJwQwWHqxKqYRQPaF0FOtgECgYEA+yxgSmDSqws6X4SnqwLFOWu+7dwJCGF0mrTXI8HHNA0D
mVymMJJQE3QGTSa0zHVsQ+cJ5ZM1Jrc+5lJMT1j2mfSObJFSHnBglXllb1utUsxv225UgK1q5mFy
MIIEowIBAAKCAQEAzfaU58nhc1moUquCDTbXbwkXKmc3LIBGqd4FmCeV4cM+GIh1RVtKGan4d+XT
Ga6OkyFZn9wW/cug831AokFBn3CJYzrkGHR8dDvGN/G0jIS8ftnVl/r69weYphF/nd9Nu6J0cwzn
Options de déploiement
40
Les différentes options de déploiement en production
• La plus simple – hardware et management assurés par MongoDB
– MongoDB Atlas
• Un peu moins simple – infrastructure de management gérée par MongoDB,
vous fournissez les serveurs (potentiellement dans le cloud)
– MongoDB Cloud Manager
• Un peu plus compliqué – vous gérez tout, mais avec de bons outils
– MongoDB Ops Manager
• Le plus compliqué – faire tout, tout seul, à la main
– https://docs.mongodb.com
41
En résumé
• Dimensionnez votre infrastructure en fonction de votre working set
• Privilégiez l’utilisation de replica sets
• Shardez uniquement quand vous en avez besoin, pas avant !
• Attention au choix de la clé de sharding
• Choisissez une solution de sauvegarde adaptée à votre besoin
• Soyez attentifs à la sécurité !
• En plus :
– Utilisez toujours les dernières releases de MongoDB
– Consultez-nous avant de passer en production ! La majorité des
problèmes sont liés à un manque d’expérience.
Questions?
Webinaire 6 de la série « Retour aux fondamentaux » : Déploiement en production

Contenu connexe

Tendances

Apache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésApache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésRomain Hardouin
 
DataStax Enterprise et Cas d'utilisation de Apache Cassandra
DataStax Enterprise et Cas d'utilisation de Apache CassandraDataStax Enterprise et Cas d'utilisation de Apache Cassandra
DataStax Enterprise et Cas d'utilisation de Apache CassandraVictor Coustenoble
 
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02Jérôme Mainaud
 
DataStax et Cassandra dans Azure au Microsoft Techdays
DataStax et Cassandra dans Azure au Microsoft TechdaysDataStax et Cassandra dans Azure au Microsoft Techdays
DataStax et Cassandra dans Azure au Microsoft TechdaysVictor Coustenoble
 
Bases de données NoSQL
Bases de données NoSQLBases de données NoSQL
Bases de données NoSQLSamy Dindane
 
Big data: NoSQL comme solution
Big data: NoSQL comme solutionBig data: NoSQL comme solution
Big data: NoSQL comme solutionJEMLI Fathi
 
Cassandra pour les développeurs java
Cassandra pour les développeurs javaCassandra pour les développeurs java
Cassandra pour les développeurs javaJérémy Sevellec
 
Big Data: Hadoop Map / Reduce sur Windows et Windows Azure
Big Data: Hadoop Map / Reduce sur Windows et Windows AzureBig Data: Hadoop Map / Reduce sur Windows et Windows Azure
Big Data: Hadoop Map / Reduce sur Windows et Windows AzureMicrosoft
 
Présentation de Apache Zookeeper
Présentation de Apache ZookeeperPrésentation de Apache Zookeeper
Présentation de Apache ZookeeperMichaël Morello
 
Les nouveautés de MongoDB 3.6
Les nouveautés de MongoDB 3.6Les nouveautés de MongoDB 3.6
Les nouveautés de MongoDB 3.6MongoDB
 
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...Valtech
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkAmal Abid
 
Quelles stratégies de Recherche avec Cassandra ?
Quelles stratégies de Recherche avec Cassandra ?Quelles stratégies de Recherche avec Cassandra ?
Quelles stratégies de Recherche avec Cassandra ?Victor Coustenoble
 
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -intro
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -introNosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -intro
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -introOlivier Mallassi
 
Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQLebiznext
 
Paris Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & ArchitectureParis Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & ArchitectureFlorian Hussonnois
 

Tendances (20)

noSQL
noSQLnoSQL
noSQL
 
Apache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalitésApache Cassandra - Concepts et fonctionnalités
Apache Cassandra - Concepts et fonctionnalités
 
DataStax Enterprise et Cas d'utilisation de Apache Cassandra
DataStax Enterprise et Cas d'utilisation de Apache CassandraDataStax Enterprise et Cas d'utilisation de Apache Cassandra
DataStax Enterprise et Cas d'utilisation de Apache Cassandra
 
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02
Introduction à Apache Cassandra — IppEvent chez OVH 2017-03-02
 
DataStax et Cassandra dans Azure au Microsoft Techdays
DataStax et Cassandra dans Azure au Microsoft TechdaysDataStax et Cassandra dans Azure au Microsoft Techdays
DataStax et Cassandra dans Azure au Microsoft Techdays
 
Bases de données NoSQL
Bases de données NoSQLBases de données NoSQL
Bases de données NoSQL
 
Tech day hadoop, Spark
Tech day hadoop, SparkTech day hadoop, Spark
Tech day hadoop, Spark
 
Big data: NoSQL comme solution
Big data: NoSQL comme solutionBig data: NoSQL comme solution
Big data: NoSQL comme solution
 
Cassandra pour les développeurs java
Cassandra pour les développeurs javaCassandra pour les développeurs java
Cassandra pour les développeurs java
 
Big Data: Hadoop Map / Reduce sur Windows et Windows Azure
Big Data: Hadoop Map / Reduce sur Windows et Windows AzureBig Data: Hadoop Map / Reduce sur Windows et Windows Azure
Big Data: Hadoop Map / Reduce sur Windows et Windows Azure
 
Présentation de Apache Zookeeper
Présentation de Apache ZookeeperPrésentation de Apache Zookeeper
Présentation de Apache Zookeeper
 
Les nouveautés de MongoDB 3.6
Les nouveautés de MongoDB 3.6Les nouveautés de MongoDB 3.6
Les nouveautés de MongoDB 3.6
 
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...
Valtech - NoSQL, solution alternative ou complémentaire aux bases de données ...
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - Spark
 
Quelles stratégies de Recherche avec Cassandra ?
Quelles stratégies de Recherche avec Cassandra ?Quelles stratégies de Recherche avec Cassandra ?
Quelles stratégies de Recherche avec Cassandra ?
 
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -intro
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -introNosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -intro
Nosql, hadoop, map reduce, hbase, sqoop, voldemort, cassandra -intro
 
Webinar Degetel DataStax
Webinar Degetel DataStaxWebinar Degetel DataStax
Webinar Degetel DataStax
 
Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQL
 
Paris Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & ArchitectureParis Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & Architecture
 
Les BD NoSQL
Les BD NoSQLLes BD NoSQL
Les BD NoSQL
 

En vedette

En vedette (16)

Mapa osea
Mapa oseaMapa osea
Mapa osea
 
Puc-rio da depressão
Puc-rio da depressãoPuc-rio da depressão
Puc-rio da depressão
 
8 de marzo
8 de marzo8 de marzo
8 de marzo
 
Componentes de la sangre
Componentes de la sangre Componentes de la sangre
Componentes de la sangre
 
Factoresdeproduccionroberto6 161025005448
Factoresdeproduccionroberto6 161025005448Factoresdeproduccionroberto6 161025005448
Factoresdeproduccionroberto6 161025005448
 
El bosque mirando. Forest looking.
El bosque mirando. Forest looking.El bosque mirando. Forest looking.
El bosque mirando. Forest looking.
 
Trabajofinalroberto
TrabajofinalrobertoTrabajofinalroberto
Trabajofinalroberto
 
El esqueleto humano
El esqueleto humanoEl esqueleto humano
El esqueleto humano
 
Bfi statistical yearbook 2014
Bfi statistical yearbook 2014Bfi statistical yearbook 2014
Bfi statistical yearbook 2014
 
Peixes osteíctes (osteichthyes) completo
Peixes osteíctes (osteichthyes)   completoPeixes osteíctes (osteichthyes)   completo
Peixes osteíctes (osteichthyes) completo
 
Arquitetura Cliente-Servidor - Modelos
Arquitetura Cliente-Servidor - ModelosArquitetura Cliente-Servidor - Modelos
Arquitetura Cliente-Servidor - Modelos
 
Incindentalomas nas tc de tórax
Incindentalomas nas tc de tóraxIncindentalomas nas tc de tórax
Incindentalomas nas tc de tórax
 
Trauma abdominal i
Trauma abdominal iTrauma abdominal i
Trauma abdominal i
 
Pâncreas
Pâncreas Pâncreas
Pâncreas
 
Elementos de Ecologia urbana, virginio bettini
Elementos de Ecologia urbana, virginio bettiniElementos de Ecologia urbana, virginio bettini
Elementos de Ecologia urbana, virginio bettini
 
Al-Tafaweq Co. LTD Aug-23-2015 red
Al-Tafaweq Co. LTD Aug-23-2015 redAl-Tafaweq Co. LTD Aug-23-2015 red
Al-Tafaweq Co. LTD Aug-23-2015 red
 

Similaire à Webinaire 6 de la série « Retour aux fondamentaux » : Déploiement en production

#OSSPARIS19 - Stream processing : de la base de données classique au streamin...
#OSSPARIS19 - Stream processing : de la base de données classique au streamin...#OSSPARIS19 - Stream processing : de la base de données classique au streamin...
#OSSPARIS19 - Stream processing : de la base de données classique au streamin...Paris Open Source Summit
 
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DR
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DRWebinar: Opérations pour votre application - Session 7 - Sauvegarde et DR
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DRMongoDB
 
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...MSDEVMTL
 
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...Normandy JUG
 
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...Publicis Sapient Engineering
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAPôle Systematic Paris-Region
 
SQLSaturday Paris 2014 - Monitoring et configuration SSAS
SQLSaturday Paris 2014 - Monitoring et configuration SSASSQLSaturday Paris 2014 - Monitoring et configuration SSAS
SQLSaturday Paris 2014 - Monitoring et configuration SSASGUSS
 
Déploiement ELK en conditions réelles
Déploiement ELK en conditions réellesDéploiement ELK en conditions réelles
Déploiement ELK en conditions réellesGeoffroy Arnoud
 
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...NUABEE
 
3 Microsoft Advanced Threat Analytics - Genève
3   Microsoft Advanced Threat Analytics - Genève3   Microsoft Advanced Threat Analytics - Genève
3 Microsoft Advanced Threat Analytics - GenèveaOS Community
 
Monter des environnements dev test efficaces avec Windows Azure
Monter des environnements dev test efficaces avec Windows AzureMonter des environnements dev test efficaces avec Windows Azure
Monter des environnements dev test efficaces avec Windows AzureMicrosoft Technet France
 
Methodologie et outils d optimisation php mysql
Methodologie et outils d optimisation php mysqlMethodologie et outils d optimisation php mysql
Methodologie et outils d optimisation php mysqlCodizy
 
MongoDB day Paris 2012
MongoDB day Paris 2012MongoDB day Paris 2012
MongoDB day Paris 2012FastConnect
 
Construire un data lake managé - GDG Paris - Juin 2019
Construire un data lake managé - GDG Paris - Juin 2019Construire un data lake managé - GDG Paris - Juin 2019
Construire un data lake managé - GDG Paris - Juin 2019Jean-Baptiste Claramonte
 
Les containers docker vu par un chef cuisinier et un mécanicien
Les containers docker vu par un chef cuisinier et un mécanicienLes containers docker vu par un chef cuisinier et un mécanicien
Les containers docker vu par un chef cuisinier et un mécanicienRachid Zarouali
 
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usages
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usagesInformatique CDC & la Suite Elastic : une seule suite pour de multiples usages
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usagesElasticsearch
 
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquée
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquéeDéveloppement d'un générateur d'intépréteur de bytecodes pour une JVM embarquée
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquéeMustapha Tachouct
 
MS Cloud Summit Paris 2017 - Azure Stack
MS Cloud Summit Paris 2017 - Azure StackMS Cloud Summit Paris 2017 - Azure Stack
MS Cloud Summit Paris 2017 - Azure StackBenoît SAUTIERE
 

Similaire à Webinaire 6 de la série « Retour aux fondamentaux » : Déploiement en production (20)

#OSSPARIS19 - Stream processing : de la base de données classique au streamin...
#OSSPARIS19 - Stream processing : de la base de données classique au streamin...#OSSPARIS19 - Stream processing : de la base de données classique au streamin...
#OSSPARIS19 - Stream processing : de la base de données classique au streamin...
 
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DR
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DRWebinar: Opérations pour votre application - Session 7 - Sauvegarde et DR
Webinar: Opérations pour votre application - Session 7 - Sauvegarde et DR
 
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
 
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
 
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...
XebiCon'17 : Monitoring et métrologie pour les conteneurs - Jean-Pascal Thie...
 
Lagom, reactive framework
Lagom, reactive frameworkLagom, reactive framework
Lagom, reactive framework
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
 
SQLSaturday Paris 2014 - Monitoring et configuration SSAS
SQLSaturday Paris 2014 - Monitoring et configuration SSASSQLSaturday Paris 2014 - Monitoring et configuration SSAS
SQLSaturday Paris 2014 - Monitoring et configuration SSAS
 
Déploiement ELK en conditions réelles
Déploiement ELK en conditions réellesDéploiement ELK en conditions réelles
Déploiement ELK en conditions réelles
 
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...
Nuabee : solution de Plan de Reprise d'Activité Cloud dans le Cloud public d'...
 
3 Microsoft Advanced Threat Analytics - Genève
3   Microsoft Advanced Threat Analytics - Genève3   Microsoft Advanced Threat Analytics - Genève
3 Microsoft Advanced Threat Analytics - Genève
 
Monter des environnements dev test efficaces avec Windows Azure
Monter des environnements dev test efficaces avec Windows AzureMonter des environnements dev test efficaces avec Windows Azure
Monter des environnements dev test efficaces avec Windows Azure
 
Methodologie et outils d optimisation php mysql
Methodologie et outils d optimisation php mysqlMethodologie et outils d optimisation php mysql
Methodologie et outils d optimisation php mysql
 
MongoDB day Paris 2012
MongoDB day Paris 2012MongoDB day Paris 2012
MongoDB day Paris 2012
 
Construire un data lake managé - GDG Paris - Juin 2019
Construire un data lake managé - GDG Paris - Juin 2019Construire un data lake managé - GDG Paris - Juin 2019
Construire un data lake managé - GDG Paris - Juin 2019
 
Les containers docker vu par un chef cuisinier et un mécanicien
Les containers docker vu par un chef cuisinier et un mécanicienLes containers docker vu par un chef cuisinier et un mécanicien
Les containers docker vu par un chef cuisinier et un mécanicien
 
graylog.pptx
graylog.pptxgraylog.pptx
graylog.pptx
 
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usages
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usagesInformatique CDC & la Suite Elastic : une seule suite pour de multiples usages
Informatique CDC & la Suite Elastic : une seule suite pour de multiples usages
 
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquée
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquéeDéveloppement d'un générateur d'intépréteur de bytecodes pour une JVM embarquée
Développement d'un générateur d'intépréteur de bytecodes pour une JVM embarquée
 
MS Cloud Summit Paris 2017 - Azure Stack
MS Cloud Summit Paris 2017 - Azure StackMS Cloud Summit Paris 2017 - Azure Stack
MS Cloud Summit Paris 2017 - Azure Stack
 

Plus de MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

Plus de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Webinaire 6 de la série « Retour aux fondamentaux » : Déploiement en production

  • 1. MongoDBEurope2016 Old Billingsgate, London 15 Novembre mongodb.com/europe 20% de discount avec le code RF20
  • 2. Back to Basics 2016 : Webinar 6 Déploiement en production Rémi Forest Senior Solution Architect
  • 3. 3 Rappel des épisodes précédents • Webinar 1 – Introduction à NoSQL – Les différents types de bases NoSQL – MongoDB comme base orientée Documents • Webinar 2 – Votre première application MongoDB – Création de database et de collections – CRUD, indexes et explain • Webinar 3 – Schema Design – Modélisation de données avec MongoDB • Webinar 4 – GeoSpatial and Text Indexes • Webinar 5 – Introduction à l’Aggregation Framework
  • 4. 4 Déploiement en production • Prendre un projet en phase de développement et le mettre à disposition des utilisateurs finaux • Du point de vue de la base de données, il faut garantir : – Le monitoring – Les performances – La disponibilité de l’application – Sauvegardes et disaster recovery – La sécurité
  • 6. Outils • Command line: – mongostat – mongo shell – logs • Outils tiers: – Nombreux plug-ins pour mongoDB • MongoDB Cloud / Ops Manager
  • 7. 7 Mongostat • Accès aux statistiques principales : CRUD / Mémoire / Réseau • Se connecte à mongod ou mongos (sharded cluster) • Une mesure par seconde >mongostat -h localhost --port 27017 connected to: localhost:27017 insert query update delete getmore command flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn time *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:24 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:25 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:26 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:27 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:28 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:29 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:30 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:31 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.1% 0 0|0 0|0 62b 5k 2 09:08:32 *0 *0 *0 *0 0 1|0 0 1.67g 5.78g 29m 0 .:0.0% 0 0|0 0|0 62b 5k 2 09:08:33
  • 8. 8 Mongo shell • Différentes commandes pour avoir des informations sur l’état de la base. – db.serverStatus() – db.stats() – db.hostInfo() – rs.status()
  • 9. 9 Logs • Niveau de logging ajustable > db.adminCommand( { setParameter:1, logLevel:1 } ) { "was" : 0, "ok" : 1 } • Informations sur : – Performances – Efficacité des indexes – Opérations en cours 2016-08-31T13:55:02.047+0100 [conn7] update cms.articles query: { _id: ObjectId('532198379fb5ba99a6bd4063') } update: { $inc: { comment_count: 1 }, $push: { comments: { $each: [ { date: new Date(1399035302013), text: "Data locality provides an amazing performance boost over relational" } ], $slice: -10, $sort: { date: 1 } } } } nscanned:1 nscannedObjects:1 nmoved:1 nMatched:1 nModified:1 keyUpdates:0 numYields:0 locks(micros) w:33529 33ms
  • 10. 10 MongoDB Ops / Cloud Manager – Déploiements en un clic, upgrades, tâches d’administration … jusqu’à 90% de gain de temps vs. des opérations manuelles – Monitoring avec alerting, charts et tableaux de bord pour plus de 100 métriques. – Gestion des sauvegardes / restaurations avec “point-in-time recovery” et support des clusters shardés
  • 14. Intégration avec des outils tiers
  • 18. 18 Quand faut-il considérer le sharding ? • Dès qu’une ressource constitue un goulet d’étranglement sur une machine ou un replica set: • RAM • Disk IO • Storage • Concurrence
  • 19. Exemple de limitation due à la RAM
  • 20. 20 Partitionnement des données • Définition d’une clé de sharding • La clé de sharding permet de partitionner l’espace des données présentes • La clé de sharding doit exister dans tous les documents
  • 21. 21 Distribution des données • 1 seul chuck à l’origine • Taille max par défaut : 64MB • Dès qu’un chunk dépasse 64MB, MongoDB split et migre les chunks automatiquement
  • 22. 22 Qu’est-ce qu’un shard ? • Un shard est un élément d’un cluster qui contient une partie des données de la base • Un shard peut être un serveur stand-alone ou un replica set
  • 25. 25 Disponibilité – Replica Sets Node 1 Node 2 Node 3
  • 26. 26 Replica Set Initialisation Node 1 Node 2 Node 3 Node 1 (Primary) Node 2 (Secondary) Node 3 (Secondary) Replication Replication Heartbeat
  • 27. 27 Node 2 (Secondary) Node 3 (Secondary) Heartbeat Primary Election Node 1 (Primary) Replica Set - Failure
  • 28. 28 Node 1 (Primary) Node 2 (Primary) Node 3 (Secondary) Heartbeat Replication Replica Set - Failover
  • 29. 29 Node 2 (Primary) Node 3 (Secondary) Heartbeat Replication Node 1 (Recovery) Replication Replica Set - Recovery
  • 30. 30 Node 2 (Primary) Node 3 (Secondary) Heartbeat Replication Node 1 (Secondary) Replication Replica Set - Recovered
  • 32. 32 Outils et techniques • Copie des fichiers • Files system snapshot • mongodump & mongorestore • Ops / Cloud Manager
  • 33. 33 Sauvegarde niveau fichier • Copie de fichier (lent) ou file system snapshot (plus rapide) • Attention à la cohérence des données ! • Sauvegarde “offline” uniquement : – Arrêt des services – db.fsyncLock() / db.fsyncUnlock() pour figer le disque (attention aux effets de bord) – Backup d’un serveur secondaire (recommandé) • Gestion complexe pour les environnements shardés
  • 34. 34 mongodump / mongorestore • Création d’un fichier .bson • Stockage sur disque ou sur le réseau • Utilisation de --oplog pour une sauvegarde à chaud • Dump depuis un serveur secondaire recommandé • Attention à la cohérence des shards pour les clusters !
  • 35. 35 Backup avec Ops / Cloud Manager Replica Set Ops / Cloud Manager Hidden Replica Block Store Continuous backup Snapshots
  • 36. 36 Recovery • Restauration depuis une sauvegarde – Snapshot / mongodump / Cloud Manager – Redémarrage du noeud • Resynchronisation à partir d’un autre noeud – Copie des fichiers – Synchronisation via réseau
  • 38. 38 Data Security • Utilisez systématiquement SSL pour toutes les connexions • Créez des users, passwords et access roles pour toutes les databases • Utilisez le chiffrement si vos bases contiennent des données sensibles • Utilisez les fonctions d’audit si vous avez besoin d’assurer une traçabilité • Ne rendez pas vos bases accessibles depuis n’importe où ! MIIEowIBAAKCAQEAzfaU58nhc1moUquCDTbXbwkXKmc3LIBGqd4FmCeV4cM+GIh1RVtKGan4d+XT Ga6OkyFZn9wW/cug831AokFBn3CJYzrkGHR8dDvGN/G0jIS8ftnVl/r69weYphF/nd9Nu6J0cwzn r1XY0sv+3vlfnNXTRtEiIYyI20fsWrvjDO/IDksE14XCHQxQC6cSJ4YuoD+X+5FncmZnEPIMBLoZ W1SeTTYp+VSKkB7MnBQH+Bi711G5FuW7OekskUI/96TMr8GYA9gavBlgUmSHmADrTayXEe6KtgIf N5byP3QJH8Cmi6VsLzmdTG8SPYu5N+0lzdDkisDdmCUTBgXkedaa6QIDAQABAoIBAGImUtmOdBij LjqPLr+bVdi9DUQQwdM8IfCLNEFJA/z9LNdGGBSAJ3TJcfW5GPtRGvJ0XyB2IqK5ai7+jlGEJYCU gXQ/OTmKMVC2t4Qrc+3Ox4Dv0ADIAta70Pu6tQUHyCRVi4bULIh6sYPq4L9jOTQlFbTWrpwsO3+7 659lkBK2SfUFh4p5h1zUujtjAF4qAH8CqerMNiMl0ZAmkmQPPRqiLVstGVG4RPJnaNug2EUlQYgZ BH3+QFchLLIKZimY8EnRE0rSptUirzZej1BLgaPolt6kqajWm5GMxBbQwnEkk/dc5BMyD0wJsZTg ezF+tJwQwWHqxKqYRQPaF0FOtgECgYEA+yxgSmDSqws6X4SnqwLFOWu+7dwJCGF0mrTXI8HHNA0D mVymMJJQE3QGTSa0zHVsQ+cJ5ZM1Jrc+5lJMT1j2mfSObJFSHnBglXllb1utUsxv225UgK1q5mFy lxXIVy1ZBs4qE9CaPnrJtSME7LmoV/sGnu1/aYXXaq1J2XXpFEECgYEA0evMaUwO7BkbQLvf3wG3 r1XY0sv+3vlfnNXTRtEiIYyI20fsWrvjDO/IDksE14XCHQxQC6cSJ4YuoD+X+5FncmZnEPIMBLoZ W1SeTTYp+VSKkB7MnBQH+Bi711G5FuW7OekskUI/96TMr8GYA9gavBlgUmSHmADrTayXEe6KtgIf N5byP3QJH8Cmi6VsLzmdTG8SPYu5N+0lzdDkisDdmCUTBgXkedaa6QIDAQABAoIBAGImUtmOdBij LjqPLr+bVdi9DUQQwdM8IfCLNEFJA/z9LNdGGBSAJ3TJcfW5GPtRGvJ0XyB2IqK5ai7+jlGEJYCU gXQ/OTmKMVC2t4Qrc+3Ox4Dv0ADIAta70Pu6tQUHyCRVi4bULIh6sYPq4L9jOTQlFbTWrpwsO3+7 659lkBK2SfUFh4p5h1zUujtjAF4qAH8CqerMNiMl0ZAmkmQPPRqiLVstGVG4RPJnaNug2EUlQYgZ BH3+QFchLLIKZimY8EnRE0rSptUirzZej1BLgaPolt6kqajWm5GMxBbQwnEkk/dc5BMyD0wJsZTg ezF+tJwQwWHqxKqYRQPaF0FOtgECgYEA+yxgSmDSqws6X4SnqwLFOWu+7dwJCGF0mrTXI8HHNA0D mVymMJJQE3QGTSa0zHVsQ+cJ5ZM1Jrc+5lJMT1j2mfSObJFSHnBglXllb1utUsxv225UgK1q5mFy MIIEowIBAAKCAQEAzfaU58nhc1moUquCDTbXbwkXKmc3LIBGqd4FmCeV4cM+GIh1RVtKGan4d+XT Ga6OkyFZn9wW/cug831AokFBn3CJYzrkGHR8dDvGN/G0jIS8ftnVl/r69weYphF/nd9Nu6J0cwzn
  • 40. 40 Les différentes options de déploiement en production • La plus simple – hardware et management assurés par MongoDB – MongoDB Atlas • Un peu moins simple – infrastructure de management gérée par MongoDB, vous fournissez les serveurs (potentiellement dans le cloud) – MongoDB Cloud Manager • Un peu plus compliqué – vous gérez tout, mais avec de bons outils – MongoDB Ops Manager • Le plus compliqué – faire tout, tout seul, à la main – https://docs.mongodb.com
  • 41. 41 En résumé • Dimensionnez votre infrastructure en fonction de votre working set • Privilégiez l’utilisation de replica sets • Shardez uniquement quand vous en avez besoin, pas avant ! • Attention au choix de la clé de sharding • Choisissez une solution de sauvegarde adaptée à votre besoin • Soyez attentifs à la sécurité ! • En plus : – Utilisez toujours les dernières releases de MongoDB – Consultez-nous avant de passer en production ! La majorité des problèmes sont liés à un manque d’expérience.

Notes de l'éditeur

  1. From mainframes, to RAC Oracle servers... People solved problems by adding more resources to a single machine.
  2. Large scale operation can be combined with high performance on commodity hardware through horizontal scaling Build - Document oriented database maps perfectly to object oriented languages Scale - MongoDB presents clear path to scalability that isn't ops intensive - Provides same interface for sharded cluster as single instance
  3. Indexes should be contained in working set.
  4. The data we write stays written and can survive disk, rack, power and data centre failures. Is resilient to underlying data corruption.
  5. Rs.initalise, election, primary defined. Heartbeat.
  6. mongodump -d cms -c articles connected to: myhost 2014-04-16T12:54:56.758+0100 DATABASE: cms to dump/cms 2014-04-16T12:54:56.759+0100 cms.articles to dump/cms/articles.bson 2014-04-16T12:54:56.816+0100 7 documents 2014-04-16T12:54:56.817+0100 Metadata for cms.articles to dump/cms/articles.metadata.json
  7. mongodump -d cms -c articles connected to: myhost 2014-04-16T12:54:56.758+0100 DATABASE: cms to dump/cms 2014-04-16T12:54:56.759+0100 cms.articles to dump/cms/articles.bson 2014-04-16T12:54:56.816+0100 7 documents 2014-04-16T12:54:56.817+0100 Metadata for cms.articles to dump/cms/articles.metadata.json