As an exercise, I have written a package that provides the missing function for decrypting the AES key using Rust. At the same time, I looked at the solution with Node-Server and compared it. I also wrote a small load testing that performs the decryption of the request and the encryption of the response.
The :observer delivers the expected results. While the dirty CPU rises to 100% in the Rust implementation, the work in the node implementation is performed by the started node server. With the Node implementation, data must be serialised via port. You can clearly see the increased IO usage, although the Erlang schedulers are hardly loaded. The Rust implementation is faster with a factor of 1.37. This can be explained by the fact that the node implementation calls the OpenSSL functions, which means that encryption/decryption is performed almost as quickly for large data. Only the serialisation has an impact.
The Rust implementation eliminates the need to manage additional node servers and reduces IO usage. You also gain a small speed advantage. The CPU usage is almost the same. The node server consume about 100%.























