Fastest Database Wins for IoT Bridge May 25, 2022

Fastest Database Wins for IoT Bridge

by  Chris Balnave
Chris Balnave
published: May 25, 2022 | updated: July 25, 2022
Fastest database wins for IoT Bridge

From 26 database transactions per second to 120,000 – switching from MongoDB to RavenDB helped IoT Bridge meet the performance expectations of their customers, and themselves.

IoT Bridge is an IoT software system developed by a company of the same name. Customers can push data from their IoT devices into the platform, where they can view and act on it all in one place. 

Data can be transformed using javascript code – for example, base64 to readable JSON – and based on the intended target, telemetry data can be extracted and represented on charts and graphs. Users can build up dashboards to track the usage of their devices and use widgets for visualization.

Their variety of features is one of their advantages over their competitors. Another is their speed. IoT Bridge takes advantage of RavenDB’s highly optimized performance to achieve lightning-fast data processing. 
They are currently operating on RavenDB Cloud, our managed Cloud DBaaS (Database as a Service).

The Problem

IoT Bridge knew they would need a NoSQL database from the outset to handle the unstructured data being ingested from different devices and customers.

They started with MongoDB, but when one of their customers demanded performance statistics with a guaranteed ingestion rate, they ran into a problem. Despite their best efforts, they couldn’t achieve the numbers being asked of them. To hit these limits already, when they were planning for a much higher level of performance, was a big concern.

“We started with Mongo and tried to optimize our application code as much as we could while load testing with Bombardier and BenchmarkDotNet. We soon got to a point where we saw our database was being a bottleneck, so we decided to look elsewhere.”

Tyron Surajpal, IoT Bridge Developer

The Solution

While searching for a new database, one of their developers found this video from Federico Lois on the extreme level of performance optimization built into RavenDB.

They gave RavenDB a try and were quickly able to hit the numbers they were looking for.

“We were definitely impressed by Raven’s performance. It was a drastic improvement from Mongo’s.”

Tyron

Just by using the smallest development instance of RavenDB, they were able to drop their end-to-end time from sub-200ms with Mongo to sub-50ms with RavenDB.

Their tests just before switching to RavenDB showed they could perform 26-30 request/s. After switching (and a lot of optimization work), they’re now getting over 120,000/s – with more enhancements still to come.

(See also: How RavenDB knocked Couchbase out of the running for “fastest database”.)

They are currently running on an entry-level server and spending very little to achieve this level of performance. As the numbers of customers and devices grow, they’ll easily be able to scale and ingest more data.

“We can just imagine what those numbers would be if you really have to throw money at those servers because it would be incredible.”

Louis Lewis, IoT Bridge Developer

ACID DB Performance

Their performance is even more impressive when considering that RavenDB is a fully transactional database. Every transaction is ACID by default, whereas ACID guarantees can only be achieved in Mongo (and other document databases) at the cost of performance.

Tech Stack & Hosting

IoT Bridge is running microservices built on .NET, with services buses and REST in between. Most of the backends are in C# with some in NodeJS.

They operate on a 3-node cluster – a standard setup in RavenDB that ensures high availability.

Their RavenDB Cloud hosting is on Azure, in the same data center as their application code.

Other RavenDB Features Used by IoT Bridge

Time Series

Time Series provide easy storage and processing for large numbers of data points collected over time. They’re an easy and natural way for IoT Bridge to handle and present statistical data on their dashboards.

Automatic Indexes

IoT Bridge’s developers rely heavily on RavenDB’s ability to create and manage indexes automatically.

“We haven’t really manually had to create indexes before. I think that’s the beauty of Raven.”

Tyron

RavenDB Studio

RavenDB’s Studio “really has helped a lot.” The live view allows them to see system stats like memory usage and CPU load as data is added and indexed. It lets them know if their code is kind to the database as they write it.

Onboarding

RavenDB’s extensive documentation made the transition from Mongo to Raven simple. They had minimal issues, and when these came up: “You guys were there to assist us through that.” – Tyron.

What’s Next for IoT Bridge?

Until now the IoT Bridge developers have been focused on making their system stable and getting more customers, but when they’re ready, they have plans to expand into different countries. Everything is hosted in the cloud, so they can host wherever they want. They plan to bring software solutions to the people, putting databases closer to the users and reducing latency as much as possible.

And in terms of their data storage:

“We won’t turn back from Raven.”

Tyron

If you’d like to see how RavenDB can support your application, click here to book a free demo

Woah, already finished? 🤯

If you found the article interesting, don’t miss a chance to try our database solution – totally for free!

Try now try now arrow icon