1. 9
  1. 1

    Does Keep-Alive cost more memory?

    1. 0

      You’ll need some memory to track the state of the idle keep alive connection. They’re definitely not free.

      1. 3

        They are more efficient than not using keepalive and having every new socket set up TLS, and also the end of the connection when they linger before getting cleaned up. You need to look at the whole setup particularly for repeated connections to the same server. Latest TLS 1.3 includes further improvements to setting up TLS faster on reused connections and again these need to be cached but also not using them has a cost too.

        1. 0

          Yes, I understand all that. The question was specifically about memory usage, not any other efficiency dimension.