Hello.
I am looking for a fast and reliable protocol for streaming big amount of small text data in real time (text strings might be between 20 and maybe 500 bytes long).
I do not care about order and when they arrive, i care just to get them to my server (100% delivery). I will have like almost 100 endpoints sending to one big server, so it will have heavy traffic.
I don't look for TCP as it is not connection-less and it might be heavy for the network, has large header.
I was thinking about using UDP but I saw that I loose some packets, sometimes even 1%+, which is not acceptable. I already did some testing.
I am also implemented KCP but i don't know if this is the right solution. I am still doing tests.
The implementation has to be compatible with C and Node.JS as i will run my app in different environments.
What do you recommend?
Thank you.

Recommended Answers

All 5 Replies

We used UDP with our own proprietary protocol.

commented: something like KCP ? i am currently testing it +0

"Overview. kcp is a Kubernetes-like control plane focusing on: A control plane for many independent, isolated “clusters” known as workspaces."

Sorry but that's the first hit on Google. I don't see how this applies here.

commented: i am talking about this +0

Recently I found KCP, https://github.com/skywind3000/kcp/tree/master

From my benchmarks, the results are quite fascinating.

TEST C1 - for 120 minutes with UDP
    SERVER :
        10638635 packets captured
        10638635 packets received by filter
        0 packets dropped by kernel
        1.3G    server.pcap

        cat output.log | grep BEGIN | wc -l
        10637462
        only 3129 lost

    CLIENT:
        10640591 packets captured
        10640591 packets received by filter
        0 packets dropped by kernel
        1.3G    client.pcap
        only 1956 packets lost

        cat output.log | grep BEGIN | wc -l
        10640591



TEST C2 - for 120 minutes with KCP
    SERVER:
        cat output.log | grep BEGIN | wc -l
        13250431
        -- all data is transfered

        795172 packets captured
        795172 packets received by filter
        0 packets dropped by kernel
        990M    server.pcap
        -- no packet lost

    CLIENT:
        cat output.log | grep BEGIN | wc -l
        13250431
        -- all data is transfered

        795172 packets captured
        795172 packets received by filter
        0 packets dropped by kernel
        990M    client.pcap
        -- no packet lost

KCP advantage over simple UDP:

  • 1.3G - 990M = 310MB less data over the network
  • got 2.611.796 more data in same amount of time (24.55% more data transferred)
  • send all the data with 9.843.463 less packets sent packets over the network (you will send only 7.47% packets, +10 times better)

Feel free to add a link. The first find about KCP is at https://docs.kcp.io/kcp/main/ and again I don't see the connection to your project.

HTTP Live Streaming (HLS) ...
Dynamic Adaptive Streaming over HTTP (MPEG-DASH) ...
WebRTC. ...
Secure Reliable Transport (SRT) ...
Real-Time Messaging Protocol (RTMP) ...
Real-Time Streaming Protocol (RTSP) ...
Transmission Control Protocol (TCP) ...
User Datagram Protocol (UDP)

In today's digital age, YouTube has become a powerful platform for individuals and businesses alike to showcase their talent, products, and services. With millions of active users and countless videos being uploaded every day, it can be challenging to stand out from the crowd. That's where "Famups" comes in. As a trusted brand in the industry, "Famups" offers a reliable solution to help you gain more visibility and credibility on YouTube by allowing you to buy YouTube subscribers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.