Samsung SmartHome Team Makes Work-Life Balance a Reality for Engineers with MongoDB Atlas


Businesses of all sizes, from early-stage startups to world-renowned enterprises, are challenged to build and deploy modern applications in today's rapidly changing digital landscape. And for the developers at the heart of these applications, it's a challenge to keep their applications up-to-date with the latest technologies while increasing their productivity.

At MongoDB.local Seoul in September 2023, Sungbin Im from Samsung Electronics' Digital Appliances (DA) division gave a talk titled "MongoDB Atlas brings work-life balance to evenings of DevOps engineer". In his presentation, Sungbin Im shared the real-world transformation in work efficiency that his team experienced by using MongoDB.

MongoDB Atlas for effective appliance data management

With Samsung's SmartThings at the center, Samsung Electronics' DA division has been developing a range of AI-powered home appliances and technologies for various services by leveraging the latest AI technology and the Internet of Things (IoT).

The SmartHome Service is the DA division's oldest and largest server platform, which collects device data from Samsung home appliances and makes it available for use in the division's various data-driven services.

Launched in 2014 as a user and device profile management server for controlling and monitoring Samsung home appliances with a mobile app, the Samsung SmartHome service managed application data on a MySQL database.

삼성전자 DA 사업부 임성빈 프로
Sungbin Im, Samsung Electronics' DA division

In 2015, the team established a foundation to collect real-time event data generated by home appliances and use it for data-driven services, such as data for training AI services.

The team also introduced the community version of MongoDB, a document model for flexible processing and utilization of application data workloads in JSON format, bringing the power of NoSQL to the forefront of development workloads.

Building a strong foundation for scaling services

When the team first started using MongoDB, running the community version of MongoDB was a smooth process. But as the number of home appliances and the amount of traffic communicating with the server continued to grow, the team began to face challenges in keeping the service running reliably.

In particular, during the hot summer months, when the use of home appliances such as air conditioners and refrigerators increases, the data flowing into the server tends to be concentrated at certain times, compounding the difficulties.

The community version of MongoDB had the advantage of being able to be tuned according to the developer's intentions, but it also required developer time to manage and operate the database if issues arose.

Moreover, as the company expanded its services, the development team felt the need to secure a technical background to better utilize MongoDB, as well as flexible clusters and enhanced storage and monitoring. In 2022, Samsung Electronics' DA division made a full-scale migration to MongoDB Atlas to operate its SmartHome services more effectively.

삼성전자 Digital Appliances (DA) 사업부 임성빈 프로

Considering the limitations and downtime of each option, Samsung Electronics' DA division set a migration policy that utilized the Mongomirror utility for data migration to a private network.

"It was important for Samsung SmartHome to maintain a balance between infrastructure management and business logic development. By migrating to MongoDB Atlas, we were able to reduce the burden of infrastructure management and focus on application development and innovation," explained Sungbin Im, who led the migration project.

"The average response time on MongoDB Atlas was more than halved from 8ms to 3ms, and the disk read latency was reduced from up to 3s to 18ms, which significantly improved availability," stressed Sungbin Im. "What was even more dramatic for us as developers was that after migrating to MongoDB Atlas, we did not experience any problems or alerts due to database processing failures."

As such, MongoDB Atlas has played an important role in providing a solid foundation for the expansion of Samsung SmartHome services, allowing them to easily handle more data traffic.

Achieving both developer productivity and service quality

At its core, the Samsung Electronics SmartHome development team manages a write-intensive workload that constantly updates events for every state that occurs on a device, such as sensor changes from an air conditioner (temperature, humidity, etc.) or the opening and closing of a refrigerator.

After analyzing key performance indicators with the MongoDB Korea team, the DA division concluded that the scale-out strategy on the existing replica set would not be able to quickly update and manage the ever-increasing traffic and workload spikes, especially during the peak summer months.

After experiencing significant improvements from migrating to MongoDB Atlas, Samsung Electronics' DA division envisioned a new scale-out strategy on a sharded cluster to overcome write workload limitations with the existing Replica Set.

"By conducting workshops and proof of concept (PoC) with the MongoDB Korea team, we were able to identify problems in advance and complete the sharding process," explained Sungbin Im. "By setting up point-in-time recovery (PITR), we were able to effectively recover data if something went wrong during the sharding process."

After sharding, balancing has been improved by distributing 300-400 node connections per shard, compared to about 800 connections in the previous Replica Set, and the logical data size of MongoDB has been reduced from 82 GB to about 42 GB, enabling efficient workload operation. Disk IOPS were also reduced by nearly half from the previous level of 16-20k/s to 8-10k/s, improving disk utilization.

With zero database outages and high availability based on MongoDB Atlas, DevOps engineers at Samsung Electronics' DA division are experiencing work-life balance and focusing on developing new services for customers.

Having built an efficient and reliable infrastructure by migrating to MongoDB Atlas and sharding, Samsung Electronics DA Division plans to continue working with MongoDB Korea to manage data workloads more effectively in the future.