Comments (13)
We opened a support ticket and we can close the current issue. Thanks
from iotedge.
@varunpuranik / @veyalla do we have any customer facing documentation on the performance breakdowns of mqtt vs amqp?
- This might be marketplace module specific, do you have a specific set of modules in mind? For example, the SimulatedTemperatureSensor can have a custom route defined.
- Believe those messages correspond to device token refreshes for connections, are you saying you want control over that frequency?
- The queue cleanup should be after messages are sent and doing a batch cleanup of messages from underlying store. Can double check this, but think this happens every so often to clean up state from the underlying database.
For 4,5,6 @vipeller or @varunpuranik any guidance on these?
from iotedge.
Thanks @nyanzebra,
Believe those messages correspond to device token refreshes for connections, are you saying you want control over that frequency?
My only motivation to ask about token refreshnes
is to reduce traffic. I see a periodic trace every 5 minutes reauthenticating connected clients. I hope this is not creating cellular traffic.
But the main question remains the same, what is causing downloads, if the application is just pumping telemetry?
from iotedge.
@uriel-kluk is the graph for network traffic to/from device? There should be occasional twin data sent to device to see if any changes in modules need to happen as well as some connectivity checks, but would be surprised if it is significant. I think the next steps are to dig deeper.
If you have metrics it will be interesting to see what the following say:
edgehub_gettwin_total
edgeAgent_total_network_in_bytes
Additionally, if you can provide a support bundle that will be useful.
from iotedge.
from iotedge.
Hi @nyanzebra ,
Attached support bundle.
Please look at this chart:
It is clear that the edgeHub is renogotiating credentials every hour. Is there a way to control the frequency?
Identity attestation uses x.509 in this illustration.
Also, the custom module is doing authentication every hour. this is less impactful but yet it creates traffic.
This is the code I am using to connect the custom module with the edgeHub:
edge-device-support-bundle.tar.gz
ITransportSettings[] GetTransportSettings()
{
switch (transportType)
{
case TransportType.Mqtt:
case TransportType.Mqtt_Tcp_Only:
return new ITransportSettings[] { new MqttTransportSettings(TransportType.Mqtt_Tcp_Only) };
case TransportType.Mqtt_WebSocket_Only:
return new ITransportSettings[] { new MqttTransportSettings(TransportType.Mqtt_WebSocket_Only) };
case TransportType.Amqp_WebSocket_Only:
return new ITransportSettings[] { new AmqpTransportSettings(TransportType.Amqp_WebSocket_Only) };
default:
return new ITransportSettings[] { new AmqpTransportSettings(TransportType.Amqp_Tcp_Only) };
}
}
var settings = GetTransportSettings();
var options = new ClientOptions
{
ModelId = ModelId,
SasTokenTimeToLive = TimeSpan.FromDays(1),
};
// OpenAsync a connection to the Edge runtime
_moduleClient = await ModuleClient.CreateFromEnvironmentAsync(settings, options);
from iotedge.
@uriel-kluk would you mind trying to set DeviceScopeCacheRefreshRateSecs
to a much larger number (default is 3600s or 1hr). I am hoping this reduces the download quite a bit, it also shouldn't effect edgeHub really.
from iotedge.
Thank you @nyanzebra, I tried almost every parameter, but I am getting old and lazy, and because I saw the leaf description, I dismissed. Fingers crossed, this solves the issue. I should be able to provide an update in about an hour :)
Last few days with the default one hour:
from iotedge.
@uriel-kluk did the solution that Robert provided solve the issue?
from iotedge.
@david-emakenemi @nyanzebra Unfortunately, no. Thanks for all the great input on keeping our IoT Edge traffic lean on cellular. I've been digging into this with @uriel-kluk and with Wireshark I found some spots where we're using more bandwidth than we'd like or expect. I've attached some captures and charts to help illustrate.
We would love to get your take on understanding why we'd be getting so much Rx traffic on edgeHub as shown below, and/or how to reduce it.
This screenshot is of a Wireshark capture with all Tx traffic filtered out, so this is only Rx traffic coming into our edge device, viewed both in bytes downloaded over time and the delta time between packets over time.
This is a typical 24 hour period reported with our SuperSIM from Twilio.
Capture files (.pcapng) both for 2.5hrs, one with TCP and TLS only filtered.
captures.zip
from iotedge.
Looking at the attached pcap, it looks like packets regarding certs are few and while large, aren't the majority of downloads.
When looking further it looks like there is a consistent traffic being sent from 20.49.109.144
, which I assume to be your iothub, of about 135 length (TLS record len 64). Given the size, these are likely not PUBACKs within MQTT.
I will try to reproduce by setting up a local device and see if can monitor traffic w/o TLS to see if can get some answers. Will also ask IoTHub team if they have any ideas.
from iotedge.
from iotedge.
@uriel-kluk is this still an outstanding issue?
@nyanzebra do you have any update here?
from iotedge.
Related Issues (20)
- Iotedge fails to make docker-proxy.sock after reboot (file exists) in Ubuntu Core HOT 15
- How to run aziot-edge in a docker container? HOT 10
- EdgeAgent does not restart crashed module if busy downloading new manifest 1.4.10 HOT 5
- Create a reusable Volume in Azure IOT Edge Module via Container Create Options HOT 2
- Can not ssh into a (running) VM with Ubuntu Core 20 on my k3s cluster HOT 1
- Reported twin does not reflect running container HOT 2
- Scarthgap support? HOT 1
- Best Practices/Guidance on upgrading a remote database module HOT 3
- edgeAgent hangs after a networking issue. HOT 2
- [Documentation] [Low priority] Add to the config.toml template and documentation a section for logging HOT 2
- "Did not receive ack for message / System.TimeoutException: Message completion response not received" errors after environment upgrade HOT 3
- Iot edge not starting on debian bullseye HOT 2
- IoT Edge child node unable to connect to IoT Edge transparent gateway HOT 3
- User module unable to connect to Hub with 'Communication_error' HOT 1
- EdgeHub fails to parse valid D2C creation time UTC string
- Disable Edge CA renewal did not work
- Is it possible to manually renew the Edge CA certificates? HOT 3
- Manual IoT Edge CA certificate renewal error HOT 8
- Runtime: Metrics collector cannot be added to garbage collection list HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iotedge.