Query call performance and boundary nodes

Is there any idea about the timeline and the cost of query charging?

There was a pushback both from the community and internally against introducing query charging soon and we had to rescope it to query stats: Community Consideration: Explore Query Charging - #23 by stefan-kaestle
There is also a big challenge of protecting canisters against cycle draining attacks. I think there needs to be some push from the community for this to start progressing.

Regarding pricing: there was no proper research on this AFAIK. Here are some ballpark numbers that one could calculate using common sense from data available on the Internet. I might be missing something (e.g. effects of boundary nodes), so please take this with a grain of salt and don’t quote me, but rather verify it and use it as a starting point of your own research.

  • Execution cost: 1/13-th of execution cost of updates on a 13 node subnet since each query executes on a single node.
  • Traffic cost:
    • Required bandwidth for an IC node is 300mbps.
    • Monthly reward for an IC node is [~2K XDR] (Proposal: 123312 - ICP Dashboard) ~ $2.5K.
    • Let’s assume queries consume about half of the bandwidth: 160 mbps = 20 MB/s
    • A month has ~2.5M seconds.
    • Cost per GB: $2.5K / (2.5M s * 0.02GB/s) = $1/20 / GB = $0.05 / GB

Assuming that video streaming uses about 2mbps and a subnet has 13 nodes with 160mbps of query bandwidth each, we can compute how many concurrent streaming users a subnet can support (without caching at the boundary nodes): 13 * 160 / 2 = 1040. Again, I might be missing something, so please verify and don’t trust.

1 Like