I am using node version v0.8.16. It bundles with openssl 1.0.0f and contains SSL_OP_NO_COMPRESSION and SSL_MODE_RELEASE_BUFFERS.
My test ssl server just echoes back hello world upon incoming https request and keep the connection open. From my test, the memory overhead per ssl connection is around 150k.
What is the approximate memory overhead for ssl connections in node ? how can I reduce ssl memory usage in this case ?
SSL needs per-connection space for:
In addition the TCP connection will consume kernel space, e.g. for the socket send and receive buffers.
SSL needs about 128K or even more (depending on implementation) per connection for memory buffers so you probably won't be able to reduce amount of memory used.