Case Study: Migrating from Redis to Dragonfly to Scale IoT Infrastructure

Dragonfly - Oct 9 - - Dev Community

Intro

Over the past few decades, globalization has brought societies together faster than ever throughout history.
Social media, of course, has played a starring role in this process.
But even before the internet seeped into most aspects of our lives, the major driving force behind globalization had already taken hold: transportation.

While the internet has allowed us to seamlessly transport ideas, we still rely heavily on vehicles for people and goods.
This is where SmartGPS steps up as the fastest-growing vehicle tracking and IoT startup on the market.
With over 300,000 devices connected in Brazil and six other Latin American countries so far, SmartGPS is building a dynamic ecosystem that delivers real-time tracking and data insights to clients.
As they amass larger and larger quantities of data, they hope to contribute to sustainable mobility, helping cities evolve intelligently and reduce traffic congestion and pollution.

To do this well, SmartGPS needs to be able to quickly process large volumes of data in real-time.
To reduce the load on the primary database, retrieve data quickly, and increase throughput under highly concurrent requests,
it was clear to SmartGPS CTO, Eduardo Malpeli, that a strong in-memory data store would need to be employed.
While he and his team started with Redis Labs, as their business scaled, he realized quickly that the existing solution was limiting their growth.
After evaluating Dragonfly, they discovered that it removed the limitations traditionally associated with in-memory data stores.

Redis Provided Speed But Failed to Scale

Redis was not as performant as we thought it would be.

According to Malpeli, because of how it records, stores, and flushes data, SmartGPS needed a trustworthy in-memory data store.
Providing real-time tracking and insights requires that they collect, record, and create a key for the data from vehicles to keep it in order and ready to retrieve instantly.

While they do occasionally flush this data to a primary database, storing and retrieving directly from it for every action would not allow them the speed they need to provide their service to their customers.

It made sense, therefore, to use an in-memory data store as part of their data infrastructure stack.
Known for its incredible speed, SmartGPS went for Redis via Redis Cloud for their primary in-memory data store.

'Redis Struggled to Keep Up During Peak Traffic Hours'

Unfortunately, while Redis provided the speed Malpeli and his team needed, it proved to impede growth. "Redis was not as performant as we thought it would be," he said. As SmartGPS' customer base grew, the volume of data soared, and their traffic patterns became increasingly erratic, Redis struggled to keep up during peak traffic hours, causing performance hiccups.

After this caused a significant amount of data loss, Malpeli knew SmartGPS needed to find an in-memory data store alternative that could provide the speed of Redis as well as the scale they required.

Dragonfly Was the Better Choice

'With Dragonfly, our service was kept up and running smoothly!'

Desperate for another option, the SmartGPS team stumbled across several options, Dragonfly among them. "Dragonfly was the best because it is compatible with Redis and is the most mature product among the choices," Malpeli said.

The easy migration from Redis and the trustworthiness of the technology, along with the promise of better scale, meant that they had found their alternative.

During the evaluation process, SmartGPS conducted performance benchmarks by replicating their traffic patterns in a Dragonfly Cloud trial account, ensuring the solution could handle their data traffic with ease.

The result was impressive—Dragonfly met and exceeded expectations, enabling SmartGPS to manage their peak traffic loads effectively without compromising performance or data integrity.
"With Dragonfly, our service was kept up and running smoothly!"

'Changing the Data Store Endpoint'

Once they felt comfortable with the stability of their data, it was decided that they would complete the migration and move Dragonfly into production. Malpeli mentioned specifically how easy the process was. They "...didn't even have to change any code on our end!"
All they needed to do was change the endpoint that their production code was pointing to, "...and it just worked!"

Malpeli mentioned that the two biggest selling points while evaluating Dragonfly Cloud were compatibility and reliability.
They were able to seamlessly integrate Dragonfly with their existing Redis APIs, providing a familiar framework for their team of developers.

Their own service's reliability increased dramatically. "With Redis, we would have hiccups that dramatically impacted performance every week or two, we've had none since we migrated to Dragonfly."

Success with Dragonfly

'We experimented with multiple options, but nothing came close to Dragonfly.'

Before migrating to Dragonfly, SmartGPS resorted to throttling new customer onboarding to accommodate their existing infrastructure's struggles with handling all the new devices.

Now, with Dragonfly supporting speed and scale, they are able to onboard customers confidently and grow without fear of their service going down.

Malpeli left us with, "I would encourage any developer exploring alternatives to Redis to [give Dragonfly a try (https://dragonflydb.cloud/). Test it, set your own benchmarks, and see for yourself. We experimented with multiple options, but nothing came close to Dragonfly.

The ease of implementation and performance demonstrated by Dragonfly were unparalleled."

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player