-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm if HTTP connection uses Keep-Alive #34
Comments
From my understanding by default Okay about the idle timeout. |
It seems the client is not sending any Connection: close header so the connection should keep alive. |
There is still an open question related to this: does swift keep a connection pool? If yes, we'll have to set it's idle timeout. |
Apparently NSURLSession does't have such configuration. I'm almost sure it use a connection pool and in fact it support HTTP pipeline but probably it makes the decision about when close idle connections based on networking activity and trying to be as efficient as possible with the resources. @erickpintor Here you have the NSURLSession configuration properties https://developer.apple.com/reference/foundation/nsurlsessionconfiguration. Maybe we should set up Let me know your thoughts and the direction we should take on this. |
From the docs.
It doesn't seems wise to change it. Considering that amount of concurrent connections, and the lack of configuration around idleness, I think is unlikely that it'll happen on normal devices. We can close this for now. |
To improve performance, FaunaDB allows http keep-alive connections. The should drivers issue requests with keep-alive header on.
The idle timeout for http connections is 5 seconds on the server, we should set it to a bit less on the client. 4 seconds should be fine.
The text was updated successfully, but these errors were encountered: