Technical migrations... and how much Spider is fast now !!
December has been a month of migrations for Spider. And how much I'm happy to have done them! Read below.
Migration path
- From NGINX to Traefik on 6/12
- From Node 7 to Node 8
- From Javascript generators to async/await programmation pattern
- From eTags generation on full resource to eTags based on id+lastUpdate date (CPU saving)
- From Node 8 to Node 10 (actually done in January)
The result of all this?
- A division by 2 to 5 of microservices CPU usage !
- A division by 4 to 6 of response times as seen from Whisperers !!
- A division by 5 to 12 of internal response times !!!
This was amazing!
I did not believe it, but yes that's proven. Node was saying that async await was faster than generators, then Google improved async/await processing speed by 8x in the V8 version embedded in Node 10.
Examples
- Processing of packets improved from 484ms 90th percentile for 100 packets bulk request to ... 69 ms!!
- Patching TcpSessions improved from 266ms 90th percentile to 13 ms!!! Excuse me!
- CPU using of parsing job improved from 172% to 80% and for packets decoding, from 295% to ... 55% !! Amazing :-)
- Previously Spider needed 4 servers to process 2500 packets/s, now... i could almost do it on two, and much much faster ! :)
Conclusion
Yes, Node.js is blazingly fast. This was right for callback mode, and now it is back for async/await ! :-)
Figures
Source: Google spreadsheet
And Streetsmart?
And you know what? Streetsmart is almost in a state before all my migrations. Imagine if migrations have the same effect for Streetsmart. It would be awesome ! :-)
Well, that's part of my plan indeed!!