1

I am working on an IoT-related research project with several devices. However, my project partner responsible for the infrastructure restricted the traffic for each device to a maximum of 500 MB per month.

To meet this restriction, I tried to estimate the request and response sizes with a very basic calculation. Some overhead estimations can be found in this answer on Stackoverflow. Prior to any overhead estimations, the answer states:

You have zero knowledge about the layers below HTTP. You can't even assume the HTTP request will be delivered over TCP/IP. Even if it is, you have zero knowledge about the overhead added by the network layer. Or what the reliability of the route will be and what overhead will be due to dropped/resent packets.

For some robust numbers, I thought about doing some measurements in a development setup since I am both working on the remote device and the server.

Are there any ways to measure the complete response and request sizes including both payload and any protocol overheads? How to determine the complete data throughput on the network infrastructure?

2 Answers 2

1

For Linux, and other unix(like) OSses you may use iftop utility. For example: Monitoring my router web interface: sudo iftop -f 'port 80 and host 172.19.76.1' -iwlan0

  • -f -- filter: port 80 -- monitor port 80 of the target host and host 172.19.76.1 -- hostname or address of the target host.
  • -iwlan0 -- [i]nterface wlan0

iftop screenshot

1

I know that this question has been asked long time ago.

In theory to get size of HTTP request and response including protocol overhead:

Data Size and Protocol Overhead

When application data is sent by a protocol, the data is encapsulated into a protocol data unit (PDU). A PDU includes Application Data (payload) and Header.

Packet Size = Application Data + Header Size

The total data generated by the application = the total size of all the packets used to complete a full data transmission.

Data Size and Protocol Overhead Example

But how to find the size in practically I don't know yet.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .