What is our primary use case?
We mainly use it as the database for our platform, which is an application that users use as an interface for their IoT products. I work in the IoT chapter, and we developed an application where customers can manage their IoT devices and have a holistic view of their deployment. All data is aggregated in our database, cleaned up with ETLs, and stored in Cosmos DB.
When dealing with IoT products, we encounter massive amounts of data, unlike in commerce, where traffic and data fluctuate. IoT devices, especially ours, generate constant data streams every five minutes, necessitating robust handling. We chose Azure Cosmos DB, specifically the PostgreSQL version, for its ability to store massive amounts of data without performance degradation, thanks to its columnar storage feature. This allows us to compress older data, such as telemetry data older than two years, which is crucial for managing the ever-growing volume of information. Even with compression, we maintain fast access to the data, ensuring optimal application performance.
How has it helped my organization?
I had prior experience with MongoDB on Azure, a platform developed by Microsoft. Since we already used Azure, integration with Cosmos DB, Azure's native NoSQL database, was significantly faster than a standalone MongoDB instance. While Azure offers integration with MongoDB, utilizing Cosmos DB simplified the process due to the readily available APIs. Similarly, Azure PostgreSQL also streamlined integration because it is a Microsoft product, eliminating the need to work with a third-party vendor.
As the only database I've used extensively, particularly with Spark, I recently re-architected our application to identify performance bottlenecks. Surprisingly, Azure Cosmos DB consistently demonstrated exceptional speed, executing complex queries in under 100-200 milliseconds. This contradicted our initial hypothesis that the database was the primary cause of slowdowns. It proved to be one of the most efficient components, requiring minimal optimization. Therefore, Cosmos DB has proven optimal for searching through our organization's large datasets.
We have only used Azure Cosmos DB, so there isn't much reference to compare. However, within our chapter, when dealing with other chapters, there is a noticeable difference in performance in our application. The biggest differentiator in performance and speed for applications is typically the database, and having a speedy database solves a lot of performance issues.
Cosmos DB has provided excellent latency and availability. We have not experienced any database inaccessibility, downtime, crashes, or unexpected bills due to data spikes, even with the massive amounts of data we handle.
A single PostgreSQL node can handle a massive workload of telemetry data, eliminating the need for horizontal scaling in our case. Its impressive capacity and resilience ensure smooth operation even during spikes or large influxes of data.
What is most valuable?
The standout features are its ability to do data compression easily and the ability to scale horizontally. We initially used Azure Cosmos DB NoSQL, a document-based database, but as our application grew, we realized the relationships between entities were becoming more complex and NoSQL was no longer suitable. To address this, we migrated most of our data to Azure Cosmos DB for PostgreSQL, a relational database, while retaining the original NoSQL database for telemetry data. This approach offers two key benefits: simplified data compression, thanks to seamless integration with our ORM, Prisma, and horizontal scalability, providing the flexibility to expand our database capacity as needed quickly.
What needs improvement?
Azure Cosmos DB for NoSQL has a less developed interface and fewer SQL commands than MongoDB, and its community support is also smaller. Additionally, Azure Cosmos DB for PostgreSQL users face the challenge of not having a portal for running queries.
Microsoft could improve its pricing, and the way request units are purchased. The current system requires users to pre-purchase an estimated amount of requested units, often leading to unused units and unnecessary costs. This pre-purchase model is inefficient and inconvenient for users. Overall, the pricing structure must be more flexible and transparent to align with actual usage.
For how long have I used the solution?
I've used Cosmos DB for three years now at Spark New Zealand, and even before that, I worked on Cosmos DB inconsistently until my current company exclusively used it.
What do I think about the stability of the solution?
I would rate Cosmos DB's stability eight out of ten. We haven't experienced any significant stability issues or downtime.
What do I think about the scalability of the solution?
Scalability for Cosmos DB PostgreSQL is rated around eight point five out of ten. The single node is capable of handling massive loads, and we haven't needed to scale horizontally yet.
How are customer service and support?
In the three years of using Azure Cosmos DB, we never needed to contact support, indicating its reliability.
How would you rate customer service and support?
Which solution did I use previously and why did I switch?
I have used MongoDB previously. The integration with Microsoft Azure and its products is faster and easier compared to MongoDB.
How was the initial setup?
Deploying the NoSQL database was simple, but the PostgreSQL deployment proved more complex. Initially, it was particularly challenging due to limited resources; it was around when Microsoft acquired Citus, and comprehensive materials were scarce. The lack of a dedicated portal further complicated the process, making tasks like running queries more difficult than the user-friendly Azure portal available for NoSQL.
The Cosmos DB PostgreSQL deployment, including investigation and testing, took one week, while the deployment itself only required two days.
What about the implementation team?
There were around ten to twelve people involved in building the application using Cosmos DB. Other teams within our organization might also use it.
What was our ROI?
What's my experience with pricing, setup cost, and licensing?
Pricing is mid- to high-end. The way request units are purchased is atypical, as they must be bought ahead of time based on expected usage, which can be inefficient.
Which other solutions did I evaluate?
What other advice do I have?
I would rate Cosmos DB eight out of ten.
Cosmos DB, particularly the PostgreSQL setup, can be relatively maintenance-free. While the service itself requires no active maintenance, optimizing for cost-efficiency may involve implementing scripts to compress older data, as demonstrated in the PostgreSQL example. This proactive approach minimizes the need for ongoing maintenance, ensuring the application remains hassle-free.
Our Cosmos DB, deployed in a single region, primarily serves businesses and establishments rather than individual users. Each customer typically has only a few users on the app. Our primary concern isn't the number of users but the volume of telemetry data generated by devices at each establishment. These devices transmit data every five minutes, resulting in a constant influx of information 24/7, 365 days a year.
Within my chapter, around 15 people are using Cosmos DB.
For NoSQL, I would recommend it if you are already using Azure. For PostgreSQL, the lack of a query portal is a downside, but the features it offers can justify its slightly higher price.
Which deployment model are you using for this solution?
Public Cloud
If public cloud, private cloud, or hybrid cloud, which cloud provider do you use?
Microsoft Azure
Disclosure: PeerSpot contacted the reviewer to collect the review and to validate authenticity. The reviewer was referred by the vendor, but the review is not subject to editing or approval by the vendor.