Occupancy of SSL connections?

Has anyone done any measurement of SSL occupancy with NGINX, both for
the existance of an SSL connection and for an outstanding request?

I’m doing development on COMET polls, where a GET request is outstanding
in the server for a long period. This is using Leo’s module
(GitHub - slact/nchan: Fast, horizontally scalable, multiprocess pub/sub queuing server and proxy for HTTP, long-polling, Websockets and EventSource (SSE), powered by Nginx.).

For HTTP connections, I can get about 20K connections and outstanding
requests in 116MB, which is pretty respectable.

However with HTTPS, what I see is that:

  • having the connection open takes 261MB for about 16K connections
  • having the connection open with an outstanding request takes about 1GB
    for 10L connections.

So the occupancy hit for an outstanding HTTPS request is much higher
than for HTTP. I’d be surprised if the extra occupancy is in Leo’s
module, because I’d expect that to be isolated from whether the
connection is SSL or not.

I don’t have 100% confidence in these numbers, but they should be
roughly right. Can anyone think of why an outstanding request might
consume a lot of memory in HTTPS compared to HTTP? Has anyone done
anything similar?

Thanks,

Edward

You might try the beta of OpenSSL 1.0 (assuming Nginx can build against
it) or applying the Tor patch to 0.9.8.

See RAM improvements in Tor 0.2.0.x and OpenSSL 0.9.9

Regards,
Cliff

Sorry, I just reread your message and I guess that doesn’t really help
with your question about outstanding requests.

Cliff

Cliff W. Wrote:

Sorry, I just reread your message and I guess that
doesn’t really help
with your question about outstanding requests.

Exactly. It’s the request bit that’s baffling me.

Edward

Posted at Nginx Forum: