MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most...

25
MongoDB Shootout: MongoDB Atlas, Azure Cosmos DB and Doing It Yourself

Transcript of MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most...

Page 1: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

MongoDB Shootout:

MongoDB Atlas, Azure Cosmos DB and Doing It Yourself

Page 2: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

Agenda and IntroClick for subtitle or brief description

Page 3: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

3

AgendaIntro

● Goal for this talk● Who is this David Murphy person?

The technologies and how they work● What are the techs● Feature Matrix● Where they fit● Pros and Cons

• General, Upgrading, Scaling Up/Down, Sharding, Geo, ect

Other thoughts● Should you have a support contract over these?● What about other services like ObjectRocket, how do they compare?

Page 4: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

4

Goals: What you should walk out with

● Understanding about what is IaaS, DevOps, and DBaaS

• Pros and Cons of each style as they apply to the techs

● What is MongoDB Atlas

● What is Azures CosmosDB

● Some DevOps ways to run MongoDB at scale

● Deciding which meets your needs & make concessions that work for you

Page 5: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

5

Who is David Murphy

MongoDB Practice Manager @ PerconaRoadmap Stakeholder for all MongoDBTechnical Owner for MongoDB projectsLead Architect and SupportEcosystem Advocate and so on.

Previous:

Lead & Orginal DBA @ Object Rocket (DBaaS)MongoDB Master AlumniMysql & NoSQL Architect for Electronic Arts (Makes FIFA)

Page 6: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

The technologies and how they workMongoDB Atlas, CosmosDB, and DIY

Page 7: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

7

What are the techs: MongoDB Atlas

● Pay-per-hour infrastructure and management cloud tools on clouds

● Prevents Cloud lock-in● Metrics Dashboard● Backups (extra cost)● ~44% more than DIY on same cloud● No support for MongoDB itself● Automated

• User Management• Upgrading• Scaling Automated

Page 8: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

8

What are the techs: Azure

● Pay per operation SaaS● Only on Azure, but can talk with

other networks● Limited dashboard (size, requests)● Backups

• 2 automated, 4 hour increments

● Cost per use case, no general cost● No support for MongoDB itself● Automated

• Scaling• Indexing

Page 9: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

9

What are the techs: DYI

● DevOps using Kubernetes or similar● Works both in house and any cloud● Uses DataDog or PMM to metrics● Backups need to be configure

• PerconaLabs/mongodb-consistent-backup

● Infrastructure Costs + DevOps● No support for MongoDB itself● Automated

• Deployment• Scaling(via monitoring + ansible)

Page 10: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

10

Where they fit*This depends on your use case but…*

MongoDB Atlas: Small companiestesting out a new app/systemletting developers focus on developing

DYI:DevOps teamsMature Production teamIntegration with existing solutions

Azure Cosmos:Serverless MindsetIndex everythingSimple CRUD only (no aggr)Low frequency with scalingMultiply-geo simplified

Page 11: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

11

Feature MatrixFeature MongoDB Atlas Azure CosmosDB DIY / DevOps

Automated Provisioning 10/10 10/10 10/10

Automatic Scaling 8/10 10/10 7*/10

Upgrades 10/10 N/A 0*/10

Full MongoDB API Compatible 10/10 5/10 10/10

CRUD MongoDB API Compatible 10/10 10/10 10/10

Point in Time Backups 10/10 0**/10 10/10

Cost Per Server TRUE N/A TRUE

Cost Per Action N/A TRUE N/A

Overhead Recurring Cost Per-Case Software Invest

SSL / Encryption 10/10 10/10 10*/10

Metrics / Debugging 7/10 2/10 10/10

Page 12: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

12

Automatic Scaling

This is the ability to have automated ways around scaling up and down.While useful one could conclude this is to help you automate the tasks of doing this not deciding when to do it.

CosmoDB’s the clear winner, if you need more use more and doneAtlas helps automate the up & down on request but you decide whenDIY you need to be the one to build the worker, logic, and automation. However with this one you COULD decide to make this 100% automated

Page 13: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

13

Automatic Upgrading

This is more about push button upgrading from 3.2->3.4 or 3.4 -> 3.6There is no clear winner as they each have pros and cons

CosmosDB - No upgrades needed as it runs its own thing, downside not all features work at all times. Atlas - This is native and well done, but for large nodes hold risk as backing out not deeply supported and riskier for larger deployments.DIY - Most customizable to match companies need but also 100% needs to be build by DevOps team

Page 14: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

14

Full MongoDB API Compatibility

The key word here is “FULL”, and only CosmosDB falls down here.While CosmosDB is API compatible it’s only 100% on CRUD such as

Insert/UpdateDeleteQuery

When you get into indexes (automatic in Cosmos db) , sharding, aggregation and more CosmosDB is different and means application changesDIY and Atlas are 100% aligned to community MongoDB

Page 15: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

15

Overhead

This is more of a meta topic around what is the pain point you take on.CosmosDB

This is hard to justify because how many operations will you need? In normal mongo you didn’t care, jus that the server could keep up

AtlasAt 44% more than running your own instances this price adds up over time, and does not reduce like DIY will, could mean more $$$ long term.

DIYPeople! and processes all cost money to build and maintain. This is mostly front loaded so you will pay less long term if done right.

Page 16: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

16

CosmosDB This is more like any cloud service the resource (api calls) you have used and available/used space. You won't understand why something was slow.

AtlasGood basic monitoring covering many of the Mongo main metrics and some system level ones.

DIYUsing something like PMM or prometheus you can have hundreds of metrics and graph them based on your use case, as such this is the clear winner.

Metrics / Monitoring

Page 17: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

17

Sharding Considerations

CosmosDB N/A

AtlasAs Atlas is based in the cloud you should shard fast and often, keeping the size of nodes down to better absorb any latency spikes.

DIYAs adding/removing shards are not automatic (unless via ansible type systems) you should keep an eye on things but people tend to keep 100-500GB per server. The ratio of member to disk is more about your use case than some random cloud assumption.

Page 18: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

18

Index Management

CosmosDB N/A everything is indexed by default

AtlasWhen the profiler is enabled its suggest indexes that must may create

DIYThis offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find expensives queries to re-write or better index. Using this will ansible could allow for some automatic indexing, but we suggest you avoid background indexes where possible as they are less efficient.

Page 19: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

19

Data Geo Locality

CosmosDB Multiple Master, and regional cloning available

AtlasLocation based sharding using zones or tagsSingle region per replica setNo Multiple Master

DIYNo Multiple MasterZone and Tag support for sharding and replica setMultiple region replica set allowed

Page 20: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

Other ThoughtsOther services to consider from full DBaaS providers to support vendors

Page 21: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

21

Several Nines

While somewhere between a Atlas or MongoDB Clould Manager with a DIY this is a paid offering that does act as a great shortcut to features without removing customization.

● Provides Provisioning● Provides Basic Monitoring● Provides Multiple Backup Solution automation ● Does not have automatic provisioning or indexes● Less metrics than PMM for monitoring

Page 22: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

22

ObjectRocket

This is more like a blend of Atlas and Cosmos DB, here we have normal mongo in a very strict design but with automatic scaling, and a team to monitor thing for you.

● Automatic Scaling● 24/7 Support and Consulting help● No hardware to manage● Limited Monitoring● Automatic Backups● No multiple DC support● No full admin access by default

Page 23: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

23

Thank You Sponsors!

Page 24: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

24

SAVE THE DATE!

CALL FOR PAPERS OPENING SOON!www.perconalive.com

April 23-25, 2018Santa Clara Convention Center

Page 25: MongoDB Shootout - Percona › live › e17 › sites › default... · This offers you the most control by using tools like pt-mongodb-query-digest you can use the profile to find

Thank you for attending.Check out my other talks in the App, some help explain things like PMM mentioned here.