How to Optimize Your Soracom Data Traffic

Abstract Data, statistics, Data traffic

In today’s digital landscape, cloud technology has revolutionized how we approach web and IoT projects. Yet those IoT projects will often present unique challenges, such as the need for long battery life for devices deployed in remote locations. Many developers use standard specifications when implementing their IoT devices, utilizing data formats like JSON and relying on cloud-based communication via the Internet. In these cases, power consumption and device cost become significant concerns. This is where Soracom comes in, offering various solutions to help address these issues.

This blog post will introduce a method to reduce costs by up to 94%, depending on your specific requirements. But before we show you how, let’s talk about why it is so important to minimize data communication in the first place.

Why Reduce Data Traffic?

Reducing the amount of data traffic brings two key advantages:

1. Power Savings: By reducing the volume of data communication, you can achieve substantial power savings. For instance, Sigfox, a Low Power Wide Area (LPWA) communication method, limits each communication to 12 bytes, significantly reducing power consumption. This is particularly crucial for battery-driven IoT devices.

2. Communication Cost Reduction: Soracom follows a pay-as-you-go billing model based on data communication volume. Consequently, reducing the amount of data transmitted directly translates to cost savings. 

Soracom Beam

Soracom Services for Data Traffic Reduction

To help you minimize data traffic, we offer several Soracom services tailored for this purpose:

1. Soracom Beam, Funk, and Funnel: These services primarily focus on reducing data transmission volume through protocol conversion. By converting the communication protocol on the device side and adding authentication information, Beam, Funk, and Funnel facilitate simpler and more efficient data transfers. For example, you can receive data sent over HTTP, TCP, or UDP from your device, authenticate it with AWS, and then transfer it, effectively reducing the amount of data transmitted.

2. Binary Parser and Soracom Orbit: These services specialize in converting data format to reduce data transmission volume. The Binary Parser is a Soracom service that converts binary data from your device into JSON format, while Soracom Orbit handles data format conversion for text and binary data.

You can combine these services with Beam, Funk, and Funnel for protocol conversion to further reduce communication volume.

How to Reduce Data Transmission Volume

Now, let’s delve into practical strategies for reducing data traffic:

1. Encryption and Communication Protocol Optimization: Encryption and heavy communication protocols significantly impact communication volume. To minimize volume, consider the following key points:

  • Avoid performing data encryption on the device itself: Utilize Soracom Beam, Funk, and Funnel to design communication without encryption from the device.
  • Opt for lightweight communication protocols: Consider protocols such as TCP or UDP instead of HTTP. However, please note that changing to UDP eliminates retransmission control and arrival guarantees. TCP is a suitable choice if these features are crucial for your business.

2. Data Format Optimization: Leverage the Binary Parser and Soracom Orbit to change the data format and reduce the amount of data being transmitted. If you’re sending binary data in a predetermined format, the Binary Parser is ideal, as it’s included in the Soracom Air fee at no additional charge.

Verifying the Effect of Communication Volume Reduction

Let’s examine the impact of reducing communication volume and costs based on a benchmark environment introduced in our recent blog post, “How to Reduce IoT Communication Protocol Overhead.”

We’ll explore the differences between three communication paths. Specifically, we’ll compare their communication volume, where the second and third paths optimize data communication volume.

  • Path 1: HTTPS communication from Raspberry Pi -> Amazon API Gateway
  • Path 2: UDP communication from Raspberry Pi -> Soracom Beam -> Amazon API Gateway
  • Path 3: UDP communication from Raspberry Pi -> Soracom Binary Parser -> Soracom Beam -> Amazon API Gateway

In this example, the device sends an 18-byte payload ({"test": "message"}) every 3 hours for a month to the Amazon API Gateway, which responds with a 37-byte payload ({"statusCode": 200, "body": "Hello from Lambda!"}). KeepAlive is not used for HTTPS in this scenario. The cost calculation is based on the price of Plan01S as of May 2023.

Let’s take a look at the results:

plan01s (JP domestic use) [USD per MiB]$0.2
Beam usage fee [USD per request]$0.000009
HTTPS communication amount [bytes] when sending {“test”:”message”}10,664 bytes
UDP communication volume [bytes] when sending {“test”:”message”}560 bytes
Optimization of encryption and communication protocolsData format optimizationData communication volume [MiB]Soracom Beam usage count [requests]Cost [USD]Data traffic reduction rate [%]Cost reduction rate [%]
Path 1XX2.4053X$0.4811
Path 2X0.1263248$0.027594.75%94.28%
Path 30.1238248$0.027094.85%94.39%

As the results show, Path 2 and Path 3 can reduce data traffic and costs by as much as 94%. It’s noteworthy that Path 2, which involves protocol conversion but not data format conversion, still achieves a high rate of reduction. This highlights the impact of eliminating encryption and utilizing lightweight communication protocols.

Consider, also, that the significant reductions in communication volume and costs are most pronounced when the transmission frequency is low (such as the once every-three hours rate used in our testing). This is due to the considerable overhead of implementing KeepAlive and the TCP 3-way handshake each time data is sent. Typically, the default values on Linux (net.ipv4.tcp_keepalive_time = 7200, net.ipv4.tcp_keepalive_probes = 9, net.ipv4.tcp_keepalive_intvl = 75) are used, and significant reduction can be expected for transmission intervals that exceed these values.

In terms of data format conversion, Soracom Orbit proves useful for reducing downstream data transmission. While this example illustrates a simple data transmission scenario, the impact of data format conversion becomes more significant when dealing with larger amounts of transmitted data items.

By implementing the strategies mentioned above and leveraging Soracom’s services, you can optimize your Soracom data usage, achieve substantial cost savings, and extend the battery life of your IoT devices. Please refer to our user documentation for further guidance and detailed instructions on utilizing the Binary Parser, Soracom Orbit, and other services.

Conclusion

In conclusion, reducing data traffic is crucial for efficient IoT projects. It allows for power savings, cost reductions, and improved overall performance. Soracom provides a comprehensive suite of services to help you optimize your data usage, and we encourage you to explore the possibilities and benefits they offer. Start reducing your data transmission volume today and unlock the full potential of your IoT initiatives with Soracom!

………………
Got any questions about an IoT deployment? Soracom offers a number of powerful solutions that have made us a visionary in the IoT space. Chat with us today to learn how a partnership with Soracom can get your project up and running easily and securely. Contact us today!