fiorix / go-diameter

Diameter stack and Base Protocol (RFC 6733) for the Go programming language
Other
245 stars 141 forks source link

[Question] - Most performant decode #93

Closed aaronchar closed 6 years ago

aaronchar commented 6 years ago

I am just wondering what the best performing decode method is? I am currently using the library to decode from raw bytes that are being collected from a network tap

Generally it works perfectly but occasionally if there is a message storm or some other network issues we can see a huge spike in diameter messages (hundreds of thousands per second), which can cause some issues

I am currently using ReadMessage on each packet, Just wondering if there is a better method

Thanks

fiorix commented 6 years ago

ReadMessage is the most performant decoder. This was one of my first use of this code, and at the time (about 3 years ago) we managed to process and sustain up to 800k msg/s in the lab environment using 24 cores and ~8GB of ram.

If you're having trouble with spikes, the only thing I can think of is to put them in a spool area and then have your collector read from there instead of doing it all real-time.