In short, keep-alive defines time connections will hang around after the first request finishes, while the timeout is how long an unused keep-alive connection is kept around.
time
For more, you may check documentation.