SlideShare ist ein Scribd-Unternehmen logo
1 von 74
Downloaden Sie, um offline zu lesen
MongoDB



                   Masakazu Matsushita
                           @matsukaz
2011   7   28
•              @matsukaz

                •
                • Ameba Pico
                • DevLOVE
2011   7   28
2011   7   28
Ameba Pico
       •
       • 2010   3




2011   7   28
(2011   7   )

       •             390    MAU 60

       • 10     20

       •        3:7

       •
2011   7   28
2011   7   28
• MongoDB
                • Ameba Pico
                • MongoDB
2011   7   28
MongoDB


2011   7   28
Document-oriented storage
       •
       • BSON                       (Binary JSON)
                > db.users.save( { name : "hoge", age : 20 } )
                > db.users.save( { name : "fuga" } )

                > db.users.find()
                { "_id" : ObjectId("4d6b7ef5934c0000000053a4"),
                      "name" : "hoge", "age" : 20 }
                { "_id" : ObjectId("4d6b7f06934c0000000053a5"),
                      "name" : "fuga" }
2011   7   28
Full Index Support
       •
                Index

       • Unique Index         Index




2011   7   28
Replication
       • ReplicaSet
                                mongod
                               Member 1
                              (PRIMARY)




                    mongod                    mongod
                   Member 2                  Member 3
                (SECONDARY)               (SECONDARY)




2011   7   28
Replication
       • ReplicaSet
                              mongod
                             Member 1
                             (DOWN)




                   mongod                   mongod
                  Member 2                 Member 3
                 (PRIMARY)              (SECONDARY)




2011   7   28
Replication
       • ReplicaSet
                                 mongod
                                Member 1
                             (RECOVERING)




                   mongod                       mongod
                  Member 2                     Member 3
                 (PRIMARY)                  (SECONDARY)




2011   7   28
Replication
       • ReplicaSet
                                 mongod
                                Member 1
                             (SECONDARY)




                   mongod                      mongod
                  Member 2                    Member 3
                 (PRIMARY)                 (SECONDARY)




2011   7   28
Auto-Sharding
       •                            Shard Key
                Shard 1

                 users

                   name1    name2    name3

                   name4    name5    name6

                   name7    name8    name9


                 items
                    item1   item2    item3



2011   7   28
Auto-Sharding
       •                            Shard Key
                Shard 1                         Shard 2

                 users

                   name1    name2    name3

                   name4    name5    name6

                   name7    name8    name9


                 items
                    item1   item2    item3



2011   7   28
Auto-Sharding
       •                            Shard Key
                Shard 1                         Shard 2

                 users                           users

                   name1    name2    name3         name7   name8    name9

                   name4    name5    name6

                   name7    name8    name9


                 items
                    item1   item2    item3                             Chunk
                                             (Shard Key            Range)
2011   7   28
Auto-Sharding
       •                               Shard Key
                Shard 1                                  Shard 2

                 users                                    users

                   name1       name2    name3               name7    name8     name9

                   name4       name5    name6


                 items                                    mongos
                    item1      item2    item3



                     client
                      client                    mongos                       mongoc
                                                             Shard
2011   7   28
Ameba Pico



2011   7   28
2011            1                               Shard 1
                                                                                         mongoc
                                                          mongos
                                                          mongod         mongod          mongod

                                                Shard 2
   Web                     Socket                         mongos                         mongoc
                                                          mongod         mongod          mongod

                                                Shard 3
                                                          mongos                         mongoc
                                                          mongod         mongod          mongod
                           (memcached)




     LB             ID/Point/
  (HAProxy)                          MySQL
EC2
           m2.2xlarge (Mem 34.2GB / 13 EC2CU)
           c1.xlarge (Mem 7GB / 20 EC2CU)
           m1.large (Mem 7.5GB / 4 EC2CU)
           c1.medium (Mem 1.7GB / 5 EC2CU)
           m1.small (Mem 1.7GB / 1 EC2CU)        EBS      S3       CloudFront     Elastic MapReduce
2011   7   28
2011            3                               Shard 1
                                                                                         mongoc
                                                          mongos
                                                          mongod         mongod          mongod

                                                Shard 2
   Web                     Socket                         mongos                         mongoc
                                                          mongod         mongod          mongod

                                                Shard 3
                                                          mongos                         mongoc
                                                          mongod         mongod          mongod
                           (memcached)
                                                Shard 4
                                                          mongos
                                                          mongod         mongod          mongod

     LB             ID/Point/
  (HAProxy)                          MySQL
EC2
           m2.2xlarge (Mem 34.2GB / 13 EC2CU)
           c1.xlarge (Mem 7GB / 20 EC2CU)
           m1.large (Mem 7.5GB / 4 EC2CU)
           c1.medium (Mem 1.7GB / 5 EC2CU)
           m1.small (Mem 1.7GB / 1 EC2CU)        EBS      S3       CloudFront     Elastic MapReduce
2011   7   28
2011            5                               Shard 1
                                                                                         mongoc
                                                          mongos
                                                          mongod         mongod          mongod

                                                Shard 2
   Web                     Socket                         mongos                         mongoc
                                                          mongod         mongod          mongod

                                                Shard 3
                                                          mongos                         mongoc
                                                          mongod         mongod          mongod
                           (memcached)
                                                Shard 4
                                                          mongos
                                                          mongod         mongod          mongod

     LB             ID/Point/                   Shard 5
  (HAProxy)                          MySQL
                                                          mongod         mongod          mongod
EC2
           m2.2xlarge (Mem 34.2GB / 13 EC2CU)   Shard 6
           c1.xlarge (Mem 7GB / 20 EC2CU)
           m1.large (Mem 7.5GB / 4 EC2CU)                 mongod         mongod          mongod
           c1.medium (Mem 1.7GB / 5 EC2CU)
           m1.small (Mem 1.7GB / 1 EC2CU)        EBS      S3       CloudFront     Elastic MapReduce
2011   7   28
2011            7                                Shard 1
                                                                                          mongoc
                                                           mongod         mongod          mongod

           mongos               mongos           Shard 2
   Web                     Socket                                                         mongoc
                                                           mongod         mongod          mongod

                                                 Shard 3
           mongos                                                                         mongoc
                                                           mongod         mongod          mongod
                           (memcached)
                                                 Shard 4

                                                           mongod         mongod          mongod

     LB             ID/Point/                    Shard 5
  (HAProxy)                              MySQL
                                                           mongod         mongod          mongod
EC2
           m2.2xlarge (Mem 34.2GB / 13 EC2CU)    Shard 6
           c1.xlarge (Mem 7GB / 20 EC2CU)
           m1.large (Mem 7.5GB / 4 EC2CU)                  mongod         mongod          mongod
           c1.medium (Mem 1.7GB / 5 EC2CU)
           m1.small (Mem 1.7GB / 1 EC2CU)         EBS      S3       CloudFront     Elastic MapReduce
2011   7   28
MongoDB



2011   7   28
2011 2


2011   7   28
2011   7   28
2011   7   28
mongod
                Repair

2011   7   28
2011   7   28
2011   7   28
2011 3


2011   7   28
Shard

2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28
http://www.flickr.com/photos/andreasmarx/190619661/
2011   7   28
6



2011   7   28
2011 5


2011   7   28
Shard
                2

2011   7   28
OFF

2011   7   28
MongoDB

2011   7   28
2011   7   28
2011   7   28
2011   7   28
2   Shard



2011   7   28
2011   7   28
2011   7   28
2011 6


2011   7   28
mongos

2011   7   28
2011   7   28
2011 7


2011   7   28
MongoDB


                1.6.5 → 1.8.2

2011   7   28
2011   7   28
2011   7   28
chunk


                    chunk

2011   7   28
http://www.flickr.com/photos/madhorse5/415958992/
2011   7   28
2011   7   28
4   Shard



2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28
Shard 2
       EC2


2011   7   28
30
       Repair

2011   7   28
2011   7   28
mongod
                1

2011   7   28
2011   7   28
2011   7   28
2011   7   28
2011   7   28

Weitere ähnliche Inhalte

Was ist angesagt?

Mongo dbを知ろう
Mongo dbを知ろうMongo dbを知ろう
Mongo dbを知ろうCROOZ, inc.
 
Grafana Dashboards as Code
Grafana Dashboards as CodeGrafana Dashboards as Code
Grafana Dashboards as CodeTakuhiro Yoshida
 
ビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分けビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分けRecruit Technologies
 
MongoDB〜その性質と利用場面〜
MongoDB〜その性質と利用場面〜MongoDB〜その性質と利用場面〜
MongoDB〜その性質と利用場面〜Naruhiko Ogasawara
 
Where狙いのキー、order by狙いのキー
Where狙いのキー、order by狙いのキーWhere狙いのキー、order by狙いのキー
Where狙いのキー、order by狙いのキーyoku0825
 
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介IBM Analytics Japan
 
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システムMySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システムKouhei Sutou
 
まずやっとくPostgreSQLチューニング
まずやっとくPostgreSQLチューニングまずやっとくPostgreSQLチューニング
まずやっとくPostgreSQLチューニングKosuke Kida
 
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜Takahiro Inoue
 
MQTTとAMQPと.NET
MQTTとAMQPと.NETMQTTとAMQPと.NET
MQTTとAMQPと.NETterurou
 
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるGoのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるpospome
 
マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!mosa siru
 
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニックinfinite_loop
 
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)NTT DATA OSS Professional Services
 
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...NTT DATA Technology & Innovation
 
RLSを用いたマルチテナント実装 for Django
RLSを用いたマルチテナント実装 for DjangoRLSを用いたマルチテナント実装 for Django
RLSを用いたマルチテナント実装 for DjangoTakayuki Shimizukawa
 
あなたの知らないPostgreSQL監視の世界
あなたの知らないPostgreSQL監視の世界あなたの知らないPostgreSQL監視の世界
あなたの知らないPostgreSQL監視の世界Yoshinori Nakanishi
 
MongoDBのアレをアレする
MongoDBのアレをアレするMongoDBのアレをアレする
MongoDBのアレをアレするAkihiro Kuwano
 

Was ist angesagt? (20)

Mongo dbを知ろう
Mongo dbを知ろうMongo dbを知ろう
Mongo dbを知ろう
 
Grafana Dashboards as Code
Grafana Dashboards as CodeGrafana Dashboards as Code
Grafana Dashboards as Code
 
ビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分けビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分け
 
MongoDB〜その性質と利用場面〜
MongoDB〜その性質と利用場面〜MongoDB〜その性質と利用場面〜
MongoDB〜その性質と利用場面〜
 
Where狙いのキー、order by狙いのキー
Where狙いのキー、order by狙いのキーWhere狙いのキー、order by狙いのキー
Where狙いのキー、order by狙いのキー
 
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
 
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システムMySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
 
まずやっとくPostgreSQLチューニング
まずやっとくPostgreSQLチューニングまずやっとくPostgreSQLチューニング
まずやっとくPostgreSQLチューニング
 
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
 
MQTTとAMQPと.NET
MQTTとAMQPと.NETMQTTとAMQPと.NET
MQTTとAMQPと.NET
 
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考えるGoのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
Goのサーバサイド実装におけるレイヤ設計とレイヤ内実装について考える
 
マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!
 
ヤフー社内でやってるMySQLチューニングセミナー大公開
ヤフー社内でやってるMySQLチューニングセミナー大公開ヤフー社内でやってるMySQLチューニングセミナー大公開
ヤフー社内でやってるMySQLチューニングセミナー大公開
 
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
 
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)
Apache Sparkに手を出してヤケドしないための基本 ~「Apache Spark入門より」~ (デブサミ 2016 講演資料)
 
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...
1日5分でPostgreSQLに詳しくなるアプリの開発 ~PostgRESTを使ってみた~(第38回PostgreSQLアンカンファレンス@オンライン 発...
 
GitLab から GitLab に移行したときの思い出
GitLab から GitLab に移行したときの思い出GitLab から GitLab に移行したときの思い出
GitLab から GitLab に移行したときの思い出
 
RLSを用いたマルチテナント実装 for Django
RLSを用いたマルチテナント実装 for DjangoRLSを用いたマルチテナント実装 for Django
RLSを用いたマルチテナント実装 for Django
 
あなたの知らないPostgreSQL監視の世界
あなたの知らないPostgreSQL監視の世界あなたの知らないPostgreSQL監視の世界
あなたの知らないPostgreSQL監視の世界
 
MongoDBのアレをアレする
MongoDBのアレをアレするMongoDBのアレをアレする
MongoDBのアレをアレする
 

Mehr von Masakazu Matsushita

It's up to you 〜 楽しさドリブンで歩んだ道 〜
It's up to you 〜 楽しさドリブンで歩んだ道 〜It's up to you 〜 楽しさドリブンで歩んだ道 〜
It's up to you 〜 楽しさドリブンで歩んだ道 〜Masakazu Matsushita
 
スタートアップで培ったアーキテクチャ設計ノウハウ
スタートアップで培ったアーキテクチャ設計ノウハウスタートアップで培ったアーキテクチャ設計ノウハウ
スタートアップで培ったアーキテクチャ設計ノウハウMasakazu Matsushita
 
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のりMasakazu Matsushita
 
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-EFS利用事例 -Craft Warriorsのバトルを支える仕組み-
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-Masakazu Matsushita
 
TranslimitにおけるAWS活用術
TranslimitにおけるAWS活用術TranslimitにおけるAWS活用術
TranslimitにおけるAWS活用術Masakazu Matsushita
 
Interactive buttonsを利用したbotをつくってみた
Interactive buttonsを利用したbotをつくってみたInteractive buttonsを利用したbotをつくってみた
Interactive buttonsを利用したbotをつくってみたMasakazu Matsushita
 
Brain Dots at dots. - Brain Dotsのアーキテクチャ -
Brain Dots at dots. - Brain Dotsのアーキテクチャ -Brain Dots at dots. - Brain Dotsのアーキテクチャ -
Brain Dots at dots. - Brain Dotsのアーキテクチャ -Masakazu Matsushita
 
BrainWarsを支えるAWSサービスたち
BrainWarsを支えるAWSサービスたちBrainWarsを支えるAWSサービスたち
BrainWarsを支えるAWSサービスたちMasakazu Matsushita
 
TranslimitのChatOps事情と愉快なbotたち
TranslimitのChatOps事情と愉快なbotたちTranslimitのChatOps事情と愉快なbotたち
TranslimitのChatOps事情と愉快なbotたちMasakazu Matsushita
 
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)Masakazu Matsushita
 
1000万DL突破!BrainWarsのアーキテクチャ
1000万DL突破!BrainWarsのアーキテクチャ1000万DL突破!BrainWarsのアーキテクチャ
1000万DL突破!BrainWarsのアーキテクチャMasakazu Matsushita
 
いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0Masakazu Matsushita
 
後悔しないもんごもんごの使い方 〜アプリ編〜
後悔しないもんごもんごの使い方 〜アプリ編〜後悔しないもんごもんごの使い方 〜アプリ編〜
後悔しないもんごもんごの使い方 〜アプリ編〜Masakazu Matsushita
 
カジュアルにMongo dbのbackup機能説明
カジュアルにMongo dbのbackup機能説明カジュアルにMongo dbのbackup機能説明
カジュアルにMongo dbのbackup機能説明Masakazu Matsushita
 
ソーシャルゲームにおけるAWS/MongoDB利用事例
ソーシャルゲームにおけるAWS/MongoDB利用事例ソーシャルゲームにおけるAWS/MongoDB利用事例
ソーシャルゲームにおけるAWS/MongoDB利用事例Masakazu Matsushita
 
海外向けサービスの苦労話
海外向けサービスの苦労話海外向けサービスの苦労話
海外向けサービスの苦労話Masakazu Matsushita
 
The Case for using MongoDB in Social Game - Animal Land
The Case for using MongoDB in Social Game - Animal LandThe Case for using MongoDB in Social Game - Animal Land
The Case for using MongoDB in Social Game - Animal LandMasakazu Matsushita
 
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandMasakazu Matsushita
 

Mehr von Masakazu Matsushita (20)

It's up to you 〜 楽しさドリブンで歩んだ道 〜
It's up to you 〜 楽しさドリブンで歩んだ道 〜It's up to you 〜 楽しさドリブンで歩んだ道 〜
It's up to you 〜 楽しさドリブンで歩んだ道 〜
 
スタートアップで培ったアーキテクチャ設計ノウハウ
スタートアップで培ったアーキテクチャ設計ノウハウスタートアップで培ったアーキテクチャ設計ノウハウ
スタートアップで培ったアーキテクチャ設計ノウハウ
 
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり
全世界6,500万DL突破!ヒットゲームを作り上げたチームの道のり
 
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-EFS利用事例 -Craft Warriorsのバトルを支える仕組み-
EFS利用事例 -Craft Warriorsのバトルを支える仕組み-
 
TranslimitにおけるAWS活用術
TranslimitにおけるAWS活用術TranslimitにおけるAWS活用術
TranslimitにおけるAWS活用術
 
Interactive buttonsを利用したbotをつくってみた
Interactive buttonsを利用したbotをつくってみたInteractive buttonsを利用したbotをつくってみた
Interactive buttonsを利用したbotをつくってみた
 
ダブルCTO
ダブルCTOダブルCTO
ダブルCTO
 
Brain Dots at dots. - Brain Dotsのアーキテクチャ -
Brain Dots at dots. - Brain Dotsのアーキテクチャ -Brain Dots at dots. - Brain Dotsのアーキテクチャ -
Brain Dots at dots. - Brain Dotsのアーキテクチャ -
 
BrainWarsを支えるAWSサービスたち
BrainWarsを支えるAWSサービスたちBrainWarsを支えるAWSサービスたち
BrainWarsを支えるAWSサービスたち
 
TranslimitのChatOps事情と愉快なbotたち
TranslimitのChatOps事情と愉快なbotたちTranslimitのChatOps事情と愉快なbotたち
TranslimitのChatOps事情と愉快なbotたち
 
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)
BrainWarsのアーキテクチャ(OpsWorks & DynamoDB編)
 
1000万DL突破!BrainWarsのアーキテクチャ
1000万DL突破!BrainWarsのアーキテクチャ1000万DL突破!BrainWarsのアーキテクチャ
1000万DL突破!BrainWarsのアーキテクチャ
 
いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0いつやるの?Git入門 v1.1.0
いつやるの?Git入門 v1.1.0
 
後悔しないもんごもんごの使い方 〜アプリ編〜
後悔しないもんごもんごの使い方 〜アプリ編〜後悔しないもんごもんごの使い方 〜アプリ編〜
後悔しないもんごもんごの使い方 〜アプリ編〜
 
いつやるの?Git入門
いつやるの?Git入門いつやるの?Git入門
いつやるの?Git入門
 
カジュアルにMongo dbのbackup機能説明
カジュアルにMongo dbのbackup機能説明カジュアルにMongo dbのbackup機能説明
カジュアルにMongo dbのbackup機能説明
 
ソーシャルゲームにおけるAWS/MongoDB利用事例
ソーシャルゲームにおけるAWS/MongoDB利用事例ソーシャルゲームにおけるAWS/MongoDB利用事例
ソーシャルゲームにおけるAWS/MongoDB利用事例
 
海外向けサービスの苦労話
海外向けサービスの苦労話海外向けサービスの苦労話
海外向けサービスの苦労話
 
The Case for using MongoDB in Social Game - Animal Land
The Case for using MongoDB in Social Game - Animal LandThe Case for using MongoDB in Social Game - Animal Land
The Case for using MongoDB in Social Game - Animal Land
 
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
 

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Mongo DBを半年運用してみた

  • 1. MongoDB Masakazu Matsushita @matsukaz 2011 7 28
  • 2. @matsukaz • • Ameba Pico • DevLOVE 2011 7 28
  • 3. 2011 7 28
  • 4. Ameba Pico • • 2010 3 2011 7 28
  • 5. (2011 7 ) • 390 MAU 60 • 10 20 • 3:7 • 2011 7 28
  • 6. 2011 7 28
  • 7. • MongoDB • Ameba Pico • MongoDB 2011 7 28
  • 9. Document-oriented storage • • BSON (Binary JSON) > db.users.save( { name : "hoge", age : 20 } ) > db.users.save( { name : "fuga" } ) > db.users.find() { "_id" : ObjectId("4d6b7ef5934c0000000053a4"), "name" : "hoge", "age" : 20 } { "_id" : ObjectId("4d6b7f06934c0000000053a5"), "name" : "fuga" } 2011 7 28
  • 10. Full Index Support • Index • Unique Index Index 2011 7 28
  • 11. Replication • ReplicaSet mongod Member 1 (PRIMARY) mongod mongod Member 2 Member 3 (SECONDARY) (SECONDARY) 2011 7 28
  • 12. Replication • ReplicaSet mongod Member 1 (DOWN) mongod mongod Member 2 Member 3 (PRIMARY) (SECONDARY) 2011 7 28
  • 13. Replication • ReplicaSet mongod Member 1 (RECOVERING) mongod mongod Member 2 Member 3 (PRIMARY) (SECONDARY) 2011 7 28
  • 14. Replication • ReplicaSet mongod Member 1 (SECONDARY) mongod mongod Member 2 Member 3 (PRIMARY) (SECONDARY) 2011 7 28
  • 15. Auto-Sharding • Shard Key Shard 1 users name1 name2 name3 name4 name5 name6 name7 name8 name9 items item1 item2 item3 2011 7 28
  • 16. Auto-Sharding • Shard Key Shard 1 Shard 2 users name1 name2 name3 name4 name5 name6 name7 name8 name9 items item1 item2 item3 2011 7 28
  • 17. Auto-Sharding • Shard Key Shard 1 Shard 2 users users name1 name2 name3 name7 name8 name9 name4 name5 name6 name7 name8 name9 items item1 item2 item3 Chunk (Shard Key Range) 2011 7 28
  • 18. Auto-Sharding • Shard Key Shard 1 Shard 2 users users name1 name2 name3 name7 name8 name9 name4 name5 name6 items mongos item1 item2 item3 client client mongos mongoc Shard 2011 7 28
  • 20. 2011 1 Shard 1 mongoc mongos mongod mongod mongod Shard 2 Web Socket mongos mongoc mongod mongod mongod Shard 3 mongos mongoc mongod mongod mongod (memcached) LB ID/Point/ (HAProxy) MySQL EC2 m2.2xlarge (Mem 34.2GB / 13 EC2CU) c1.xlarge (Mem 7GB / 20 EC2CU) m1.large (Mem 7.5GB / 4 EC2CU) c1.medium (Mem 1.7GB / 5 EC2CU) m1.small (Mem 1.7GB / 1 EC2CU) EBS S3 CloudFront Elastic MapReduce 2011 7 28
  • 21. 2011 3 Shard 1 mongoc mongos mongod mongod mongod Shard 2 Web Socket mongos mongoc mongod mongod mongod Shard 3 mongos mongoc mongod mongod mongod (memcached) Shard 4 mongos mongod mongod mongod LB ID/Point/ (HAProxy) MySQL EC2 m2.2xlarge (Mem 34.2GB / 13 EC2CU) c1.xlarge (Mem 7GB / 20 EC2CU) m1.large (Mem 7.5GB / 4 EC2CU) c1.medium (Mem 1.7GB / 5 EC2CU) m1.small (Mem 1.7GB / 1 EC2CU) EBS S3 CloudFront Elastic MapReduce 2011 7 28
  • 22. 2011 5 Shard 1 mongoc mongos mongod mongod mongod Shard 2 Web Socket mongos mongoc mongod mongod mongod Shard 3 mongos mongoc mongod mongod mongod (memcached) Shard 4 mongos mongod mongod mongod LB ID/Point/ Shard 5 (HAProxy) MySQL mongod mongod mongod EC2 m2.2xlarge (Mem 34.2GB / 13 EC2CU) Shard 6 c1.xlarge (Mem 7GB / 20 EC2CU) m1.large (Mem 7.5GB / 4 EC2CU) mongod mongod mongod c1.medium (Mem 1.7GB / 5 EC2CU) m1.small (Mem 1.7GB / 1 EC2CU) EBS S3 CloudFront Elastic MapReduce 2011 7 28
  • 23. 2011 7 Shard 1 mongoc mongod mongod mongod mongos mongos Shard 2 Web Socket mongoc mongod mongod mongod Shard 3 mongos mongoc mongod mongod mongod (memcached) Shard 4 mongod mongod mongod LB ID/Point/ Shard 5 (HAProxy) MySQL mongod mongod mongod EC2 m2.2xlarge (Mem 34.2GB / 13 EC2CU) Shard 6 c1.xlarge (Mem 7GB / 20 EC2CU) m1.large (Mem 7.5GB / 4 EC2CU) mongod mongod mongod c1.medium (Mem 1.7GB / 5 EC2CU) m1.small (Mem 1.7GB / 1 EC2CU) EBS S3 CloudFront Elastic MapReduce 2011 7 28
  • 24. MongoDB 2011 7 28
  • 25. 2011 2 2011 7 28
  • 26. 2011 7 28
  • 27. 2011 7 28
  • 28. mongod Repair 2011 7 28
  • 29. 2011 7 28
  • 30. 2011 7 28
  • 31. 2011 3 2011 7 28
  • 32. Shard 2011 7 28
  • 33. 2011 7 28
  • 34. 2011 7 28
  • 35. 2011 7 28
  • 36. 2011 7 28
  • 38. 6 2011 7 28
  • 39. 2011 5 2011 7 28
  • 40. Shard 2 2011 7 28
  • 41. OFF 2011 7 28
  • 42. MongoDB 2011 7 28
  • 43. 2011 7 28
  • 44. 2011 7 28
  • 45. 2011 7 28
  • 46. 2 Shard 2011 7 28
  • 47. 2011 7 28
  • 48. 2011 7 28
  • 49. 2011 6 2011 7 28
  • 50. mongos 2011 7 28
  • 51. 2011 7 28
  • 52. 2011 7 2011 7 28
  • 53. MongoDB 1.6.5 → 1.8.2 2011 7 28
  • 54. 2011 7 28
  • 55. 2011 7 28
  • 56. chunk chunk 2011 7 28
  • 58. 2011 7 28
  • 59. 4 Shard 2011 7 28
  • 60. 2011 7 28
  • 61. 2011 7 28
  • 62. 2011 7 28
  • 63. 2011 7 28
  • 64. 2011 7 28
  • 65. 2011 7 28
  • 66. 2011 7 28
  • 67. Shard 2 EC2 2011 7 28
  • 68. 30 Repair 2011 7 28
  • 69. 2011 7 28
  • 70. mongod 1 2011 7 28
  • 71. 2011 7 28
  • 72. 2011 7 28
  • 73. 2011 7 28
  • 74. 2011 7 28