NKN and nCDN related questions

NKN’s blockchain only stores information about what when/where was relayed, not data itself (images, video etc). Correct?

So any time an information passes (say video stream) through nodes it doesn’t stop at any point? It just gets relayed over and over and over again (upon demand?)? If that’s the case than how did you solve the latency issue?

For example I want to stream high-res (4k?) video and it’s hosted in US and I live in Australia. Let’s say you’ve got 100 000 nodes all over the world, but the stream would still need to travel through ALL nodes that create the optimal route? It’s not like content magically appears somewhere near Australia. It still has delivery time.

So,

  1. How did you solve the latency issue? Do you just shorten the time (latency) by shortening the distance between each stop (node)?
  2. How is the optimal route calculated? Will NKN try to utilize the maximum number of nodes along the shortest path from Content Host to Client?
  3. Is there some kind of information cap that nodes can handle relaying? Is it only limited by upload/download speed?
  4. How many simultaneous relay processes can one node handle?
  5. Will NKN/nCDN run into bottlenecking issues serving a Tier 1 (massively popular platform) with lowish number of nodes?
  6. If relaying from Host A to Client B we utilize let’s say 100 nodes out of total 100 000. What part do the rest 99 900 nodes play in this process? Even if not relaying they should also store the fact that information was relayed by those 100 nodes? Wouldn’t this slowdown the network when it’s scaled big time?

I somewhat understand how this might all work when there’s tens or hundreds of nodes around every household and I might watch the same thing another guy in my region wants to watch, but aren’t you going to encounter some kind of difficulties up until you’re at that point (when you have lots and lots of nodes)?

Also it’s obvious from my questions that I don’t really have a tech background, but when explaining, please don’t avoid moderately advanced topics. I’m genuinely curious how all this works and willing to do a bit of learning (in order to understand) :slight_smile:

4 Likes

NKN’s blockchain only stores information about what when/where was relayed, not data itself (images, video etc). Correct?

It already stores transactions, so it can store all sorts of things. However, I didn’t come here to make guesses at your questions, but to present mine:

Will anyone be able to push stuff onto the CDN (and what does it cost), or is that a NKN-crew-only kind of thing? If so, for how long?

1 Like

Hi Arviee

Really great questions. And I will try to answer first, and I guess Yilun will be happy to provide additional technical details.

There are fundamentally two types of traffic over NKN network:

  • Free or best effort traffic
  • Paid and optimized traffic

We intend to keep NKN free for normal traffic, in order to attract developers and applications to run on NKN and expand our adoption. This still incentivize the miners, because the more they relay “for free”, the higher chance they will earn mining reward. And the mining reward alone should be able to cover their monthly fixed costs, as well as hopefully a profit. Even in this category, we do optimize routing to certain extent. Not end to end optimization of the entire relay path, but hop to hop optimization when selecting the node with shortest latency as next hop.

The second category of traffic are paid traffic that will be further optimized for user experience. Let’s use nCDN as an example:

  • nCDN: the content owners (hypothetically YouTube) contract with NKN to help them deliver video streaming, say paying $0.05 per GB. Then we can install additional nCDN software module or plug-in on NKN node, which will cache and deliver the content for YouTube clients. These nodes will have much higher storage capacity (think >100GB), and can cache not only the latest Game of Thrones episodes, but also the Women’s World Cup real-time streams.
  • The route is always the shortest and best quality, even better than your default Internet connection. The reason is that your default Internet connection, say your PC in Australia to Youtube server in California, are mostly static default routes defined by your ISP and the inter-ISP carriers. NKN can create multiple alternative paths between your PC and YouTube, and we have found from our tests that often we can find better route than your default one.
  • These path do not need to go through signature chain, and will not need to be randomized. The free or best effort routes are randomized, in order to prevent collusion attacks to gain more mining reward. These traffic are already paid by YouTube in USD, and NKN as nCDN service provider will buy NKN and send NKN to the nCDN mining nodes.
  • Even better, NKN can combine multiple paths to deliver content. Especially for video streaming, we can say send 3 second snippets of video through one path, another 3 second snippets of video through another, and so on. Eventually the receiving client can combine all these snippets to have complete video stream. It might add a little bit of delay, but most video players have 30 seconds or more buffers anyway. Our tests have shown we can increase your effective streaming bandwidth by 150-250%.

I hope I answered most of your questions. Please let me know if you want to know more.

2 Likes

Hi Lynn

For now, nCDN only caches files that our content owner clients can distribute. There are a few reasons:

  1. For copyright protection and legal compliance: we would like to prevent some users upload and distribute pirated content via this relay and caching network
  2. For safety: we want to avoid putting potentially hazardous files (e.g. trojan horse, virus) into our miner’s computers
  3. For cost reasons: currently the content owner will pay us fiat for CDN service, which can be used to purchase NKN and cover miner’s computer and networking costs.

On the other hand, this is an open network. So anyone can create their own CDN network on top of NKN, and they can define the rules they want. We then will not be responsible for their activities. The community can decide the policy here.

Thank you for the reply! Super interesting stuff! Here are my follow up questions:

  1. Infrastructure that will serve paid clients will be centralized/partially centralized?

  2. Who can become a Node (with big storage capacity) that serves paying clients? Perhaps (whitelisted?) community members with staked NKN? :wink:

  1. Infrastructure that will serve paid clients will be centralized/partially centralized?

The infrastructure is partially centralized for paid customers (content owner)

  • The source of the content (e.g. Game of Thrones) have to come from media store by YouTube
  • The nCDN coordinator is jointly developed by NKN and content owner, and is centralized. This is mainly used to find the nearest NKN node for the video streaming user, as well as providing statistics and and analytics for the content owner to better cache the content across all the nodes

But the rest of the infrastructure is still decentralized:

  • The nodes who is running NKN as well as nCDN plug-in/module are on their own, and can still deliver content even if the media store or CDN coordinator go offline
  • The nodes can also cache popular content on their own, depends on which traffic is going through them and who are their “neighbors”
  1. Who can become a Node (with big storage capacity) that serves paying clients? Perhaps (whitelisted?) community members with staked NKN? :wink:
  • Basically anyone with minimum requirements can become a nCDN node. Other than the cheapest wifi router, most device that runs NKN will suffice. But we would require for example 100GB storage capacity, which is easily done by adding a USB stick even for mid-tier routers
  • The nCDN coordinator will decide if certain traffic will be routed to the node, based on many factors including compute/memory/storage resources and utilization, network speed and latency, proximity to video streaming users, and etc.
  • I like your idea of staking, which will give nCDN miners additional incentives to keep the service running 24x7 with good network bandwidth!
2 Likes

Partial centralization from my understanding is a must, at least in the beginning, so it makes perfect sense. Thanks for the reply.

Bruce, I was also wondering do you consider putting in place some kind of penalties or registration/deregistration period for nodes, so the network is more stable/reliable?

I think the signature chain has built-in mechanism: that if the node is online 24x7 and has consistent connectivity, it will have better chance of getting mining reward.

Hi Arviee,

Those are very good questions! I want to clarify one thing: nCDN traffic is not going through the normal relay (the one used by nkn-client and free). It’s performance first and thus (currently) using direct link between end user and edge node. The most significant advantage of current nCDN is that edges nodes are ultra decentralized and close to end user.

2 Likes

弱弱问句 这个业务凉了么