top of page
  • Nithin Janardhanan

Improving IoT Device Management with Microservices and KEDA

Hello tech enthusiasts! In this article, I'd like to share my experience working on an IoT Device Lifecycle Management (DLM) solution for a leading global company. The project aimed to overcome the limitations of Azure IoT Central, such as single subscription restrictions, and focused on scalability and performance. We leveraged technologies like Kubernetes Event-Driven Autoscaling (KEDA) and the SAGA pattern to build an enterprise-ready IoT solution that could work with various types of devices and IoT networks like LORIOT and The Things Network. So, let's dive in and explore how these technologies helped us achieve our goals.

The Need for a Custom IoT DLM Solution

Azure IoT Central, while a powerful platform, posed some limitations for our enterprise-wide IoT use case. The most significant limitation was that IoT Central is restricted to a single subscription, making it less suitable for large-scale, enterprise-wide device management. Our primary goal was to create a custom IoT DLM solution that could handle millions of devices across multiple subscriptions, while ensuring high performance and scalability.

Key Features of the DLM Solution

Our custom IoT Device Lifecycle Management (DLM) solution was designed to address several essential aspects of device management, ensuring a comprehensive and reliable system. In this section, I'll outline five key features of our solution that made it stand out:

  • Ability to Receive Messages from Cloud Gateways and Services:

Our DLM solution was capable of receiving messages from various cloud gateways and services, allowing seamless integration with different IoT platforms, such as LORIOT and The Things Network. This facilitated smooth communication between devices and backend services, ensuring efficient data processing and analysis.

  • Ability to Query Device Status:

The DLM solution provided a convenient way to query the status of connected devices in real-time. This allowed users to monitor device conditions, detect anomalies, and take appropriate actions, such as sending commands to the devices or triggering alerts for relevant stakeholders.

  • Ability to Perform Device Provisioning and Command & Control (C2D) Operations:

Our DLM solution supported device provisioning, enabling users to register new devices, assign them to appropriate gateways, and configure their settings. Additionally, the solution allowed users to perform Command & Control (C2D) operations, sending commands to devices remotely and managing their behavior as needed.

  • Ability to Provide Secure Certificate Management:

Security was a top priority in our DLM solution. To ensure secure communication between devices and backend services, our solution incorporated a Certificate Management System (CMS) that generated and managed SSL/TLS certificates. This ensured that devices always had valid certificates and enabled secure authentication based on certificates or Trusted Platform Modules (TPMs).

  • Ability to Provision Cloud Gateways:

The DLM solution also had the capability to provision cloud gateways, which played a crucial role in connecting devices to IoT platforms. Users could create and configure gateways according to their specific requirements, enabling seamless integration of devices and IoT platforms.

By addressing these essential aspects of device management, our custom DLM solution offered a robust, scalable, and comprehensive system that catered to the needs of large-scale, enterprise-wide IoT deployments.

Kubernetes Event-Driven Autoscaling (KEDA)

To achieve the desired level of performance and scalability, we turned to KEDA—an open-source project that brings event-driven autoscaling to Kubernetes. KEDA enabled us to automatically scale our microservices based on the number of messages in our Azure Queue, ensuring optimal resource allocation and rapid response to changes in workload. This was a game-changer, as it allowed us to maintain high performance and resource efficiency, even when handling millions of devices.

Cross-Platform Compatibility and Extensibility

Our custom IoT DLM solution needed to be compatible with various types of devices and IoT networks, including LORIOT and The Things Network. The microservices architecture of our solution allowed us to easily integrate with these external IoT platforms through dedicated services that communicated with their respective APIs. This flexibility made our solution highly extensible, enabling us to support an ever-growing range of devices and IoT platforms.

Overcoming Complexities with the SAGA Pattern

Our solution involved complex, multi-step operations such as device registration and certificate management. To manage distributed transactions across our microservices, we implemented the SAGA pattern. This pattern breaks a complex transaction into a series of smaller, local transactions, each handled by a different service. The SAGA pattern helped us maintain data consistency across services and ensured reliable execution of multi-step operations.

Scalability and Adaptability to AWS

The microservices architecture of our solution not only provided us with the desired level of scalability but also allowed for easy adaptation to other cloud platforms like AWS. By leveraging containerization technologies like Kubernetes, our solution could be easily migrated to AWS with minimal modifications, ensuring seamless integration with the AWS ecosystem.


I hope you found this article insightful and that it gave you a glimpse into how cutting-edge technologies like KEDA and the SAGA pattern can help overcome the limitations of existing IoT platforms while driving the success of enterprise-wide IoT solutions. Our custom IoT DLM solution's compatibility with various types of devices, IoT networks, and cloud platforms demonstrates the power of a well-designed, flexible, and scalable architecture. Feel free to share your thoughts, experiences, or questions in the comments section below. Happy learning!

1 view0 comments
bottom of page