Outbound sync question

Hi,

My notecard syncs periodically (outbound delay) every 4h but sometimes it syncs 2 or 3 times within a few minutes. Is there an explanation? There is a screenshot of the log with an example.

Thanks.

Hey Alec, great question!

Just to clarify, a new session between the Notecard and Notehub (indicated by a _session.qo) is not the same of a sync of Notes between the Notecard and Notehub. In order to maximize performance and robustness of our infrastructure, we have load balancer in place that assigns handlers to a Notecard when they initiate a TLS connection to the Notehub. Often, the Notecard will use that handler for a long time across several syncs, but if the handler is restarted, or Notehub identifies a need to rebalance load, the Notecard is instructed to reconnect using TLS and get a new handler, which restarts the session.

I hope that helps!

Brandon

1 Like

Hey @bsatrom,
Are the sessions initiated by the load balancer count against the SIM’s data plan?
If yes, how can you factor it in when trying to predict data usage for a longer period of time, eg. monthly data consumption?
Thanks,
Gabor

Hey @LBBD welcome to the community, and thanks for the question! The bytes transferred in a session do count, but it is a small amount of bytes that should be immaterial to most applications. I don’t have an exact number to share at this time, but I do have an item on our content backlog to put together data estimation resources, and we’ll include this on that.

Thank you, Brandon.
I don’t have sufficient knowledge on cellular data transfer but I’ve had some less than pleasant surprises with data consumed due to unreliable cellular connection in the past.

That would be absolutely awesome!

1 Like

I believe most of below which can be found in notehub events is sent during a session sync from the notecard, this equates to 900 bytes which is not insignificant if you are running on periodic note sync with inbound updates at shorter intervals.

Please correct me if I am wrong as we are also interested in estimating data usage for our new product plans.

{
    "event": "xxxxxxxxxxxxxxxxx",
    "session": "xxxxxxxxxxxxxx",
    "device": "dev:xxxxxxxxxxxxxxxxx",
    "product": "productxxxxxxxxxxxxxxxxxxx",
    "received": 16296311xxxxxxx,
    "routed": 1629xxxxxx,
    "req": "session.begin",
    "when": 1629xxxxxx,
    "file": "_session.qo",
    "body": {
        "why": "periodic inbound sync due"
    },
    "tower_when": 16296xxxxx,
    "tower_lat": -xxxxxx,
    "tower_lon": xxxxx,
    "tower_country": "xxx",
    "tower_location": "xxxxx",
    "tower_timezone": "xxxxx",
    "tower_id": "xxxxx",
    "moved": 162xxxxx,
    "orientation": "face-up",
    "rssi": -71,
    "sinr": 169,
    "rsrp": -95,
    "rsrq": -11,
    "rat": "emtc",
    "bars": 2,
    "voltage": 3.981,
    "temp": 21,
}