The Internet of Things (IoT) is rapidly evolving and transforming the way we interact with everyday objects. As more devices become connected to the internet, managing the software for all of these devices becomes increasingly complex. This is where serverless technology comes in. The serverless model allows organisations to build and run applications and services, without having to worry about managing the underlying hardware and software infrastructure. This has provided developers with an opportunity to streamline the IoT software development process, allowing for faster implementation and easier maintenance, along with significant cost savings.

Here at Sauce, we use a serverless IoT solution because of the scalability, reliability and cost efficiency it provides. So, in this post we’re going to take a closer look at serverless technology, to break down some of the benefits and challenges it presents and detail our team’s own first-hand experience of using it. 

The Benefits

Reduced Costs 

One of the primary benefits of serverless technology for development is the cost savings it can accrue. Without the need to pay for dedicated servers and associated infrastructure, this can lead to huge cost savings, especially for applications with changeable or unpredictable usage patterns. There are no charges for idle time as with traditional servers, meaning that you only pay for the resources your application consumes, rather than paying upfront for a fixed amount of capacity. This can make scalability far more cost effective and can be particularly beneficial for small businesses or start-ups that don’t always have the budget for expensive infrastructure. 

Sauce Says: 

Utilising serverless technology can lead to significant cost savings, however this does require a certain amount of work upfront to ensure your chosen services scale appropriately to meet your needs. 

Simplified Maintenance:

Serverless technology can help reduce the complexity of IoT software development. Using serverless technology, there’s no need to maintain the underlying infrastructure, which helps to simplify the maintenance and management of applications. As an IoT product becomes more popular, it can easily be scaled up to meet the demand without having to worry about provisioning new servers or managing existing ones. This eliminates much of the manual labour associated with scaling up an IoT application, such as scalability planning and other strategies that come along with traditional computing models. With serverless technology, IoT developers can focus their time and energy on coding to improve applications, allowing them to make the most of their skillsets building applications more rapidly and efficiently.

Sauce Says: 

The serverless model has simplified maintenance, particularly operationally. However, more work is required up front to determine the most appropriate services to meet the needs of the system, as choosing the wrong services could result in poor performance or spiralling costs. Generally, more work is going to be required ahead of time in terms of planning, to ensure that important things such as access levels are going to be correct from the start.  

Enhanced Security 

Serverless technology removes the requirement to patch or maintain the underlying infrastructure, which helps to reduce the risk of security vulnerabilities, improving overall security. Whilst increasing the number of connected devices can also increase security risks, serverless technology allows developers to deploy a set of security protocols and software updates that can be applied across multiple devices at once. By leveraging cloud services, IoT developers can ensure they have up-to-date security measures in place across their entire network. 

Sauce Says: 

With a traditional server oriented architecture if a machine has a vulnerability, a hacker can gain access to the server and use that access point to move between servers at a machine level. Using a serverless model, however, a hack can be locked down to the scope of a function. Knowing what a function has access to is important, but it will definitely be less than a whole server would have access to.  

Greater Agility

Serverless technology offers greater flexibility than traditional approaches as it allows developers to scale and deploy applications rapidly, allowing for more experimentation and testing. With the serverless model, developers are no longer limited by their infrastructure and can quickly create, deploy and test their applications without having to worry about the associated time and costs of deploying on a physical server. This makes it much easier to iterate and refine applications while also reducing the time to market.

The scalability offered by serverless technology also gives developers more control over application development, as they can create smaller and more efficient applications that are tailored to their specific requirements with higher levels of customisation and faster development cycles. These factors make serverless technology an ideal option for the development of IoT applications, providing a highly flexible, cost-effective and scalable platform that enables developers to quickly develop and deploy applications with greater control.

Sauce Says: 

We have found that serverless technology has allowed our developers to focus on features without worrying about the operating system or Docker image we’re running on. It can sometimes take extra time and work to allocate the right service to the right job with the huge number of AWS services available. 

Improved Scalability

One of the most significant advantages of using serverless technology for IoT development is improved scalability. When using traditional server-based architecture, you are limited in terms of the scalability of your system and the number of devices it can support. However, serverless computing is event driven, so it can automatically scale up or down based on demand, rather than having to provision or maintain the required capacity. With the built-in elasticity of serverless platforms, you can adjust the amount of computing resources allocated to each device, ensuring that all devices are adequately supported, making it easier to handle sudden spikes in traffic.

Sauce Says: 

Scalability is definitely a major part of the serverless model, however if the team runs into a case where an application needs to scale more rapidly than the AWS ecosystem will allow, we will then occasionally need to intervene. In this case, we manually ramp up capacity before we know a spike is expected.

The Challenges

Cold Start Performance 

One issue that serverless technology can present is the potential for ‘cold start’ performance issues. This is when the first request to a new or infrequently used function can be slower than subsequent requests due to the need to spin up a new container.

Sauce Says: 

This hasn’t really been a huge issue for the systems we have developed so far. The occasional request might take slightly longer than normal, but this can be handled in the front end. The team were conscious of this potential issue, but it turned out that it hasn’t been anything we have had to worry about. There are many options available but Node is one of the best options for performance when it comes to cold start issues. 

Monitoring and debugging 

There are specific monitoring and debugging challenges that arise with serverless technology compared to traditional applications; it can be more difficult to monitor and debug issues due to the distributed nature of the architecture. Efficiently monitoring and debugging with the serverless model requires certain tools. 

Sauce Says: 

There are quite a few systems out there, but our teams make heavy use of Cloud Watch for monitoring issues that arise. 

Limited Control 

Serverless technology makes you dependent upon the cloud provider to manage the underlying infrastructure, which can limit your ability to customise and control certain aspects of the environment. 

Sauce Says:

Despite the challenges that may arise, serverless technology makes it possible to quickly test, deploy, and iterate solutions without the cost of purchasing and maintaining hardware. The serverless model also liberates developers from the regular tasks associated with app scaling and server provisioning whilst the dynamic scalability offered by serverless technology means that companies don’t have to over-provision or under-provision infrastructure capacity. When usage spikes, so does the capacity available; when usage slows down, so does the amount of computing resources used. The agility of the serverless model offers huge benefits to organisations when it comes to building and running scalable, cost-effective and secure applications. Over time we can expect to see this technology continue to mature alongside increased adoption and innovation within the space.