{"id":1235,"date":"2018-02-06T02:02:09","date_gmt":"2018-02-06T10:02:09","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/"},"modified":"2018-02-06T02:02:09","modified_gmt":"2018-02-06T10:02:09","slug":"couchbase-server-vs-cosmosdb","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/","title":{"rendered":"Comparing Couchbase vs CosmosDB"},"content":{"rendered":"\n<p><span>Microsoft has generated a lot of buzz since the launch of CosmosDB. It is basically a rebranding of Amazon DocumentDB with some new cool features. Let\u2019s go a little deeper on it and explore its strategy, documentation, what developers have been talking about and how does it compares with Couchbase Server.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>One Database to rule them all?<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>In simple words, Microsoft claims that CosmosDB is a NoSQL database able to do literally <em>everything<\/em>: It is a Document database, Columnar storage, a Key-Value Store and a Graph Database. All achieved thanks to an abstraction of the data format called atom-record-sequence (ARS).<\/span><\/p>\n\n\n\n<p><span>A good sign of Microsoft\u2019s work is how data is differently organized according to each model. First, you have to choose the API you would like to use ( SQL, MongoDB API, Microsoft Azure Table, Cassandra or Gremlin) and stick with it as it can\u2019t be changed later. Currently, you can still try to access some models through DocumentDB API. that was what gave me some hints of how <\/span><a href=\"https:\/\/blog.spectologic.com\/2017\/06\/30\/digging-into-cosmosdb-storage\/\"><span>CosmosDB uses internally a decorated JSON format<\/span><\/a><span> to store its data.<\/span><\/p>\n\n\n\n<p><span>It looks like Microsoft wants to compete with most of the NoSQL databases out there, which is a really risky strategy as we might have passed the gold era of a single <em>database solution for everything.<\/em> There are huge benefits of choosing specialized storages, and this is the path most of the applications have been following right now with the rise of <\/span><a href=\"https:\/\/martinfowler.com\/bliki\/PolyglotPersistence.html\"><span>polyglot persistences<\/span><\/a><span>. \u00a0An <em>all-in-one<\/em> solution like CosmosDB might be good for low-demanding applications, but all those abstractions come with a cost and will ultimately impact simplicity, performance and be feature limited.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Couchbase vs CosmosDB &#8211; Comparing Apples with \u201cApples\u201d<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>I will try to limit my comparison with CosmosDB focusing most on scenarios that make sense to compare both technologies. The table below tries to show some of the differences side-by-side:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table>\n<tbody>\n<tr>\n<td><b>Feature<\/b><\/td>\n<td><b>CosmosDB<\/b><\/td>\n<td><b>Couchbase Server<\/b><\/td>\n<\/tr>\n<tr>\n<td><span>Licensing<\/span><\/td>\n<td>\n<ul>\n<li><span>Proprietary<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/licensing-and-support-faq\/\"><span>Open-Source Community and Enterprise editions<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Type<\/span><\/td>\n<td>\n<ul>\n<li><span>Key-Value Store<\/span><\/li>\n<li><span>Document Database<\/span><\/li>\n<li><span>Graph Database<\/span><\/li>\n<li><span>Columnar storage<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><span>Key-Value Store<\/span><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-and-the-document-oriented-nosql-database\/\"><span>Full Document Database<\/span><\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/memcached\/\"><span>Managed Cache<\/span><\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/products\/mobile\/\"><span>Mobile Database<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Model<\/span><\/td>\n<td>\n<ul>\n<li><span>Up to <\/span><span>2MB document size<\/span><\/li>\n<li><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/a-technical-overview-of-azure-cosmos-db\/\"><span>atom-record-sequence (<\/span><b>ARS<\/b><span>)<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/clustersetup\/server-setup.html\"><span>Up to 20Mb document size<\/span><\/a><\/li>\n<li><span>JSON Document<\/span><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/storing-blobs-in-couchbase-for-content-management\/\"><span>Supports BLOB<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Search<\/span><\/td>\n<td>\n<ul>\n<li><span>Azure Search<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/sdk\/full-text-search-overview.html\"><span>Internal Full-Text Search Engine<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/connectors\/elasticsearch-2.2\/overview.html\"><span>ElasticSearch<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Indexing<\/span><\/td>\n<td>\n<ul>\n<li><span>All fields are indexed by default using GSI<\/span><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/indexing-policies\"><span>Indexes can be also be customized by a user<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><span>Unlimited Number of Global and Secondary indexes<\/span><\/li>\n<li><span>Any fields can be added to the index<\/span><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/faster-indexing-and-query-with-memory-optimized-global-secondary-indexes-gsi-part-ii\/\"><span>Memory optimized indexes<\/span><\/a><span>.<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Data Integrity<\/span><\/td>\n<td>\n<ul>\n<li><span>Strongly Consistent<\/span><\/li>\n<li><span>Bounded-staleness<\/span><\/li>\n<\/ul>\n<ul>\n<li><span>Session (default)<\/span><\/li>\n<li><span>Consistent Prefix<\/span><\/li>\n<li><span>Eventually Consistent<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/concepts\/data-management.html\"><span>Strongly Consistent<\/span><\/a><\/li>\n<li><span>Eventually Consistent between Regions<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Scalability<\/span><\/td>\n<td><span>Highly Scalable<\/span><\/td>\n<td><a href=\"https:\/\/www.couchbase.com\/multi-dimensional-scalability-overview\/\"><span>Highly Scalable<\/span><\/a><\/td>\n<\/tr>\n<tr>\n<td><span>Mobile<\/span><\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/feedback.azure.com\/forums\/263030-azure-cosmos-db\/suggestions\/31185181-cosmos-db-on-devices\"><span>Not in their priority list at the moment<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/products\/mobile\/\"><span>Couchbase Lite and Sync Gateway<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Deployment<\/span><\/td>\n<td>\n<ul>\n<li><span>Azure Only, fully managed<\/span><\/li>\n<li><span>Development version available only on Windows<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/install\/install-platforms.html\"><span>Can be deployed anywhere<\/span><\/a><\/li>\n<li><span>Full Kubernetes\/Openshift support will be introduced in the next release<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Locking<\/span><\/td>\n<td>\n<ul>\n<li><span>Optimistic Locking<\/span><\/li>\n<li><span>Pessimistic Locking<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/optimistic-or-pessimistic-locking-which-one-should-you-pick\/\"><span>Optimistic locking<\/span><\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/optimistic-or-pessimistic-locking-which-one-should-you-pick\/\"><span>Pessimistic locking<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Backup &amp; Restore<\/span><\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/online-backup-and-restore\"><span>Automatically done every 4 hours but <\/span><b>only the latest 2 snapshots are stored<\/b><span>.<\/span><\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/online-backup-and-restore\"><span>For backups older than 12 hours currently you should use their Database <\/span><span>Migration Too<\/span><\/a><span>l<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/backup-restore\/cbbackupmgr-strategies.html\"><span>Merge, Incremental and full Backup<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/cli\/cbrestore-tool.html#cdbrestore-tool\"><span>Restore with automatic conflict resolution<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Querying<\/span><\/td>\n<td>\n<ul>\n<li><span>Querying is made according to the chosen API, and each API has different limitations<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/\"><span>SQL-Like querying with N1QL<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdk\/c\/view-queries-with-sdk.html\"><span>Map\/Reduce views<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Data Center Replication<\/span><\/td>\n<td>\n<ul>\n<li><span> Push-button global Bidirectional replication<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/3.x\/admin\/XDCR\/xdcr-topologies.html\"><span>Unidirectional and Bidirectional<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/xdcr\/xdcr-create.html\"><span>Allows Data Filtering<\/span><\/a><\/li>\n<li><span>Replication between differently sized clusters<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Throttling<\/span><\/td>\n<td>\n<ul>\n<li><span>Only by increasing RCUs<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/architecture\/architecture-intro.html\"><span>Memory first reads\/writes<\/span><\/a><\/li>\n<li><span>Cache layer is transparent<\/span><\/li>\n<li><span>Tuning is made by Increasing Memory, Disk or adding a new Node.<\/span><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/faster-indexing-and-query-with-memory-optimized-global-secondary-indexes-gsi-part-ii\/\"><span>Memory-optimized Indexes<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Administration Interface<\/span><\/td>\n<td>\n<ul>\n<li><span>Feature-rich administration interface;<\/span><\/li>\n<li><span>Provide a few endpoints to automate some tasks<\/span><\/li>\n<li><span>Some features aren\u2019t well documented<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/admin\/ui-intro.html\"><span>Flexible and feature-rich administration interface<\/span><\/a><\/li>\n<li><span>The same version can be used in production and development<\/span><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/tools\/query-workbench.html\"><span>Powerful Query Workbench<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/rest-api\/rest-intro.html\"><span>All implemented using Restful APIs<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Sharding<\/span><\/td>\n<td>\n<ul>\n<li><span>Partitioning is made automatically but you are required to pick a partition key.<\/span><\/li>\n<\/ul>\n<\/td>\n<td><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/concepts\/distributed-data-management.html\"><span>Sharding is automatically done under the covers<\/span><\/a><\/td>\n<\/tr>\n<tr>\n<td><span>Security<\/span><\/td>\n<td>\n<ul>\n<li><span>Provided by normal Azure security measures<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/security\/concepts-rba.html\"><span>Role-based access control<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/security\/security-auditing.html\"><span>Auditing logs for management tasks<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/security\/security-data-encryption.html\"><span>Encryption at rest<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Architecture<\/span><\/td>\n<td>\n<ul>\n<li><span>Unknown<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/architecture\/architecture-intro.html\"><span>All nodes are master<\/span><\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span>Integrations<\/span><\/td>\n<td>\n<ul>\n<li><span>Spark, Hadoop<\/span><\/li>\n<li><span>Other Azure Services<\/span><\/li>\n<li><span>MongoDB Connector<\/span><\/li>\n<li><span>Cassandra<\/span><\/li>\n<li><span>Gremlin<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/connectors\/spark-2.2\/spark-intro.html\"><span>Spark<\/span><\/a><span>, <\/span><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/connectors\/hadoop-1.2\/hadoop.html\"><span>Hadoop<\/span><\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/connectors\/kafka-3.2\/kafka-intro.html\"><span>Kafka<\/span><\/a><\/li>\n<li><span>Cloudera\/Databricks\/Horton Networks<\/span><\/li>\n<li><a href=\"https:\/\/docs.datadoghq.com\/integrations\/couchbase\/\"><span>DataDog<\/span><\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/powerbi-and-couchbase-server-4-with-n1ql-reporting-over-json-data-with-native-connectivity-through-n1ql\/\"><span>PowerBI<\/span><\/a><span>\/<\/span><a href=\"https:\/\/www.couchbase.com\/resources\/presentations\/visual-analytics-with-tableau--couchbase.html\"><span>Tableau<\/span><\/a><span>\/<\/span><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/connectors\/talend\/talend.html\"><span>TalenD<\/span><\/a><\/li>\n<li><span>Many others<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Conclusion<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>I think this is the very first article comparing CosmosDB with another database. It took me a good amount of time to go through a lot of documentation, developer\u2019s feedbacks, and some webinars. <\/span><\/p>\n\n\n\n<p><span>My feeling, in general, is that CosmosDB has a great vision, but currently, it is still immature in some aspects. Documentation and backups, for instance, are not one of their strengths, which is a natural consequence of building something focusing on multiple fields at once. Microsoft&#8217;s database also brings a lot of innovations, one of the most prominent is the new multiple levels of eventual consistency: Bounded-staleness, Session, Consistent Prefix and Eventually Consistent.<\/span><\/p>\n\n\n\n<p><span>The fact that <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/consistency-levels\"><em><strong>Session<\/strong><\/em><\/a>\u00a0is set as the default consistency says a lot about the recommended way to use CosmosDB. It also gives us hints that it might not be the best solution if you need a strong data consistency.<\/span><\/p>\n\n\n\n<p><span>I could not find any mention of caching mechanisms in CosmosDB, so I am assuming that it is not a major part of the database. The problem is that caching is crucial for good performance in strongly consistent databases, being memory-first is one of the reasons why Couchbase Server is blazing fast.<\/span><\/p>\n\n\n\n<p><span>CosmosDB does not provide memory-optimized indexes and by default, all fields are indexed in their Global Secondary Indexes (GSI). It totally sounds like overkill to me as I still think it is easier to specify which fields I want indexes than specifying which fields I don\u2019t. Of course, you don\u2019t necessarily need to remove those fields from the index but don\u2019t forget you are getting charged for it.<\/span><\/p>\n\n\n\n<p><span>Sharding seems to be right now one of the trickiest things in CosmosDB. Partitions are moved automatically among nodes, but you still have to specify a partition key. The drawback of this approach is that each partition is indivisible with a max size of 10Gb. If you pick a bad partition key, a lot of frequently accessed documents might end up in the same partition, which limits the throughput of your reads\/writes by the node capacity where the partition is stored. <\/span><\/p>\n\n\n\n<p><span>The partition key is also immutable, so in order to change it, you will be required to copy your whole data to another collection. In Couchbase, we transparently <\/span><a href=\"https:\/\/www.couchbase.com\/binaries\/content\/assets\/website\/docs\/whitepapers\/technical-whitepaper-couchbase-server-vbuckets.pdf\"><span>distribute your documents evenly between vBuckets<\/span><\/a><span> to avoid this problem, and also to increase your reads\/writes performance.<\/span><\/p>\n\n\n\n<p><span>Currently, throttling is done only by increasing Request Units (RUs) which is a common standard for fully managed databases (on DynamoDB, for instance, throttling is made by increasing Read\/Write capacity units). \u00a0The challenge with this approach is that it is not a very good predictor of the query performance and makes even harder to boost just a specific behavior like increasing only the writes capacity.<\/span><\/p>\n\n\n\n<p><span>Microsoft has put a lot of effort in trying to make RUs provisioning easy to understand, but I have found many comments of developers underestimating their RUs ( like <\/span><a href=\"https:\/\/www.mazsoft.com\/blog\/post\/2017\/08\/12\/how-replacing-elasticsearch-with-azure-documentdb-cosmosdb-turned-out-to-be-a-bad-idea\"><span>here<\/span><\/a><span> or <\/span><a href=\"https:\/\/www.youtube.com\/watch?v=b1VFyEhucnA&amp;feature=youtu.be&amp;t=56m40s\"><span>here<\/span><\/a><span> ) \u00a0and ending up with a bill much higher than expected. In general, the pattern that I have seen of provisioning in CosmosDB is mostly based on trial-and-error. On Couchbase, throttling is very flexible, it can be done by vertical\/horizontal scaling, running specific services according to the node hardware, keeping indexes in memory, etc.<\/span><\/p>\n\n\n\n<p><span>Microsoft is also clearly trying to convince MongoDB\u2019s users to migrate to CosmosDB. They even provide a fairly compatible connector to make the migration easier. The problem is that the root cause of why some users are willing to migrate to other databases is due to MongoDB&#8217;s scalability and performance issues. We know it very well because <\/span><a href=\"https:\/\/www.couchbase.com\/customers\/viber\/\"><span>many of those users end up migrating to Couchbase Server<\/span><\/a><span>, and CosmosDB performance does not seem to be a big plus, at least not for a reasonable cost.<\/span><\/p>\n\n\n\n<p><span>Microsoft does provide a limited local version for development, but so far it runs only on Windows machines. <\/span><\/p>\n\n\n\n<p><span>CosmosDB also provides a cool push-button global data distribution that makes really simple to replicate data in multiple locations of the world. It is, however, a feature not used daily to require such simplicity, it could also be easily achieved in a matter of minutes in Couchbase Server without the limitation of running in a single cloud.<\/span><\/p>\n\n\n\n<p><span>In summary, I agree with CosmosDB point of view that eventual-consistency is a too broad definition. Their new consistency models let the developer choose the level of consistency their application tolerates. <\/span><\/p>\n\n\n\n<p><span>The reasons to use it are nearly the same as the ones mentioned in <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-server-x-dynamodb-quick-comparison\/\"><span>my article about DynamoDB<\/span><\/a><span>. The main difference, of course, is that CosmosDB is much more flexible than DynamoDB. It is right now an average multi-purpose database for applications demanding average performance with strong consistency . It also easily<\/span><span>\u00a0integrates with some features of Azure Functions.<\/span><\/p>\n\n\n\n<p><span>CosmosDB still lacks famous use cases\/clients, but it has the potential to stand out in applications with eventual consistency, as it seems to be their main focus. But when it comes to strongly-consistent medium\/high demanding applications, Couchbase Server is by far a better choice, both from the price and performance point-of-view.<\/span><\/p>\n\n\n\n<p><span>It is hard to come up with a fair benchmark between those two databases as it\u2019s unclear, for instance, how many servers are running when you provision 30.000 RUs in CosmosDB, so the easiest way to predict their expected performance is through their architecture\/features.<\/span><\/p>\n\n\n\n<p><span>Pretty much like DynamoDB, CosmosDB pricing is attractive if you have a small database with few reads\/writes per second. But <\/span><span>anything above that<\/span><span> with cost you a good amount of money: 200 000 documents of 45kb, with 4 writes\/sec and 40 reads\/sec will cost at least US$ 2 500.<\/span><\/p>\n\n\n\n<p><span>Their calculator does not consider the consistency model you are going to use, so you have to add a few extra dollars to this number for Strong-Consistency. In this setup, CosmosDB cost is at least double the price you would spend to run Couchbase EE on Amazon Web Services with our recommend architecture (which is capable of handling more than that)<\/span><\/p>\n\n\n\n<p><span>As I mentioned at the beginning of the article, there are a lot of advantages in choosing specialized storages for each specific purpose, and Couchbase Server really excels in delivering high performance with strong-consistency.<\/span><\/p>\n\n\n\n<p>If you have any questions, feel free to tweet me at <a href=\"https:\/\/twitter.com\/deniswsrosa\">@deniswsrosa<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft has generated a lot of buzz since the launch of CosmosDB. It is basically a rebranding of Amazon DocumentDB with some new cool features. Let\u2019s go a little deeper on it and explore its strategy, documentation, what developers have been talking about and how does it compares with Couchbase Server. \u00a0 One Database to [&hellip;]<\/p>\n","protected":false},"author":8754,"featured_media":1234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[54],"tags":[298],"ppma_author":[287],"class_list":["post-1235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","tag-cosmosdb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Comparing Couchbase vs CosmosDB Comparison | Couchbase<\/title>\n<meta name=\"description\" content=\"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Comparing Couchbase vs CosmosDB\" \/>\n<meta property=\"og:description\" content=\"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-06T10:02:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"380\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@deniswsrosa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/\"},\"author\":{\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\"},\"headline\":\"Comparing Couchbase vs CosmosDB\",\"datePublished\":\"2018-02-06T10:02:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/\"},\"wordCount\":1748,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbaseVsCosmos.png\",\"keywords\":[\"cosmosdb\"],\"articleSection\":[\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/\",\"name\":\"Comparing Couchbase vs CosmosDB Comparison | Couchbase\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbaseVsCosmos.png\",\"datePublished\":\"2018-02-06T10:02:09+00:00\",\"description\":\"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbaseVsCosmos.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbaseVsCosmos.png\",\"width\":640,\"height\":380},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-server-vs-cosmosdb\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Comparing Couchbase vs CosmosDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\",\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"caption\":\"Denis Rosa, Developer Advocate, Couchbase\"},\"description\":\"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/deniswsrosa\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/denis-rosa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Comparing Couchbase vs CosmosDB Comparison | Couchbase","description":"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/","og_locale":"en_US","og_type":"article","og_title":"Comparing Couchbase vs CosmosDB","og_description":"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.","og_url":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-02-06T10:02:09+00:00","og_image":[{"width":640,"height":380,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png","type":"image\/png"}],"author":"Denis Rosa, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@deniswsrosa","twitter_misc":{"Written by":"Denis Rosa, Developer Advocate, Couchbase","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/"},"author":{"name":"Denis Rosa, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257"},"headline":"Comparing Couchbase vs CosmosDB","datePublished":"2018-02-06T10:02:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/"},"wordCount":1748,"commentCount":1,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png","keywords":["cosmosdb"],"articleSection":["Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/","name":"Comparing Couchbase vs CosmosDB Comparison | Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png","datePublished":"2018-02-06T10:02:09+00:00","description":"Check out this blog post to explore CosmosDB strategies, documentation, what developers have been talking about and how it compares with Couchbase Server.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbaseVsCosmos.png","width":640,"height":380},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-server-vs-cosmosdb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Comparing Couchbase vs CosmosDB"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257","name":"Denis Rosa, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6","url":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","caption":"Denis Rosa, Developer Advocate, Couchbase"},"description":"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.","sameAs":["https:\/\/x.com\/deniswsrosa"],"url":"https:\/\/www.couchbase.com\/blog\/author\/denis-rosa\/"}]}},"acf":[],"authors":[{"term_id":287,"user_id":8754,"is_guest":0,"slug":"denis-rosa","display_name":"Denis Rosa, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/8754"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1235"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/1234"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1235"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}